summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/mm/lmb.c
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2008-01-24 15:29:14 +1100
committerPaul Mackerras <paulus@samba.org>2008-01-24 15:29:14 +1100
commitdcb571be2019ae677bc5ed64437dbc87ae1eb67f (patch)
tree1b93f9ea3568be4dcc49ffb2adc0d3ab0a02b47f /arch/powerpc/mm/lmb.c
parent9156ad48338e0306e508ead5c0d9986050744475 (diff)
parent96f39c1718091d63dc1c5012d566737ea0d2a20c (diff)
downloadkernel-crypto-dcb571be2019ae677bc5ed64437dbc87ae1eb67f.tar.gz
kernel-crypto-dcb571be2019ae677bc5ed64437dbc87ae1eb67f.tar.xz
kernel-crypto-dcb571be2019ae677bc5ed64437dbc87ae1eb67f.zip
Merge branch 'for-2.6.25' of master.kernel.org:/pub/scm/linux/kernel/git/galak/powerpc into for-2.6.25
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;
+}