drm/modes: Fix drm_mode_vrefres() docs
[drm/drm-misc.git] / arch / x86 / mm / highmem_32.c
blobd9efa35711ee9f561dd8a097741d8e0a41eaf1e7
1 // SPDX-License-Identifier: GPL-2.0-only
2 #include <linux/highmem.h>
3 #include <linux/export.h>
4 #include <linux/swap.h> /* for totalram_pages */
5 #include <linux/memblock.h>
6 #include <asm/numa.h>
8 void __init set_highmem_pages_init(void)
10 struct zone *zone;
11 int nid;
14 * Explicitly reset zone->managed_pages because set_highmem_pages_init()
15 * is invoked before memblock_free_all()
17 reset_all_zones_managed_pages();
18 for_each_zone(zone) {
19 unsigned long zone_start_pfn, zone_end_pfn;
21 if (!is_highmem(zone))
22 continue;
24 zone_start_pfn = zone->zone_start_pfn;
25 zone_end_pfn = zone_start_pfn + zone->spanned_pages;
27 nid = zone_to_nid(zone);
28 printk(KERN_INFO "Initializing %s for node %d (%08lx:%08lx)\n",
29 zone->name, nid, zone_start_pfn, zone_end_pfn);
31 add_highpages_with_active_regions(nid, zone_start_pfn,
32 zone_end_pfn);