linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mips: sgi-ip27: switch from DISCONTIGMEM to SPARSEMEM
@ 2019-09-05  5:47 Mike Rapoport
  2019-09-05 13:21 ` Thomas Bogendoerfer
  0 siblings, 1 reply; 20+ messages in thread
From: Mike Rapoport @ 2019-09-05  5:47 UTC (permalink / raw)
  To: Paul Burton, Thomas Bogendoerfer; +Cc: linux-mips, linux-kernel, Mike Rapoport

From: Mike Rapoport <rppt@linux.ibm.com>

The memory initialization of SGI-IP27 is already half-way to support
SPARSEMEM and only a call to sparse_init() was missing. Add it to
prom_meminit() and adjust arch/mips/Kconfig to enable SPARSEMEM and
SPARSEMEM_EXTREME for SGI-IP27

Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
---

Thomas, could you please test this on your Origin machine?


 arch/mips/Kconfig                | 12 ++----------
 arch/mips/sgi-ip27/ip27-memory.c |  2 ++
 2 files changed, 4 insertions(+), 10 deletions(-)

diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index d50fafd..e4b02b5 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -669,6 +669,7 @@ config SGI_IP22
 config SGI_IP27
 	bool "SGI IP27 (Origin200/2000)"
 	select ARCH_HAS_PHYS_TO_DMA
+	select ARCH_SPARSEMEM_ENABLE
 	select FW_ARC
 	select FW_ARC64
 	select BOOT_ELF64
@@ -2633,18 +2634,9 @@ config ARCH_FLATMEM_ENABLE
 	def_bool y
 	depends on !NUMA && !CPU_LOONGSON2
 
-config ARCH_DISCONTIGMEM_ENABLE
-	bool
-	default y if SGI_IP27
-	help
-	  Say Y to support efficient handling of discontiguous physical memory,
-	  for architectures which are either NUMA (Non-Uniform Memory Access)
-	  or have huge holes in the physical address space for other reasons.
-	  See <file:Documentation/vm/numa.rst> for more.
-
 config ARCH_SPARSEMEM_ENABLE
 	bool
-	select SPARSEMEM_STATIC
+	select SPARSEMEM_STATIC if !SGI_IP27
 
 config NUMA
 	bool "NUMA Support"
diff --git a/arch/mips/sgi-ip27/ip27-memory.c b/arch/mips/sgi-ip27/ip27-memory.c
index fb077a9..a8ddebc 100644
--- a/arch/mips/sgi-ip27/ip27-memory.c
+++ b/arch/mips/sgi-ip27/ip27-memory.c
@@ -444,6 +444,8 @@ void __init prom_meminit(void)
 		}
 		__node_data[node] = &null_node;
 	}
+
+	sparse_init();
 }
 
 void __init prom_free_prom_memory(void)
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2019-09-16 10:27 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-05  5:47 [PATCH] mips: sgi-ip27: switch from DISCONTIGMEM to SPARSEMEM Mike Rapoport
2019-09-05 13:21 ` Thomas Bogendoerfer
2019-09-05 13:32   ` Mike Rapoport
2019-09-05 13:48     ` Thomas Bogendoerfer
2019-09-05 15:47       ` Mike Rapoport
2019-09-05 21:38         ` Thomas Bogendoerfer
2019-09-06 13:02           ` Mike Rapoport
2019-09-09 16:22             ` Thomas Bogendoerfer
2019-09-10 11:32               ` Mike Rapoport
2019-09-10 12:44                 ` Thomas Bogendoerfer
2019-09-11 14:09                 ` Thomas Bogendoerfer
2019-09-11 14:57                   ` Mike Rapoport
2019-09-12 10:58                   ` Mike Rapoport
2019-09-12 13:55                     ` Thomas Bogendoerfer
2019-09-12 14:09                       ` Thomas Bogendoerfer
2019-09-12 15:58                         ` Mike Rapoport
2019-09-14 10:41                         ` Mike Rapoport
2019-09-16  9:07                           ` Thomas Bogendoerfer
2019-09-16  9:52                             ` Mike Rapoport
2019-09-16 10:07                               ` Thomas Bogendoerfer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).