From: Paul Mundt Date: Mon, 18 Jan 2010 12:33:08 +0000 (+0900) Subject: sh: Handle unmapping of fixed slots transparently in iounmap(). X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=12b6b01cb47dc3eefbef866592193661dad7afb9;p=mv-sheeva.git sh: Handle unmapping of fixed slots transparently in iounmap(). 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 --- diff --git a/arch/sh/mm/ioremap.c b/arch/sh/mm/ioremap.c index 24f6ba6bff7..e8b65f645ae 100644 --- a/arch/sh/mm/ioremap.c +++ b/arch/sh/mm/ioremap.c @@ -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