aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/mm/init_32.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/mm/init_32.c')
-rw-r--r--arch/x86/mm/init_32.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/arch/x86/mm/init_32.c b/arch/x86/mm/init_32.c
index c7d19471261d..3c76d194fd2c 100644
--- a/arch/x86/mm/init_32.c
+++ b/arch/x86/mm/init_32.c
@@ -321,8 +321,13 @@ extern void set_highmem_pages_init(int);
321static void __init set_highmem_pages_init(int bad_ppro) 321static void __init set_highmem_pages_init(int bad_ppro)
322{ 322{
323 int pfn; 323 int pfn;
324 for (pfn = highstart_pfn; pfn < highend_pfn; pfn++) 324 for (pfn = highstart_pfn; pfn < highend_pfn; pfn++) {
325 add_one_highpage_init(pfn_to_page(pfn), pfn, bad_ppro); 325 /*
326 * Holes under sparsemem might not have no mem_map[]:
327 */
328 if (pfn_valid(pfn))
329 add_one_highpage_init(pfn_to_page(pfn), pfn, bad_ppro);
330 }
326 totalram_pages += totalhigh_pages; 331 totalram_pages += totalhigh_pages;
327} 332}
328#endif /* CONFIG_FLATMEM */ 333#endif /* CONFIG_FLATMEM */