diff options
-rw-r--r-- | arch/mips/Kconfig | 1 | ||||
-rw-r--r-- | include/asm-mips/page.h | 12 |
2 files changed, 5 insertions, 8 deletions
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index 3ebc5b296dbb..330f6abc7703 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig | |||
@@ -1694,6 +1694,7 @@ config ARCH_SPARSEMEM_ENABLE | |||
1694 | 1694 | ||
1695 | config ARCH_SPARSEMEM_ENABLE | 1695 | config ARCH_SPARSEMEM_ENABLE |
1696 | bool | 1696 | bool |
1697 | select SPARSEMEM_STATIC | ||
1697 | 1698 | ||
1698 | config NUMA | 1699 | config NUMA |
1699 | bool "NUMA Support" | 1700 | bool "NUMA Support" |
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) |