All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sparsemem fix
@ 2006-07-04 16:22 Atsushi Nemoto
  2006-07-04 17:03 ` Chad Reese
  2006-07-05  8:35 ` Franck Bui-Huu
  0 siblings, 2 replies; 11+ messages in thread
From: Atsushi Nemoto @ 2006-07-04 16:22 UTC (permalink / raw)
  To: linux-mips; +Cc: ralf

1. MIPS should select SPARSEMEM_STATIC since allocating bootmem in
   memory_present() will corrupt bootmap area.
2. pfn_valid() for SPARSEMEM is defined in linux/mmzone.h

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>

diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index f151a7e..879a19c 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -1690,6 +1690,7 @@ config ARCH_DISCONTIGMEM_ENABLE
 
 config ARCH_SPARSEMEM_ENABLE
 	bool
+	select SPARSEMEM_STATIC
 
 config NUMA
 	bool "NUMA Support"
diff --git a/include/asm-mips/page.h b/include/asm-mips/page.h
index 6b97744..6ed1151 100644
--- a/include/asm-mips/page.h
+++ b/include/asm-mips/page.h
@@ -138,16 +138,14 @@ #define __va(x)			((void *)((unsigned lo
 
 #define pfn_to_kaddr(pfn)	__va((pfn) << PAGE_SHIFT)
 
-#ifndef CONFIG_SPARSEMEM
-#ifndef CONFIG_NEED_MULTIPLE_NODES
-#define pfn_valid(pfn)		((pfn) < max_mapnr)
-#endif
-#endif
-
 #ifdef CONFIG_FLATMEM
 
 #define pfn_valid(pfn)		((pfn) < max_mapnr)
 
+#elif defined(CONFIG_SPARSEMEM)
+
+/* pfn_valid is defined in linux/mmzone.h */
+
 #elif defined(CONFIG_NEED_MULTIPLE_NODES)
 
 #define pfn_valid(pfn)							\
@@ -159,8 +157,6 @@ ({									\
 	            : 0);						\
 })
 
-#else
-#error Provide a definition of pfn_valid
 #endif
 
 #define virt_to_page(kaddr)	pfn_to_page(__pa(kaddr) >> PAGE_SHIFT)

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

end of thread, other threads:[~2006-07-10  7:47 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-04 16:22 [PATCH] sparsemem fix Atsushi Nemoto
2006-07-04 17:03 ` Chad Reese
2006-07-05  1:30   ` Atsushi Nemoto
2006-07-05  8:35 ` Franck Bui-Huu
2006-07-05 10:20   ` Atsushi Nemoto
2006-07-05 10:51     ` Franck Bui-Huu
2006-07-06 17:37       ` Ralf Baechle
2006-07-06 17:32     ` Ralf Baechle
2006-07-08 14:47       ` Franck Bui-Huu
2006-07-09 22:46         ` Ralf Baechle
2006-07-10  7:52           ` Franck Bui-Huu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.