lkml.org 
[lkml]   [2019]   [Sep]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v3 2/2] powerpc/83xx: map IMMR with a BAT.
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@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@buserror.net>

-Scott


\
 
 \ /
  Last update: 2019-09-16 22:36    [W:0.709 / U:0.328 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site