[RFC PATCH 0/9] powerpc/mm: Restructure Linux PTE on Book3S/64 to radix format

Paul Mackerras paulus at samba.org
Sat Feb 20 17:12:31 AEDT 2016


This patch series modifies the Linux PTE format used on 64-bit Book3S
processors (i.e. POWER server processors) to make the bits line up
with the PTE format used in the radix trees defined in PowerISA v3.0.
This will reduce the amount of further change required to make a
kernel that can run with either a radix MMU or a hashed page table
(HPT) MMU.

This also changes the upper levels of the tree to use real addresses
rather than kernel virtual addresses - that is, we no longer have the
0xc000... at the top of each PGD/PUD/PMD entry.  I made this change
for all 64-bit machines, both embedded and server.

The patch series is against v4.5-rc4 plus Aneesh's "powerpc/mm/hash:
Clear the invalid slot information correctly" patch.

I have compiled this for all the defconfigs in the tree, without
error.  I have tested this, with the fixes branch of the powerpc tree
merged in, both running bare-metal on a POWER8 and in a KVM guest on
that POWER8 system.  In the guest I tested both 4k and 64k configs,
with THP enabled; in the host I tested with 64k page size and THP
enabled.  All these tests ran fine, including running a KVM guest on
the bare-metal system.  So far I have done kernel compiles in a loop
as the test, but I plan to run LTP and possibly some other tests.

Comments welcome.

Paul.

 arch/powerpc/include/asm/book3s/64/hash-4k.h    |  5 ++-
 arch/powerpc/include/asm/book3s/64/hash-64k.h   | 24 ++++++-----
 arch/powerpc/include/asm/book3s/64/hash.h       | 54 ++++++++++++-------------
 arch/powerpc/include/asm/book3s/64/pgtable.h    |  6 +--
 arch/powerpc/include/asm/nohash/64/pgtable-4k.h |  2 +-
 arch/powerpc/include/asm/nohash/64/pgtable.h    | 10 ++---
 arch/powerpc/include/asm/pgalloc-64.h           | 16 ++++----
 arch/powerpc/mm/hash64_64k.c                    |  3 +-
 arch/powerpc/mm/hash_utils_64.c                 | 10 ++---
 arch/powerpc/mm/hugetlbpage-hash64.c            |  5 ++-
 arch/powerpc/mm/mmu_decl.h                      |  2 +-
 arch/powerpc/mm/pgtable_64.c                    |  4 +-
 12 files changed, 71 insertions(+), 70 deletions(-)


More information about the Linuxppc-dev mailing list