diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-26 18:12:47 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-26 18:12:47 -0500 |
commit | 5376071069ec8a7e6a8112beab16fc24f5139475 (patch) | |
tree | 81f90d6839b606d907a449d8d83b839ef829f7b0 /arch/arm/mm/ioremap.c | |
parent | cfb901bf84fe22eb86525e9fb20675b53fb0462a (diff) | |
parent | 24f11ec001920f1cfaeeed8e8b55725d900bbb56 (diff) |
Merge master.kernel.org:/home/rmk/linux-2.6-arm
* master.kernel.org:/home/rmk/linux-2.6-arm: (22 commits)
[ARM] fix section-based ioremap
[NET] am79c961a: fix spin_lock usage
[ARM] omap: usb: thou shalt not provide empty release functions
[ARM] omap: watchdog: allow OMAP watchdog driver on OMAP34xx platforms
[ARM] 5369/1: omap mmc: Add new omap hsmmc controller for 2430 and 34xx, v3
[ARM] clkdev: fix clock matching
[ARM] 5370/1: at91: fix rm9200 watchdog
[ARM] 5368/1: arch/arm/mach-davinci/usb.c buildfix
[ARM] 5365/1: s3cmci: Use new include path of dma.h
[ARM] fix StrongARM-11x0 page copy implementation
[ARM] omap: ensure OMAP drivers pass a struct device to clk_get()
ARM: OMAP: Fix compile for h3 MMC
ARM: OMAP: Remove unused platform devices, v3
ARM: OMAP: Fix ASoC by enabling writes to XCCR and RCCR McBSP registers, v3
ARM: OMAP: Fix OSK ASoC by registering I2C board info for tlvaic23
ARM: OMAP: remove duplicated #include's
ARM: OMAP: Fix DMA CCR programming for request line > 63, v3
ARM: OMAP: Fix gpio.c compile on 15xx with CONFIG_DEBUGFS
ARM: OMAP: Fix compile for beagle
ARM: OMAP: Fix gpio by switching to generic gpio calls, v2
...
Diffstat (limited to 'arch/arm/mm/ioremap.c')
-rw-r--r-- | arch/arm/mm/ioremap.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/arch/arm/mm/ioremap.c b/arch/arm/mm/ioremap.c index 18373f73f2fc..9f88dd3be601 100644 --- a/arch/arm/mm/ioremap.c +++ b/arch/arm/mm/ioremap.c | |||
@@ -138,7 +138,7 @@ void __check_kvm_seq(struct mm_struct *mm) | |||
138 | */ | 138 | */ |
139 | static void unmap_area_sections(unsigned long virt, unsigned long size) | 139 | static void unmap_area_sections(unsigned long virt, unsigned long size) |
140 | { | 140 | { |
141 | unsigned long addr = virt, end = virt + (size & ~SZ_1M); | 141 | unsigned long addr = virt, end = virt + (size & ~(SZ_1M - 1)); |
142 | pgd_t *pgd; | 142 | pgd_t *pgd; |
143 | 143 | ||
144 | flush_cache_vunmap(addr, end); | 144 | flush_cache_vunmap(addr, end); |
@@ -337,10 +337,7 @@ void __iounmap(volatile void __iomem *io_addr) | |||
337 | void *addr = (void *)(PAGE_MASK & (unsigned long)io_addr); | 337 | void *addr = (void *)(PAGE_MASK & (unsigned long)io_addr); |
338 | #ifndef CONFIG_SMP | 338 | #ifndef CONFIG_SMP |
339 | struct vm_struct **p, *tmp; | 339 | struct vm_struct **p, *tmp; |
340 | #endif | ||
341 | unsigned int section_mapping = 0; | ||
342 | 340 | ||
343 | #ifndef CONFIG_SMP | ||
344 | /* | 341 | /* |
345 | * If this is a section based mapping we need to handle it | 342 | * If this is a section based mapping we need to handle it |
346 | * specially as the VM subsystem does not know how to handle | 343 | * specially as the VM subsystem does not know how to handle |
@@ -352,11 +349,8 @@ void __iounmap(volatile void __iomem *io_addr) | |||
352 | for (p = &vmlist ; (tmp = *p) ; p = &tmp->next) { | 349 | for (p = &vmlist ; (tmp = *p) ; p = &tmp->next) { |
353 | if ((tmp->flags & VM_IOREMAP) && (tmp->addr == addr)) { | 350 | if ((tmp->flags & VM_IOREMAP) && (tmp->addr == addr)) { |
354 | if (tmp->flags & VM_ARM_SECTION_MAPPING) { | 351 | if (tmp->flags & VM_ARM_SECTION_MAPPING) { |
355 | *p = tmp->next; | ||
356 | unmap_area_sections((unsigned long)tmp->addr, | 352 | unmap_area_sections((unsigned long)tmp->addr, |
357 | tmp->size); | 353 | tmp->size); |
358 | kfree(tmp); | ||
359 | section_mapping = 1; | ||
360 | } | 354 | } |
361 | break; | 355 | break; |
362 | } | 356 | } |
@@ -364,7 +358,6 @@ void __iounmap(volatile void __iomem *io_addr) | |||
364 | write_unlock(&vmlist_lock); | 358 | write_unlock(&vmlist_lock); |
365 | #endif | 359 | #endif |
366 | 360 | ||
367 | if (!section_mapping) | 361 | vunmap(addr); |
368 | vunmap(addr); | ||
369 | } | 362 | } |
370 | EXPORT_SYMBOL(__iounmap); | 363 | EXPORT_SYMBOL(__iounmap); |