aboutsummaryrefslogtreecommitdiff
path: root/arch/powerpc/mm/lmb.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/mm/lmb.c')
-rw-r--r--arch/powerpc/mm/lmb.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/powerpc/mm/lmb.c b/arch/powerpc/mm/lmb.c
index 8f4d2dc4caf..4ce23bcf8a5 100644
--- a/arch/powerpc/mm/lmb.c
+++ b/arch/powerpc/mm/lmb.c
@@ -342,3 +342,16 @@ void __init lmb_enforce_memory_limit(unsigned long memory_limit)
}
}
}
+
+int __init lmb_is_reserved(unsigned long addr)
+{
+ int i;
+
+ for (i = 0; i < lmb.reserved.cnt; i++) {
+ unsigned long upper = lmb.reserved.region[i].base +
+ lmb.reserved.region[i].size - 1;
+ if ((addr >= lmb.reserved.region[i].base) && (addr <= upper))
+ return 1;
+ }
+ return 0;
+}