summaryrefslogtreecommitdiff
path: root/mm/mmzone.c
diff options
context:
space:
mode:
authorPekka Enberg <penberg@cs.helsinki.fi>2009-06-13 21:49:12 +0300
committerPekka Enberg <penberg@cs.helsinki.fi>2009-06-13 21:49:12 +0300
commitfe377e8fb3f67d66590e41e99cd6e207d585f7dd (patch)
treeaef88767bd67100120fce449f9b21da433865969 /mm/mmzone.c
parent946524efb4912687b6e02e831b5fbedc4c9395c0 (diff)
parentf3ad116588151b3371ae4e092290e4f48e62b8bb (diff)
Merge commit 'linus/master' into topic/slqb/core
Conflicts: lib/Kconfig.debug
Diffstat (limited to 'mm/mmzone.c')
-rw-r--r--mm/mmzone.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/mm/mmzone.c b/mm/mmzone.c
index 16ce8b955dcf..f5b7d1760213 100644
--- a/mm/mmzone.c
+++ b/mm/mmzone.c
@@ -6,6 +6,7 @@
#include <linux/stddef.h>
+#include <linux/mm.h>
#include <linux/mmzone.h>
#include <linux/module.h>
@@ -72,3 +73,17 @@ struct zoneref *next_zones_zonelist(struct zoneref *z,
*zone = zonelist_zone(z);
return z;
}
+
+#ifdef CONFIG_ARCH_HAS_HOLES_MEMORYMODEL
+int memmap_valid_within(unsigned long pfn,
+ struct page *page, struct zone *zone)
+{
+ if (page_to_pfn(page) != pfn)
+ return 0;
+
+ if (page_zone(page) != zone)
+ return 0;
+
+ return 1;
+}
+#endif /* CONFIG_ARCH_HAS_HOLES_MEMORYMODEL */