0001
0002 #include <linux/highmem.h>
0003 #include <linux/export.h>
0004 #include <linux/swap.h> /* for totalram_pages */
0005 #include <linux/memblock.h>
0006
0007 void __init set_highmem_pages_init(void)
0008 {
0009 struct zone *zone;
0010 int nid;
0011
0012
0013
0014
0015
0016 reset_all_zones_managed_pages();
0017 for_each_zone(zone) {
0018 unsigned long zone_start_pfn, zone_end_pfn;
0019
0020 if (!is_highmem(zone))
0021 continue;
0022
0023 zone_start_pfn = zone->zone_start_pfn;
0024 zone_end_pfn = zone_start_pfn + zone->spanned_pages;
0025
0026 nid = zone_to_nid(zone);
0027 printk(KERN_INFO "Initializing %s for node %d (%08lx:%08lx)\n",
0028 zone->name, nid, zone_start_pfn, zone_end_pfn);
0029
0030 add_highpages_with_active_regions(nid, zone_start_pfn,
0031 zone_end_pfn);
0032 }
0033 }