summaryrefslogtreecommitdiff
path: root/arch/x86/mm/highmem_32.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2009-03-29 01:40:34 -0700
committerDavid S. Miller <davem@davemloft.net>2009-03-29 01:40:34 -0700
commit13223cb02ccfa375f2d683d08d30db5b72264f1e (patch)
treed3fc7d803d22bbfe03b96cf0ba38041d42c8a1c2 /arch/x86/mm/highmem_32.c
parent1383bdb98c01bbd28d72336d1bf614ce79114d29 (diff)
parent07d43ba98621f08e252a48c96b258b4d572b0257 (diff)
downloadlinux-next-13223cb02ccfa375f2d683d08d30db5b72264f1e.tar.gz
Merge branch 'master' of /home/davem/src/GIT/linux-2.6/
Diffstat (limited to 'arch/x86/mm/highmem_32.c')
-rw-r--r--arch/x86/mm/highmem_32.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/arch/x86/mm/highmem_32.c b/arch/x86/mm/highmem_32.c
index bcc079c282dd..00f127c80b0e 100644
--- a/arch/x86/mm/highmem_32.c
+++ b/arch/x86/mm/highmem_32.c
@@ -1,5 +1,6 @@
#include <linux/highmem.h>
#include <linux/module.h>
+#include <linux/swap.h> /* for totalram_pages */
void *kmap(struct page *page)
{
@@ -156,3 +157,36 @@ EXPORT_SYMBOL(kmap);
EXPORT_SYMBOL(kunmap);
EXPORT_SYMBOL(kmap_atomic);
EXPORT_SYMBOL(kunmap_atomic);
+
+#ifdef CONFIG_NUMA
+void __init set_highmem_pages_init(void)
+{
+ struct zone *zone;
+ int nid;
+
+ for_each_zone(zone) {
+ unsigned long zone_start_pfn, zone_end_pfn;
+
+ if (!is_highmem(zone))
+ continue;
+
+ zone_start_pfn = zone->zone_start_pfn;
+ zone_end_pfn = zone_start_pfn + zone->spanned_pages;
+
+ nid = zone_to_nid(zone);
+ printk(KERN_INFO "Initializing %s for node %d (%08lx:%08lx)\n",
+ zone->name, nid, zone_start_pfn, zone_end_pfn);
+
+ add_highpages_with_active_regions(nid, zone_start_pfn,
+ zone_end_pfn);
+ }
+ totalram_pages += totalhigh_pages;
+}
+#else
+void __init set_highmem_pages_init(void)
+{
+ add_highpages_with_active_regions(0, highstart_pfn, highend_pfn);
+
+ totalram_pages += totalhigh_pages;
+}
+#endif /* CONFIG_NUMA */