diff options
author | Albert Herranz <albert_herranz@yahoo.es> | 2009-12-12 06:31:54 +0000 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2009-12-12 22:24:32 -0700 |
commit | c5df7f775148723de39274537a886e9502eef336 (patch) | |
tree | 548acbcef58b1d60308f7e7cd894d514583895a2 /lib | |
parent | de32400dd26e743c5d500aa42d8d6818b79edb73 (diff) | |
download | kernel-crypto-c5df7f775148723de39274537a886e9502eef336.tar.gz kernel-crypto-c5df7f775148723de39274537a886e9502eef336.tar.xz kernel-crypto-c5df7f775148723de39274537a886e9502eef336.zip |
powerpc: allow ioremap within reserved memory regions
Add a flag to let a platform ioremap memory regions marked as reserved.
This flag will be used later by the Nintendo Wii support code to allow
ioremapping the I/O region sitting between MEM1 and MEM2 and marked
as reserved RAM in the patch "wii: use both mem1 and mem2 as ram".
This will no longer be needed when proper discontig memory support
for 32-bit PowerPC is added to the kernel.
Signed-off-by: Albert Herranz <albert_herranz@yahoo.es>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/lmb.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/lmb.c b/lib/lmb.c index 0343c05609f..9cee17142b2 100644 --- a/lib/lmb.c +++ b/lib/lmb.c @@ -263,7 +263,7 @@ long __init lmb_reserve(u64 base, u64 size) return lmb_add_region(_rgn, base, size); } -long __init lmb_overlaps_region(struct lmb_region *rgn, u64 base, u64 size) +long lmb_overlaps_region(struct lmb_region *rgn, u64 base, u64 size) { unsigned long i; @@ -493,6 +493,11 @@ int __init lmb_is_reserved(u64 addr) return 0; } +int lmb_is_region_reserved(u64 base, u64 size) +{ + return lmb_overlaps_region(&lmb.reserved, base, size); +} + /* * Given a <base, len>, find which memory regions belong to this range. * Adjust the request and return a contiguous chunk. |