]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/83xx: map IMMR with a BAT.
authorChristophe Leroy <christophe.leroy@c-s.fr>
Mon, 16 Sep 2019 20:25:41 +0000 (20:25 +0000)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 19 Nov 2019 08:38:38 +0000 (19:38 +1100)
commitac0e155b7d378f6398297ed2872e4da026d46536
tree36e017559f98dbdb97fd1270cd310e8bf011efc9
parent1f51cf17771484a76d755603598f458a4b69fec7
powerpc/83xx: map IMMR with a BAT.

On mpc83xx with a QE, IMMR is 2Mbytes and aligned on 2Mbytes boundarie.
On mpc83xx without a QE, IMMR is 1Mbyte and 1Mbyte aligned.

Each driver will map a part of it to access the registers it needs.
Some drivers will map the same part of IMMR as other drivers.

In order to reduce TLB misses, map the full IMMR with a BAT. If it is
2Mbytes aligned, map 2Mbytes. If there is no QE, the upper part will
remain unused, but it doesn't harm as it is mapped as guarded memory.

When the IMMR is not aligned on a 2Mbytes boundarie, only map 1Mbyte.

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Acked-by: Scott Wood <oss@buserror.net>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/269a00951328fb6fa1be2fa3cbc76c19745019b7.1568665466.git.christophe.leroy@c-s.fr
arch/powerpc/include/asm/fixmap.h
arch/powerpc/platforms/83xx/misc.c