linux/arch/powerpc
Christophe Leroy 6a8f911b50 powerpc/8xx: Use hardware assistance in TLB handlers
Today, on the 8xx the TLB handlers do SW tablewalk by doing all
the calculation in ASM, in order to match with the Linux page
table structure.

The 8xx offers hardware assistance which allows significant size
reduction of the TLB handlers, hence also reduces the time spent
in the handlers.

However, using this HW assistance implies some constraints on the
page table structure:
- Regardless of the main page size used (4k or 16k), the
level 1 table (PGD) contains 1024 entries and each PGD entry covers
a 4Mbytes area which is managed by a level 2 table (PTE) containing
also 1024 entries each describing a 4k page.
- 16k pages require 4 identifical entries in the L2 table
- 512k pages PTE have to be spread every 128 bytes in the L2 table
- 8M pages PTE are at the address pointed by the L1 entry and each
8M page require 2 identical entries in the PGD.

This patch modifies the TLB handlers to use HW assistance for 4K PAGES.

Before that patch, the mean time spent in TLB miss handlers is:
- ITLB miss: 80 ticks
- DTLB miss: 62 ticks
After that patch, the mean time spent in TLB miss handlers is:
- ITLB miss: 72 ticks
- DTLB miss: 54 ticks
So the improvement is 10% for ITLB and 13% for DTLB misses

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2018-12-04 19:45:01 +11:00
..
boot powerpc fixes for 4.20 #2 2018-11-02 09:19:35 -07:00
configs powerpc/configs: Add KVM guest defconfig 2018-11-26 22:33:37 +11:00
crypto powerpc updates for 4.19 2018-08-17 11:32:50 -07:00
include powerpc/mm: fix a warning when a cache is common to PGD and hugepages 2018-12-04 19:45:01 +11:00
kernel powerpc/8xx: Use hardware assistance in TLB handlers 2018-12-04 19:45:01 +11:00
kvm powerpc/mm: move platform specific mmu-xxx.h in platform directories 2018-12-04 19:45:01 +11:00
lib powerpc/lib: Declare static methods 2018-11-25 17:11:21 +11:00
math-emu License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mm powerpc/8xx: Use hardware assistance in TLB handlers 2018-12-04 19:45:01 +11:00
net powerpc updates for 4.19 2018-08-17 11:32:50 -07:00
oprofile powerpc: change CONFIG_6xx to CONFIG_PPC_BOOK3S_32 2018-11-26 22:33:37 +11:00
perf powerpc/perf: Declare static identifier a such 2018-11-25 17:11:21 +11:00
platforms powerpc: annotate implicit fall throughs 2018-12-04 19:45:01 +11:00
purgatory powerpc updates for 4.19 2018-08-17 11:32:50 -07:00
sysdev powerpc: change CONFIG_6xx to CONFIG_PPC_BOOK3S_32 2018-11-26 22:33:37 +11:00
tools powerpc: Add a checkpatch wrapper with our preferred settings 2018-08-07 21:49:25 +10:00
xmon powerpc: annotate implicit fall throughs 2018-12-04 19:45:01 +11:00
Kbuild powerpc: Add -Werror at arch/powerpc level 2018-10-19 00:56:17 +11:00
Kconfig powerpc/8xx: Temporarily disable 16k pages and hugepages 2018-12-04 19:45:01 +11:00
Kconfig.debug powerpc: remove redundant 'default n' from Kconfig-s 2018-10-13 22:21:25 +11:00
Makefile powerpc: change CONFIG_6xx to CONFIG_PPC_BOOK3S_32 2018-11-26 22:33:37 +11:00
Makefile.postlink License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00