summaryrefslogtreecommitdiffstats
path: root/arch/arm/mm/mmu.c
diff options
context:
space:
mode:
authorNicolas Pitre2011-09-16 07:14:23 +0200
committerNicolas Pitre2011-11-27 01:21:28 +0100
commit576d2f2525612ecb5af029a76f21f22a3b82563d (patch)
tree81f9564c432ceeb4068dd3a5de204134a32c98f3 /arch/arm/mm/mmu.c
parentARM: simplify __iounmap() when dealing with section based mapping (diff)
downloadkernel-qcow2-linux-576d2f2525612ecb5af029a76f21f22a3b82563d.tar.gz
kernel-qcow2-linux-576d2f2525612ecb5af029a76f21f22a3b82563d.tar.xz
kernel-qcow2-linux-576d2f2525612ecb5af029a76f21f22a3b82563d.zip
ARM: add generic ioremap optimization by reusing static mappings
Now that we have all the static mappings from iotable_init() located in the vmalloc area, it is trivial to optimize ioremap by reusing those static mappings when the requested physical area fits in one of them, and so in a generic way for all platforms. Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org> Tested-by: Stephen Warren <swarren@nvidia.com> Tested-by: Kevin Hilman <khilman@ti.com> Tested-by: Jamie Iles <jamie@jamieiles.com>
Diffstat (limited to 'arch/arm/mm/mmu.c')
-rw-r--r--arch/arm/mm/mmu.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c
index c61481577ae1..27e366af67f9 100644
--- a/arch/arm/mm/mmu.c
+++ b/arch/arm/mm/mmu.c
@@ -749,7 +749,8 @@ void __init iotable_init(struct map_desc *io_desc, int nr)
vm->addr = (void *)(md->virtual & PAGE_MASK);
vm->size = PAGE_ALIGN(md->length + (md->virtual & ~PAGE_MASK));
vm->phys_addr = __pfn_to_phys(md->pfn);
- vm->flags = VM_IOREMAP;
+ vm->flags = VM_IOREMAP | VM_ARM_STATIC_MAPPING;
+ vm->flags |= VM_ARM_MTYPE(md->type);
vm->caller = iotable_init;
vm_area_add_early(vm++);
}