From: Haavard Skinnemoen Date: Tue, 24 Oct 2006 08:12:41 +0000 (+0200) Subject: [PATCH] AVR32: Don't try to iounmap P2 segment addresses X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=bee8ce809fb1c877388be032b468574a1cfff9ef;p=linux-beck.git [PATCH] AVR32: Don't try to iounmap P2 segment addresses While ioremap() will happily map a physical address through the P2 (uncached) segment when appropriate, iounmap() doesn't know how to handle those mappings. This patch makes iounmap() do the right thing, i.e. nothing, for such mappings. Signed-off-by: Haavard Skinnemoen Signed-off-by: Linus Torvalds --- diff --git a/arch/avr32/mm/ioremap.c b/arch/avr32/mm/ioremap.c index 8cfec65e37f7..3437c82434ac 100644 --- a/arch/avr32/mm/ioremap.c +++ b/arch/avr32/mm/ioremap.c @@ -77,6 +77,8 @@ void __iounmap(void __iomem *addr) if ((unsigned long)addr >= P4SEG) return; + if (PXSEG(addr) == P2SEG) + return; p = remove_vm_area((void *)(PAGE_MASK & (unsigned long __force)addr)); if (unlikely(!p)) {