diff options
Diffstat (limited to 'arch/x86/mm/highmem_32.c')
-rw-r--r-- | arch/x86/mm/highmem_32.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/arch/x86/mm/highmem_32.c b/arch/x86/mm/highmem_32.c index bcc079c282dd..d11745334a67 100644 --- a/arch/x86/mm/highmem_32.c +++ b/arch/x86/mm/highmem_32.c | |||
@@ -1,5 +1,6 @@ | |||
1 | #include <linux/highmem.h> | 1 | #include <linux/highmem.h> |
2 | #include <linux/module.h> | 2 | #include <linux/module.h> |
3 | #include <linux/swap.h> /* for totalram_pages */ | ||
3 | 4 | ||
4 | void *kmap(struct page *page) | 5 | void *kmap(struct page *page) |
5 | { | 6 | { |
@@ -156,3 +157,27 @@ EXPORT_SYMBOL(kmap); | |||
156 | EXPORT_SYMBOL(kunmap); | 157 | EXPORT_SYMBOL(kunmap); |
157 | EXPORT_SYMBOL(kmap_atomic); | 158 | EXPORT_SYMBOL(kmap_atomic); |
158 | EXPORT_SYMBOL(kunmap_atomic); | 159 | EXPORT_SYMBOL(kunmap_atomic); |
160 | |||
161 | void __init set_highmem_pages_init(void) | ||
162 | { | ||
163 | struct zone *zone; | ||
164 | int nid; | ||
165 | |||
166 | for_each_zone(zone) { | ||
167 | unsigned long zone_start_pfn, zone_end_pfn; | ||
168 | |||
169 | if (!is_highmem(zone)) | ||
170 | continue; | ||
171 | |||
172 | zone_start_pfn = zone->zone_start_pfn; | ||
173 | zone_end_pfn = zone_start_pfn + zone->spanned_pages; | ||
174 | |||
175 | nid = zone_to_nid(zone); | ||
176 | printk(KERN_INFO "Initializing %s for node %d (%08lx:%08lx)\n", | ||
177 | zone->name, nid, zone_start_pfn, zone_end_pfn); | ||
178 | |||
179 | add_highpages_with_active_regions(nid, zone_start_pfn, | ||
180 | zone_end_pfn); | ||
181 | } | ||
182 | totalram_pages += totalhigh_pages; | ||
183 | } | ||