summaryrefslogtreecommitdiffstats
path: root/include/asm-mips/page.h
diff options
context:
space:
mode:
authorAtsushi Nemoto <anemo@mba.ocn.ne.jp>2006-07-04 18:22:44 +0200
committerRalf Baechle <ralf@linux-mips.org>2006-07-13 22:26:07 +0200
commit7de58fab9ccb63b4194ce39cf163a7491921d037 (patch)
tree6b7153cc7b731fdb8e1a5b1641d093bcedd78154 /include/asm-mips/page.h
parent[MIPS] IP32: Fix wreckage caused by recent SA_* constant replacement. (diff)
downloadlinux-7de58fab9ccb63b4194ce39cf163a7491921d037.tar.xz
linux-7de58fab9ccb63b4194ce39cf163a7491921d037.zip
[MIPS] Sparsemem fixes
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> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'include/asm-mips/page.h')
-rw-r--r--include/asm-mips/page.h12
1 files changed, 4 insertions, 8 deletions
diff --git a/include/asm-mips/page.h b/include/asm-mips/page.h
index 6b97744f00cd..6ed1151a05a3 100644
--- a/include/asm-mips/page.h
+++ b/include/asm-mips/page.h
@@ -138,16 +138,14 @@ typedef struct { unsigned long pgprot; } pgprot_t;
#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 @@ typedef struct { unsigned long pgprot; } pgprot_t;
: 0); \
})
-#else
-#error Provide a definition of pfn_valid
#endif
#define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT)