[PATCH v3 2/2] powerpc/83xx: map IMMR with a BAT.

Scott Wood oss at buserror.net
Tue Sep 17 06:36:23 AEST 2019


On Mon, 2019-09-16 at 20:25 +0000, Christophe Leroy wrote:
> 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 at c-s.fr>
> 
> ---
> v2:
> - use a fixmap area instead of playing with ioremap_bot
> - always map 2M unless IMMRBAR is only 1M aligned
> 
> v3:
> - replaced __fix_to_virt() by fix_to_virt()
> ---
>  arch/powerpc/include/asm/fixmap.h  |  8 ++++++++
>  arch/powerpc/platforms/83xx/misc.c | 11 +++++++++++
>  2 files changed, 19 insertions(+)

Acked-by: Scott Wood <oss at buserror.net>

-Scott




More information about the Linuxppc-dev mailing list