aboutsummaryrefslogtreecommitdiff
path: root/mm/mmzone.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-06-01 10:01:03 +0200
committerIngo Molnar <mingo@elte.hu>2009-06-01 10:01:39 +0200
commit23db9f430be9325a861c7762c1ffadad9ca528a8 (patch)
tree1ebb681611c96f17aa4f96e28d6923824a8b210f /mm/mmzone.c
parent27b9613b7be39412775d0ab80f57229aa73bb07d (diff)
parent3218911f839b6c85acbf872ad264ea69aa4d89ad (diff)
Merge branch 'linus' into perfcounters/core
Merge reason: merge almost-rc8 into perfcounters/core, which was -rc6 based - to pick up the latest upstream fixes. Signed-off-by: Ingo Molnar <mingo@elte.hu>
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 16ce8b955dc..f5b7d176021 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 */