linux_dsm_epyc7002/arch/powerpc
Christophe Leroy 55c8fc3f49 powerpc/8xx: reintroduce 16K pages with HW assistance
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.

In order to use hardware assistance with 16K pages, this patch does
the following modifications:
- Make PGD size independent of the main page size
- In 16k pages mode, redefine pte_t as a struct with 4 elements,
and populate those 4 elements in __set_pte_at() and pte_update()
- Adapt the size of the hugepage tables.
- Define a PTE_FRAGMENT_NB so that a 16k page contains 4 page tables.

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/8xx: reintroduce 16K pages with HW assistance 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: Enable 512k hugepage support with HW assistance 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: reintroduce 16K pages with HW assistance 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