Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

soc/fsl/qbman: use ioremap_cache() instead of ioremap_prot(0)

ioremap_prot() with flag set to 0 relies on a hack in
__ioremap_caller() which adds PAGE_KERNEL flags when the
handed flags don't look like a valid set of flags
(ie don't include _PAGE_PRESENT)

The intention being to map cached memory, use ioremap_cache() instead.

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>

authored by

Christophe Leroy and committed by
Michael Ellerman
402a5698 ed18e423

+1 -1
+1 -1
drivers/soc/fsl/qbman/qman_ccsr.c
··· 418 418 static int zero_priv_mem(phys_addr_t addr, size_t sz) 419 419 { 420 420 /* map as cacheable, non-guarded */ 421 - void __iomem *tmpp = ioremap_prot(addr, sz, 0); 421 + void __iomem *tmpp = ioremap_cache(addr, sz); 422 422 423 423 if (!tmpp) 424 424 return -ENOMEM;