Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 279882
b: refs/heads/master
c: 6ee723a
h: refs/heads/master
v: v3
  • Loading branch information
Nicolas Pitre authored and Nicolas Pitre committed Nov 27, 2011
1 parent 9e38be9 commit efb1005
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0536bdf33faff4d940ac094c77998cfac368cfff
refs/heads/master: 6ee723a6570a897208b76ab3e9a495e9106b2f8c
20 changes: 9 additions & 11 deletions trunk/arch/arm/mm/ioremap.c
Original file line number Diff line number Diff line change
Expand Up @@ -314,26 +314,24 @@ void __iounmap(volatile void __iomem *io_addr)
{
void *addr = (void *)(PAGE_MASK & (unsigned long)io_addr);
#ifndef CONFIG_SMP
struct vm_struct **p, *tmp;
struct vm_struct *vm;

/*
* If this is a section based mapping we need to handle it
* specially as the VM subsystem does not know how to handle
* such a beast. We need the lock here b/c we need to clear
* all the mappings before the area can be reclaimed
* by someone else.
* such a beast.
*/
write_lock(&vmlist_lock);
for (p = &vmlist ; (tmp = *p) ; p = &tmp->next) {
if ((tmp->flags & VM_IOREMAP) && (tmp->addr == addr)) {
if (tmp->flags & VM_ARM_SECTION_MAPPING) {
unmap_area_sections((unsigned long)tmp->addr,
tmp->size);
read_lock(&vmlist_lock);
for (vm = vmlist; vm; vm = vm->next) {
if ((vm->flags & VM_IOREMAP) && (vm->addr == addr)) {
if (vm->flags & VM_ARM_SECTION_MAPPING) {
unmap_area_sections((unsigned long)vm->addr,
vm->size);
}
break;
}
}
write_unlock(&vmlist_lock);
read_unlock(&vmlist_lock);
#endif

vunmap(addr);
Expand Down

0 comments on commit efb1005

Please sign in to comment.