aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/mm/discontig_32.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/mm/discontig_32.c')
-rw-r--r--arch/x86/mm/discontig_32.c19
1 files changed, 7 insertions, 12 deletions
diff --git a/arch/x86/mm/discontig_32.c b/arch/x86/mm/discontig_32.c
index c3f119e99e0d..7c4d0255f8d8 100644
--- a/arch/x86/mm/discontig_32.c
+++ b/arch/x86/mm/discontig_32.c
@@ -100,7 +100,6 @@ unsigned long node_memmap_size_bytes(int nid, unsigned long start_pfn,
100#endif 100#endif
101 101
102extern unsigned long find_max_low_pfn(void); 102extern unsigned long find_max_low_pfn(void);
103extern void add_one_highpage_init(struct page *, int, int);
104extern unsigned long highend_pfn, highstart_pfn; 103extern unsigned long highend_pfn, highstart_pfn;
105 104
106#define LARGE_PAGE_BYTES (PTRS_PER_PTE * PAGE_SIZE) 105#define LARGE_PAGE_BYTES (PTRS_PER_PTE * PAGE_SIZE)
@@ -432,10 +431,10 @@ void __init set_highmem_pages_init(int bad_ppro)
432{ 431{
433#ifdef CONFIG_HIGHMEM 432#ifdef CONFIG_HIGHMEM
434 struct zone *zone; 433 struct zone *zone;
435 struct page *page; 434 int nid;
436 435
437 for_each_zone(zone) { 436 for_each_zone(zone) {
438 unsigned long node_pfn, zone_start_pfn, zone_end_pfn; 437 unsigned long zone_start_pfn, zone_end_pfn;
439 438
440 if (!is_highmem(zone)) 439 if (!is_highmem(zone))
441 continue; 440 continue;
@@ -443,16 +442,12 @@ void __init set_highmem_pages_init(int bad_ppro)
443 zone_start_pfn = zone->zone_start_pfn; 442 zone_start_pfn = zone->zone_start_pfn;
444 zone_end_pfn = zone_start_pfn + zone->spanned_pages; 443 zone_end_pfn = zone_start_pfn + zone->spanned_pages;
445 444
445 nid = zone_to_nid(zone);
446 printk("Initializing %s for node %d (%08lx:%08lx)\n", 446 printk("Initializing %s for node %d (%08lx:%08lx)\n",
447 zone->name, zone_to_nid(zone), 447 zone->name, nid, zone_start_pfn, zone_end_pfn);
448 zone_start_pfn, zone_end_pfn); 448
449 449 add_highpages_with_active_regions(nid, zone_start_pfn,
450 for (node_pfn = zone_start_pfn; node_pfn < zone_end_pfn; node_pfn++) { 450 zone_end_pfn, bad_ppro);
451 if (!pfn_valid(node_pfn))
452 continue;
453 page = pfn_to_page(node_pfn);
454 add_one_highpage_init(page, node_pfn, bad_ppro);
455 }
456 } 451 }
457 totalram_pages += totalhigh_pages; 452 totalram_pages += totalhigh_pages;
458#endif 453#endif