Merge branch 'master' of /home/cbou/linux-2.6
[pandora-kernel.git] / arch / avr32 / mm / ioremap.c
index 8cfec65..f03b79f 100644 (file)
@@ -6,6 +6,7 @@
  * published by the Free Software Foundation.
  */
 #include <linux/vmalloc.h>
+#include <linux/mm.h>
 #include <linux/module.h>
 #include <linux/io.h>
 
@@ -77,6 +78,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)) {