diff options
Diffstat (limited to 'arch/arm/mm/ioremap.c')
-rw-r--r-- | arch/arm/mm/ioremap.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/arch/arm/mm/ioremap.c b/arch/arm/mm/ioremap.c index b81dbf9ffb77..8a41912ec7c5 100644 --- a/arch/arm/mm/ioremap.c +++ b/arch/arm/mm/ioremap.c | |||
@@ -24,9 +24,10 @@ | |||
24 | #include <linux/errno.h> | 24 | #include <linux/errno.h> |
25 | #include <linux/mm.h> | 25 | #include <linux/mm.h> |
26 | #include <linux/vmalloc.h> | 26 | #include <linux/vmalloc.h> |
27 | #include <linux/io.h> | ||
27 | 28 | ||
29 | #include <asm/cputype.h> | ||
28 | #include <asm/cacheflush.h> | 30 | #include <asm/cacheflush.h> |
29 | #include <asm/io.h> | ||
30 | #include <asm/mmu_context.h> | 31 | #include <asm/mmu_context.h> |
31 | #include <asm/pgalloc.h> | 32 | #include <asm/pgalloc.h> |
32 | #include <asm/tlbflush.h> | 33 | #include <asm/tlbflush.h> |
@@ -332,15 +333,14 @@ __arm_ioremap(unsigned long phys_addr, size_t size, unsigned int mtype) | |||
332 | } | 333 | } |
333 | EXPORT_SYMBOL(__arm_ioremap); | 334 | EXPORT_SYMBOL(__arm_ioremap); |
334 | 335 | ||
335 | void __iounmap(volatile void __iomem *addr) | 336 | void __iounmap(volatile void __iomem *io_addr) |
336 | { | 337 | { |
338 | void *addr = (void *)(PAGE_MASK & (unsigned long)io_addr); | ||
337 | #ifndef CONFIG_SMP | 339 | #ifndef CONFIG_SMP |
338 | struct vm_struct **p, *tmp; | 340 | struct vm_struct **p, *tmp; |
339 | #endif | 341 | #endif |
340 | unsigned int section_mapping = 0; | 342 | unsigned int section_mapping = 0; |
341 | 343 | ||
342 | addr = (volatile void __iomem *)(PAGE_MASK & (unsigned long)addr); | ||
343 | |||
344 | #ifndef CONFIG_SMP | 344 | #ifndef CONFIG_SMP |
345 | /* | 345 | /* |
346 | * If this is a section based mapping we need to handle it | 346 | * If this is a section based mapping we need to handle it |
@@ -351,7 +351,7 @@ void __iounmap(volatile void __iomem *addr) | |||
351 | */ | 351 | */ |
352 | write_lock(&vmlist_lock); | 352 | write_lock(&vmlist_lock); |
353 | for (p = &vmlist ; (tmp = *p) ; p = &tmp->next) { | 353 | for (p = &vmlist ; (tmp = *p) ; p = &tmp->next) { |
354 | if((tmp->flags & VM_IOREMAP) && (tmp->addr == addr)) { | 354 | if ((tmp->flags & VM_IOREMAP) && (tmp->addr == addr)) { |
355 | if (tmp->flags & VM_ARM_SECTION_MAPPING) { | 355 | if (tmp->flags & VM_ARM_SECTION_MAPPING) { |
356 | *p = tmp->next; | 356 | *p = tmp->next; |
357 | unmap_area_sections((unsigned long)tmp->addr, | 357 | unmap_area_sections((unsigned long)tmp->addr, |
@@ -366,6 +366,6 @@ void __iounmap(volatile void __iomem *addr) | |||
366 | #endif | 366 | #endif |
367 | 367 | ||
368 | if (!section_mapping) | 368 | if (!section_mapping) |
369 | vunmap((void __force *)addr); | 369 | vunmap(addr); |
370 | } | 370 | } |
371 | EXPORT_SYMBOL(__iounmap); | 371 | EXPORT_SYMBOL(__iounmap); |