Skip to content

Book3s abstraction in preparation for new MMU model

Aneesh Kumar K.V linuxppc-dev 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest18 patches 19 repliesIn review
  2. v330 patches 7 repliesSuperseded
  3. v229 patches 20 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v1 RFC33 patches11 repliesSuperseded

Changes in v4 from the cover letter

* rebase on top of PTE bits movement patch series
* Drop all the hash linux abstraction patches
* Keep only 4 level table and other code movement patches.

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/18powerp/mm: Update code commentsarch/powerpc/mm/hash64_4k.c arch/powerpc/mm/hash64_64k.c+3 -30 replies
2/18mm: Some arch may want to use HPAGE_PMD related values as variablesarch/powerpc/mm/pgtable_64.c include/linux/bug.h include/linux/huge_mm.h +1 more+30 -61 reply
3/18powerpc/mm: add _PAGE_HASHPTE similar to 4K hasharch/powerpc/mm/hash64_64k.c arch/powerpc/mm/hugepage-hash64.c arch/powerpc/mm/hugetlbpage-hash64.c+4 -42 replies
4/18powerpc/mm: Split pgtable types to separate headerarch/powerpc/include/asm/page.h arch/powerpc/include/asm/pgtable-types.h+109 -1032 replies
5/18powerpc/mm: Don't have conditional defines for real_pte_tarch/powerpc/include/asm/book3s/64/pgtable.h arch/powerpc/include/asm/pgtable-types.h+9 -222 replies
6/18powerpc/mm: Switch book3s 64 with 64K page size to 4 level page tablearch/powerpc/Kconfig arch/powerpc/include/asm/book3s/64/hash-4k.h arch/powerpc/include/asm/book3s/64/hash-64k.h +5 more+97 -552 replies
7/18powerpc/mm: Update masked bits for linux page tablearch/powerpc/include/asm/book3s/64/hash-64k.h+6 -92 replies
8/18powerpc/mm: Copy pgalloc (part 1)arch/powerpc/include/asm/book3s/32/pgalloc.h arch/powerpc/include/asm/book3s/64/pgalloc.h+375 -02 replies
9/18powerpc/mm: Copy pgalloc (part 2)arch/powerpc/include/asm/book3s/32/pgalloc.h arch/powerpc/include/asm/book3s/64/pgalloc.h arch/powerpc/include/asm/book3s/pgalloc.h +4 more+59 -250 replies
10/18powerpc/mm: Copy pgalloc (part 3)arch/powerpc/include/asm/book3s/64/pgalloc.h+18 -370 replies
11/18powerpc/mm: Hugetlbfs is book3s_64 and fsl_book3e (32 or 64)arch/powerpc/include/asm/hugetlb.h arch/powerpc/mm/hugetlbpage-book3e.c arch/powerpc/mm/hugetlbpage-hash64.c +1 more+415 -4002 replies
12/18powerpc/mm: Use flush_tlb_page in ptep_clear_flush_youngarch/powerpc/include/asm/book3s/64/hash.h arch/powerpc/include/asm/book3s/64/pgtable.h arch/powerpc/include/asm/mmu-hash64.h+48 -380 replies
13/18powerpc/mm: Move hash related mmu-*.h headers to book3s/arch/powerpc/include/asm/book3s/32/mmu-hash.h arch/powerpc/include/asm/book3s/64/mmu-hash.h arch/powerpc/include/asm/mmu.h +9 more+11 -110 replies
14/18powerpc/mm: Create a new headers for tlbflush for hash64arch/powerpc/include/asm/book3s/64/tlbflush-hash.h arch/powerpc/include/asm/tlbflush.h+95 -910 replies
15/18powerpc/mm: Move hash page table related functions to pgtable-hash64.carch/powerpc/include/asm/book3s/64/hash.h arch/powerpc/include/asm/nohash/64/pgtable.h arch/powerpc/mm/Makefile +8 more+464 -2292 replies
16/18powerpc/mm: THP is only available on hash64 as of nowarch/powerpc/mm/pgtable-hash64.c arch/powerpc/mm/pgtable_64.c+373 -3730 replies
17/18powerpc/mm: Use generic version of pmdp_clear_flush_youngarch/powerpc/include/asm/book3s/64/pgtable.h arch/powerpc/mm/pgtable-hash64.c+2 -110 replies
18/18powerpc/mm: Move hash64 specific definitions to separate headerarch/powerpc/include/asm/book3s/64/pgalloc-hash-4k.h arch/powerpc/include/asm/book3s/64/pgalloc-hash-64k.h arch/powerpc/include/asm/book3s/64/pgalloc-hash.h +1 more+209 -1900 replies

Reviews trailers per patch

3 of 18 patches have a Reviewed-by or Acked-by.

PatchPaul Mackerras
1/18
2/18
3/18
4/18R-b
5/18R-b
6/18
7/18
8/18
9/18
10/18
11/18
12/18
13/18
14/18
15/18
16/18
17/18
18/18R-b

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

Read the v4 thread

Cover letter [PATCH V4 00/18] Book3s abstraction in preparation for new MMU model

Hello,

This series mostly consisting of code movement. One new thing added in this series is to switch book3s 64 to 4 level page table. The changes are done to accomodate the upcoming new memory model in future powerpc chips. The details of the new MMU model can be found at

http://ibm.biz/power-isa3 (Needs registration). I am including a summary of the changes below.

ISA 3.0 adds support for the radix tree style of MMU with full virtualization and related control mechanisms that manage its coexistence with the HPT. Radix-using operating systems will manage their own translation tables instead of relying on hcalls.

Radix style MMU model requires us to do a 4 level page table with 64K and 4K page size. The table index size different page size is listed below

PGD -> 13 bits
PUD -> 9 (1G hugepage)
PMD -> 9 (2M huge page)
PTE -> 5 (for 64k), 9 (for 4k)

We also require the page table to be in big endian format.

Changes from V3:
* rebase on top of PTE bits movement patch series
* Drop all the hash linux abstraction patches
* Keep only 4 level table and other code movement patches.

Changes from V2:
* rebase to latest kernel
* Update commit messages
* address review comments

Changes from V1:
* move patches adding helpers to the next series

NOTE:
This is lightly tested. Right now 4K linux page size is what is being tested. Once that is done I will have to do 64K linux page size tests.

-aneesh

Aneesh Kumar K.V (17):
powerp/mm: Update code comments
powerpc/mm: add _PAGE_HASHPTE similar to 4K hash powerpc/mm: Split pgtable types to separate header powerpc/mm: Don't have conditional defines for real_pte_t powerpc/mm: Switch book3s 64 with 64K page size to 4 level page table powerpc/mm: Update masked bits for linux page table powerpc/mm: Copy pgalloc (part 1)
powerpc/mm: Copy pgalloc (part 2)
powerpc/mm: Copy pgalloc (part 3)
powerpc/mm: Hugetlbfs is book3s_64 and fsl_book3e (32 or 64) powerpc/mm: Use flush_tlb_page in ptep_clear_flush_young powerpc/mm: Move hash related mmu-*.h headers to book3s/ powerpc/mm: Create a new headers for tlbflush for hash64 powerpc/mm: Move hash page table related functions to pgtable-hash64.c powerpc/mm: THP is only available on hash64 as of now powerpc/mm: Use generic version of pmdp_clear_flush_young powerpc/mm: Move hash64 specific definitions to separate header

Kirill A. Shutemov (1):
mm: Some arch may want to use HPAGE_PMD related values as variables

 arch/powerpc/Kconfig                               |   1 +
 .../asm/{mmu-hash32.h => book3s/32/mmu-hash.h}     |   0
 arch/powerpc/include/asm/book3s/32/pgalloc.h       | 109 ++++
 arch/powerpc/include/asm/book3s/64/hash-4k.h       |  33 +-
 arch/powerpc/include/asm/book3s/64/hash-64k.h      |  31 +-
 arch/powerpc/include/asm/book3s/64/hash.h          |  58 +-
 .../asm/{mmu-hash64.h => book3s/64/mmu-hash.h}     |   2 +-
 .../include/asm/book3s/64/pgalloc-hash-4k.h        |  92 +++
 .../include/asm/book3s/64/pgalloc-hash-64k.h       |  51 ++
 arch/powerpc/include/asm/book3s/64/pgalloc-hash.h  |  59 ++
 arch/powerpc/include/asm/book3s/64/pgalloc.h       |  69 +++
 arch/powerpc/include/asm/book3s/64/pgtable.h       |  72 ++-
 arch/powerpc/include/asm/book3s/64/tlbflush-hash.h |  94 ++++
 arch/powerpc/include/asm/book3s/pgalloc.h          |  19 +
 arch/powerpc/include/asm/hugetlb.h                 |   1 +
 arch/powerpc/include/asm/mmu.h                     |   4 +-
 .../asm/{pgalloc-32.h => nohash/32/pgalloc.h}      |   0
 .../asm/{pgalloc-64.h => nohash/64/pgalloc.h}      |  28 +-
 arch/powerpc/include/asm/nohash/64/pgtable.h       |   3 +
 arch/powerpc/include/asm/nohash/pgalloc.h          |  23 +
 arch/powerpc/include/asm/page.h                    | 104 +---
 arch/powerpc/include/asm/pgalloc.h                 |  19 +-
 arch/powerpc/include/asm/pgtable-types.h           | 103 ++++
 arch/powerpc/include/asm/tlbflush.h                |  92 +--
 arch/powerpc/kernel/idle_power7.S                  |   2 +-
 arch/powerpc/kvm/book3s_32_mmu_host.c              |   2 +-
 arch/powerpc/kvm/book3s_64_mmu.c                   |   2 +-
 arch/powerpc/kvm/book3s_64_mmu_host.c              |   2 +-
 arch/powerpc/kvm/book3s_64_mmu_hv.c                |   2 +-
 arch/powerpc/kvm/book3s_64_vio.c                   |   2 +-
 arch/powerpc/kvm/book3s_64_vio_hv.c                |   2 +-
 arch/powerpc/kvm/book3s_hv_rm_mmu.c                |   2 +-
 arch/powerpc/kvm/book3s_hv_rmhandlers.S            |   2 +-
 arch/powerpc/mm/Makefile                           |   3 +-
 arch/powerpc/mm/hash64_4k.c                        |   2 +-
 arch/powerpc/mm/hash64_64k.c                       |   8 +-
 arch/powerpc/mm/hugepage-hash64.c                  |   2 +-
 arch/powerpc/mm/hugetlbpage-book3e.c               | 293 ++++++++++
 arch/powerpc/mm/hugetlbpage-hash64.c               | 122 +++-
 arch/powerpc/mm/hugetlbpage.c                      | 401 +-------------
 arch/powerpc/mm/init_64.c                          | 105 +---
 arch/powerpc/mm/mem.c                              |  29 +-
 arch/powerpc/mm/mmu_decl.h                         |   5 -
 arch/powerpc/mm/pgtable-book3e.c                   | 163 ++++++
 arch/powerpc/mm/pgtable-hash64.c                   | 614 +++++++++++++++++++++
 arch/powerpc/mm/pgtable.c                          |   9 +
 arch/powerpc/mm/pgtable_64.c                       | 454 ---------------
 arch/powerpc/mm/ppc_mmu_32.c                       |  30 +
 include/linux/bug.h                                |   9 +
 include/linux/huge_mm.h                            |   3 -
 mm/huge_memory.c                                   |  17 +-
 51 files changed, 2037 insertions(+), 1317 deletions(-)
 rename arch/powerpc/include/asm/{mmu-hash32.h => book3s/32/mmu-hash.h} (100%)
 create mode 100644 arch/powerpc/include/asm/book3s/32/pgalloc.h
 rename arch/powerpc/include/asm/{mmu-hash64.h => book3s/64/mmu-hash.h} (99%)
 create mode 100644 arch/powerpc/include/asm/book3s/64/pgalloc-hash-4k.h
 create mode 100644 arch/powerpc/include/asm/book3s/64/pgalloc-hash-64k.h
 create mode 100644 arch/powerpc/include/asm/book3s/64/pgalloc-hash.h
 create mode 100644 arch/powerpc/include/asm/book3s/64/pgalloc.h
 create mode 100644 arch/powerpc/include/asm/book3s/64/tlbflush-hash.h
 create mode 100644 arch/powerpc/include/asm/book3s/pgalloc.h
 rename arch/powerpc/include/asm/{pgalloc-32.h => nohash/32/pgalloc.h} (100%)
 rename arch/powerpc/include/asm/{pgalloc-64.h => nohash/64/pgalloc.h} (90%)
 create mode 100644 arch/powerpc/include/asm/nohash/pgalloc.h
 create mode 100644 arch/powerpc/include/asm/pgtable-types.h
 create mode 100644 arch/powerpc/mm/pgtable-book3e.c
 create mode 100644 arch/powerpc/mm/pgtable-hash64.c
Signature · 1 line
2.5.0