diff options
author | Atsushi Nemoto <anemo@mba.ocn.ne.jp> | 2006-07-04 12:22:44 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2006-07-13 16:26:07 -0400 |
commit | 7de58fab9ccb63b4194ce39cf163a7491921d037 (patch) | |
tree | 6b7153cc7b731fdb8e1a5b1641d093bcedd78154 /include | |
parent | cfbae5d331b8872719b5cddb0ed5292c393ad78a (diff) |
[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')
-rw-r--r-- | include/asm-mips/page.h | 12 |
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; | |||
138 | 138 | ||
139 | #define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT) | 139 | #define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT) |
140 | 140 | ||
141 | #ifndef CONFIG_SPARSEMEM | ||
142 | #ifndef CONFIG_NEED_MULTIPLE_NODES | ||
143 | #define pfn_valid(pfn) ((pfn) < max_mapnr) | ||
144 | #endif | ||
145 | #endif | ||
146 | |||
147 | #ifdef CONFIG_FLATMEM | 141 | #ifdef CONFIG_FLATMEM |
148 | 142 | ||
149 | #define pfn_valid(pfn) ((pfn) < max_mapnr) | 143 | #define pfn_valid(pfn) ((pfn) < max_mapnr) |
150 | 144 | ||
145 | #elif defined(CONFIG_SPARSEMEM) | ||
146 | |||
147 | /* pfn_valid is defined in linux/mmzone.h */ | ||
148 | |||
151 | #elif defined(CONFIG_NEED_MULTIPLE_NODES) | 149 | #elif defined(CONFIG_NEED_MULTIPLE_NODES) |
152 | 150 | ||
153 | #define pfn_valid(pfn) \ | 151 | #define pfn_valid(pfn) \ |
@@ -159,8 +157,6 @@ typedef struct { unsigned long pgprot; } pgprot_t; | |||
159 | : 0); \ | 157 | : 0); \ |
160 | }) | 158 | }) |
161 | 159 | ||
162 | #else | ||
163 | #error Provide a definition of pfn_valid | ||
164 | #endif | 160 | #endif |
165 | 161 | ||
166 | #define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT) | 162 | #define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT) |