Message ID | 20170411174233.21902-8-oohall@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Tue, 2017-04-11 at 17:42:31 UTC, Oliver O'Halloran wrote: > 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> Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/f855b2f544d664cfa3055edb7ffd20 cheers
diff --git a/arch/powerpc/include/asm/io.h b/arch/powerpc/include/asm/io.h index 5ed292431b5b..839eb031857f 100644 --- a/arch/powerpc/include/asm/io.h +++ b/arch/powerpc/include/asm/io.h @@ -757,6 +757,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);
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> --- arch/powerpc/include/asm/io.h | 2 ++ 1 file changed, 2 insertions(+)