]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/arm/mm/ioremap.c
Merge branch 'bkl-removal' of git://git.lwn.net/linux-2.6
[linux-2.6-omap-h63xx.git] / arch / arm / mm / ioremap.c
index b81dbf9ffb77b3f28a9b0ad872341fdad3656ca6..18373f73f2fc4a65c460db459cd061beea9c55b0 100644 (file)
 #include <linux/errno.h>
 #include <linux/mm.h>
 #include <linux/vmalloc.h>
+#include <linux/io.h>
 
+#include <asm/cputype.h>
 #include <asm/cacheflush.h>
-#include <asm/io.h>
 #include <asm/mmu_context.h>
 #include <asm/pgalloc.h>
 #include <asm/tlbflush.h>
@@ -55,8 +56,7 @@ static int remap_area_pte(pmd_t *pmd, unsigned long addr, unsigned long end,
                if (!pte_none(*pte))
                        goto bad;
 
-               set_pte_ext(pte, pfn_pte(phys_addr >> PAGE_SHIFT, prot),
-                           type->prot_pte_ext);
+               set_pte_ext(pte, pfn_pte(phys_addr >> PAGE_SHIFT, prot), 0);
                phys_addr += PAGE_SIZE;
        } while (pte++, addr += PAGE_SIZE, addr != end);
        return 0;
@@ -332,15 +332,14 @@ __arm_ioremap(unsigned long phys_addr, size_t size, unsigned int mtype)
 }
 EXPORT_SYMBOL(__arm_ioremap);
 
-void __iounmap(volatile void __iomem *addr)
+void __iounmap(volatile void __iomem *io_addr)
 {
+       void *addr = (void *)(PAGE_MASK & (unsigned long)io_addr);
 #ifndef CONFIG_SMP
        struct vm_struct **p, *tmp;
 #endif
        unsigned int section_mapping = 0;
 
-       addr = (volatile void __iomem *)(PAGE_MASK & (unsigned long)addr);
-
 #ifndef CONFIG_SMP
        /*
         * If this is a section based mapping we need to handle it
@@ -351,7 +350,7 @@ void __iounmap(volatile void __iomem *addr)
         */
        write_lock(&vmlist_lock);
        for (p = &vmlist ; (tmp = *p) ; p = &tmp->next) {
-               if((tmp->flags & VM_IOREMAP) && (tmp->addr == addr)) {
+               if ((tmp->flags & VM_IOREMAP) && (tmp->addr == addr)) {
                        if (tmp->flags & VM_ARM_SECTION_MAPPING) {
                                *p = tmp->next;
                                unmap_area_sections((unsigned long)tmp->addr,
@@ -366,6 +365,6 @@ void __iounmap(volatile void __iomem *addr)
 #endif
 
        if (!section_mapping)
-               vunmap((void __force *)addr);
+               vunmap(addr);
 }
 EXPORT_SYMBOL(__iounmap);