Thread (4 messages) 4 messages, 3 authors, 2019-11-25

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

From: Scott Wood <oss@buserror.net>
Date: 2019-09-16 20:36:36
Also in: lkml

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 <redacted>

---
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

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help