Skip to content

Optimise TLB miss handlers on 6xx (603/e300)

Christophe Leroy linuxppc-dev lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest10 patches 5 repliesIn review
  2. v110 patches 2 repliesApplied

Changes in v2 from the cover letter

- Added a patch which frees SPRN_SPRG2 by saving RTAS entry stack pointer in the thread struct, allowing to use it for storing the PGDIR for all 6xx.
- Now using SPRN_SPRG2 for storing the PGDIR instead of SPRN_SPRG5. This allows the old 6xx having only 4 SPRGs to also get the benefit of this change.
- Removed the last patch of the series which was reordering the _PAGE_FLAGS bits because it fails on hash 6xx. Will be re-added later once fixed.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/10powerpc: simplify BDI switcharch/powerpc/include/asm/mmu.h arch/powerpc/kernel/head_32.S arch/powerpc/kernel/head_40x.S +2 more+9 -111 reply
2/10powerpc/6xx: Don't use SPRN_SPRG2 for storing stack pointer while in RTASarch/powerpc/include/asm/processor.h arch/powerpc/include/asm/reg.h arch/powerpc/kernel/asm-offsets.c +2 more+21 -130 replies
3/10powerpc/6xx: Store PGDIR physical address in a SPRGarch/powerpc/include/asm/reg.h arch/powerpc/kernel/cpu_setup_6xx.S arch/powerpc/kernel/head_32.S +1 more+18 -154 replies
4/10powerpc/603: use physical address directly in TLB miss handlers.arch/powerpc/kernel/head_32.S+6 -90 replies
5/10powerpc/hash32: use physical address directly in hash handlers.arch/powerpc/mm/hash_low_32.S arch/powerpc/mm/ppc_mmu_32.c+31 -370 replies
6/10powerpc/603: Don't handle kernel page TLB misses when not needarch/powerpc/kernel/head_32.S+4 -00 replies
7/10powerpc/603: Don't handle _PAGE_RW and _PAGE_DIRTY on ITLB missesarch/powerpc/kernel/head_32.S+2 -60 replies
8/10powerpc/603: let's handle PAGE_DIRTY directlyarch/powerpc/kernel/head_32.S+2 -40 replies
9/10powerpc/603: Don't worry about _PAGE_USER in TLB miss handlersarch/powerpc/kernel/head_32.S+3 -90 replies
10/10powerpc/603: don't handle PAGE_ACCESSED in TLB miss handlers.arch/powerpc/kernel/head_32.S+13 -110 replies

Reviews trailers per patch

None of the 10 patches has a Reviewed-by or Acked-by.

PatchGuenter Roeck
1/10
2/10
3/10T-b
4/10
5/10
6/10
7/10
8/10
9/10
10/10

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 00/10] Optimise TLB miss handlers on 6xx (603/e300)

The main purpose of this series is to optimise the handling of TLB misses on the 603/e300.

Today the TLB miss handlers are implemented by more or less copying the actions performed by the hash page handlers used on processors having HASH pagetable.

This series brings some simplification.

It also improves TLB misses on all 6xx by storing the PGDIR phys address in an SPRG instead of reading it from thread struct.

v2:
- Added a patch which frees SPRN_SPRG2 by saving RTAS entry stack pointer in the thread struct, allowing to use it for storing the PGDIR for all 6xx.
- Now using SPRN_SPRG2 for storing the PGDIR instead of SPRN_SPRG5. This allows the old 6xx having only 4 SPRGs to also get the benefit of this change.
- Removed the last patch of the series which was reordering the _PAGE_FLAGS bits because it fails on hash 6xx. Will be re-added later once fixed.

Christophe Leroy (10):
powerpc: simplify BDI switch
powerpc/6xx: Don't use SPRN_SPRG2 for storing stack pointer while in
RTAS
powerpc/6xx: Store PGDIR physical address in a SPRG powerpc/603: use physical address directly in TLB miss handlers. powerpc/hash32: use physical address directly in hash handlers. powerpc/603: Don't handle kernel page TLB misses when not need powerpc/603: Don't handle _PAGE_RW and _PAGE_DIRTY on ITLB misses powerpc/603: let's handle PAGE_DIRTY directly powerpc/603: Don't worry about _PAGE_USER in TLB miss handlers powerpc/603: don't handle PAGE_ACCESSED in TLB miss handlers.

 arch/powerpc/include/asm/mmu.h       |   2 +
 arch/powerpc/include/asm/processor.h |   3 +
 arch/powerpc/include/asm/reg.h       |   2 +-
 arch/powerpc/kernel/asm-offsets.c    |   3 +
 arch/powerpc/kernel/cpu_setup_6xx.S  |   4 ++
 arch/powerpc/kernel/entry_32.S       |   5 +-
 arch/powerpc/kernel/head_32.S        | 111 ++++++++++++++++-------------------
 arch/powerpc/kernel/head_40x.S       |   5 +-
 arch/powerpc/kernel/head_8xx.S       |   1 +
 arch/powerpc/mm/8xx_mmu.c            |   7 +--
 arch/powerpc/mm/hash_low_32.S        |  65 +++++++++-----------
 arch/powerpc/mm/ppc_mmu_32.c         |   6 +-
 12 files changed, 104 insertions(+), 110 deletions(-)
Signature · 1 line
2.13.3