Skip to contentSkip to conversation

powerpc/8xx: Optimise MMU TLB handling and add support of 16k pages

PATCH Superseded Christophe Leroy 2 participants 2 messages Aug 29, 2014

v2 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

v2 cover powerpc/8xx: Optimise MMU TLB handling and add support of 16k pages

This patchset:
1) provides several MMU TLB handling optimisation on MPC8xx.
2) adds support of 16k pages on MPC8xx.
All changes have been successfully tested on a custom board equipped with MPC885

The two differences with first version of the patch are:
1) I removed the patch number 10, which was implementing a 16 bit alignment of the PGDIR. It is not worth potentially wasting up to 64k of memory just for removing one instruction (ori).
2) I managed to preserve r11 while calculating the level 2 address, therefore no more need to save r11 into CR.

 arch/powerpc/Kconfig                     |    2 +-
 arch/powerpc/include/asm/mmu-8xx.h       |    2 +
 arch/powerpc/include/asm/pgtable-ppc32.h |   21 ++
 arch/powerpc/include/asm/pte-8xx.h       |    7 +-
 arch/powerpc/include/asm/reg.h           |    3 +-
 arch/powerpc/kernel/head_8xx.S           |  342 +++++++++++-------------
 6 files changed, 187 insertions(+), 190 deletions(-)
#1 lore raw

Christophe Leroy <[email protected]> wrote on 2014/08/29 11:13:24:

Quoted 5 lines

This patchset:
1) provides several MMU TLB handling optimisation on MPC8xx.
2) adds support of 16k pages on MPC8xx.
All changes have been successfully tested on a custom board equipped

with MPC885

Quoted 3 lines

The two differences with first version of the patch are:
1) I removed the patch number 10, which was implementing a 16 bit

alignment of the

Quoted 1 line

PGDIR. It is not worth potentially wasting up to 64k of memory just for

removing one

Quoted 2 lines

instruction (ori).
2) I managed to preserve r11 while calculating the level 2 address,

therefore

Quoted 4 lines

no more need to save r11 into CR.

This looks good but I need to look harder, some minor critique though(already sent)

As you are optimizing I think the impl.of powerpc/8xx: Invalidate non present TLBs
in 2.4 is better than 3.x, compare:
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/arch/powerpc/mm/fault.c?id=5efab4a02c89c252fb4cce097aafde5f8208dbfe
with
https://git.kernel.org/cgit/linux/kernel/git/wtarreau/linux-2.4.git/commit/?id=da5c5609e86fb12061f2c05a6ddd80ffc46592b2

This will free the TLB before you jump to xxx_page_fault which might need a TLB before invalidation
and it isolates this 8xx quirk in 8xx specific code.

Jocke