powerpc/mm: rework io-workaround invocation.
authorChristophe Leroy <christophe.leroy@c-s.fr>
Tue, 20 Aug 2019 14:07:13 +0000 (14:07 +0000)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 27 Aug 2019 03:03:34 +0000 (13:03 +1000)
commit14b4d97669b79d1ac83e64d6795098394e15ab1b
treebec178156921fb5c0aabe6801b9d0eacd8ba4ee7
parent492643e81e58e7585cccb22c37814060e3f59268
powerpc/mm: rework io-workaround invocation.

ppc_md.ioremap() is only used for I/O workaround on CELL platform,
so indirect function call can be avoided.

This patch reworks the io-workaround and ioremap() functions to
use the global 'io_workaround_inited' flag for the activation
of io-workaround.

When CONFIG_PPC_IO_WORKAROUNDS or CONFIG_PPC_INDIRECT_MMIO are not
selected, the I/O workaround ioremap() voids and the global flag is
not used.

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/5fa3ef069fbd0f152512afaae19e7a60161454cf.1566309262.git.christophe.leroy@c-s.fr
arch/powerpc/include/asm/io-workarounds.h
arch/powerpc/include/asm/machdep.h
arch/powerpc/kernel/io-workarounds.c
arch/powerpc/mm/pgtable_64.c