Merge tag 'ixp4xx-arm-soc-v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux-2.6-microblaze.git] / arch / arc / mm / ioremap.c
index fac4adc..95c649f 100644 (file)
@@ -53,9 +53,10 @@ EXPORT_SYMBOL(ioremap);
 void __iomem *ioremap_prot(phys_addr_t paddr, unsigned long size,
                           unsigned long flags)
 {
+       unsigned int off;
        unsigned long vaddr;
        struct vm_struct *area;
-       phys_addr_t off, end;
+       phys_addr_t end;
        pgprot_t prot = __pgprot(flags);
 
        /* Don't allow wraparound, zero size */
@@ -72,7 +73,7 @@ void __iomem *ioremap_prot(phys_addr_t paddr, unsigned long size,
 
        /* Mappings have to be page-aligned */
        off = paddr & ~PAGE_MASK;
-       paddr &= PAGE_MASK;
+       paddr &= PAGE_MASK_PHYS;
        size = PAGE_ALIGN(end + 1) - paddr;
 
        /*