Skip to content

Commit

Permalink
sh: Handle unmapping of fixed slots transparently in iounmap().
Browse files Browse the repository at this point in the history
iounmap() should balance whatever is done by ioremap(). Presently
ioremap() can do any of fixed mappings, PMB mappings, or page table
mappings. Presently only the latter two are handled through the standard
unmap path, so tie in the fixed unmapping, too.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
  • Loading branch information
Paul Mundt committed Jan 18, 2010
1 parent 4f744af commit 12b6b01
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions arch/sh/mm/ioremap.c
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,12 @@ void __iounmap(void __iomem *addr)
if (iomapping_nontranslatable(vaddr))
return;

/*
* There's no VMA if it's from an early fixed mapping.
*/
if (iounmap_fixed(addr) == 0)
return;

#ifdef CONFIG_PMB
/*
* Purge any PMB entries that may have been established for this
Expand Down

0 comments on commit 12b6b01

Please sign in to comment.