]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
powerpc/mm: Wire up ioremap_cache()
authorOliver O'Halloran <oohall@gmail.com>
Tue, 11 Apr 2017 17:42:31 +0000 (03:42 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Fri, 21 Apr 2017 11:08:47 +0000 (21:08 +1000)
The default implementation of ioremap_cache() is aliased to ioremap().
On powerpc ioremap() creates cache-inhibited mappings by default which
is almost certainly not what you wanted.

Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/include/asm/io.h

index c398e86cd1ccfc15afeb75da1712269ae1549117..422f99cf992487a5f7660ff96defdb94ee581c38 100644 (file)
@@ -759,6 +759,8 @@ extern void __iomem *ioremap_prot(phys_addr_t address, unsigned long size,
 extern void __iomem *ioremap_wc(phys_addr_t address, unsigned long size);
 #define ioremap_nocache(addr, size)    ioremap((addr), (size))
 #define ioremap_uc(addr, size)         ioremap((addr), (size))
+#define ioremap_cache(addr, size) \
+       ioremap_prot((addr), (size), pgprot_val(PAGE_KERNEL))
 
 extern void iounmap(volatile void __iomem *addr);