瀏覽代碼

[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 <hskinnemoen@atmel.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Haavard Skinnemoen 18 年之前
父節點
當前提交
bee8ce809f
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      arch/avr32/mm/ioremap.c

+ 2 - 0
arch/avr32/mm/ioremap.c

@@ -77,6 +77,8 @@ void __iounmap(void __iomem *addr)
 
 
 	if ((unsigned long)addr >= P4SEG)
 	if ((unsigned long)addr >= P4SEG)
 		return;
 		return;
+	if (PXSEG(addr) == P2SEG)
+		return;
 
 
 	p = remove_vm_area((void *)(PAGE_MASK & (unsigned long __force)addr));
 	p = remove_vm_area((void *)(PAGE_MASK & (unsigned long __force)addr));
 	if (unlikely(!p)) {
 	if (unlikely(!p)) {