Skip to content

mm: remove __ARCH_HAS_5LEVEL_HACK

Mike Rapoport kvm-ppc kvmarm linux-arch linux-arm-kernel linux-hexagon linux-ia64 linux-mm linux-sh linuxppc-dev lkml openrisc 5 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest14 patches 10 repliesIn review 13 of 14 applied
  2. v314 patches 2 repliesSuperseded
  3. v2 posting 2/213 patches 11 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v2 posting 1/21 patch6 repliesSuperseded
v11 patch3 repliesSuperseded

v3 from the cover letter

* add Christophe's patch that removes ppc32 get_pteptr()
* reduce amount of upper layer walks in powerpc

Patches in v4 13 of 14 applied

#Subject and filesSizeRepliesApplied
1/14h8300: remove usage of __ARCH_USE_5LEVEL_HACKarch/h8300/include/asm/pgtable.h+0 -10 repliesApplied
2/14arm: add support for folded p4d page tablesarch/arm/include/asm/pgtable.h arch/arm/lib/uaccess_with_memcpy.c arch/arm/mach-sa1100/assabet.c +9 more+125 -376 replies
3/14arm64: add support for folded p4d page tablesarch/arm64/include/asm/kvm_mmu.h arch/arm64/include/asm/pgalloc.h arch/arm64/include/asm/pgtable-types.h +9 more+368 -1042 repliesApplied
4/14hexagon: remove __ARCH_USE_5LEVEL_HACKarch/hexagon/include/asm/fixmap.h arch/hexagon/include/asm/pgtable.h+2 -30 repliesApplied
5/14ia64: add support for folded p4d page tablesarch/ia64/include/asm/pgalloc.h arch/ia64/include/asm/pgtable.h arch/ia64/mm/fault.c +2 more+52 -220 repliesApplied
6/14nios2: add support for folded p4d page tablesarch/nios2/include/asm/pgtable.h arch/nios2/mm/fault.c arch/nios2/mm/ioremap.c+13 -50 repliesApplied
7/14openrisc: add support for folded p4d page tablesarch/openrisc/include/asm/pgtable.h arch/openrisc/mm/fault.c arch/openrisc/mm/init.c+11 -40 repliesApplied
8/14powerpc: add support for folded p4d page tablesarch/powerpc/include/asm/book3s/32/pgtable.h arch/powerpc/include/asm/book3s/64/hash.h arch/powerpc/include/asm/book3s/64/pgalloc.h +19 more+197 -1392 repliesApplied
9/14sh: fault: Modernize printing of kernel messagesarch/sh/mm/fault.c+18 -210 repliesApplied
10/14sh: drop __pXd_offset() macros that duplicate pXd_index() onesarch/sh/include/asm/pgtable_32.h arch/sh/include/asm/pgtable_64.h arch/sh/mm/init.c+7 -90 repliesApplied
11/14sh: add support for folded p4d page tablesarch/sh/include/asm/pgtable-2level.h arch/sh/include/asm/pgtable-3level.h arch/sh/kernel/io_trapped.c +8 more+76 -220 repliesApplied
12/14unicore32: remove __ARCH_USE_5LEVEL_HACKarch/unicore32/include/asm/pgtable.h arch/unicore32/kernel/hibernate.c+3 -20 repliesApplied
13/14asm-generic: remove pgtable-nop4d-hack.hinclude/asm-generic/pgtable-nop4d-hack.h include/asm-generic/pgtable-nopud.h+0 -680 repliesApplied
14/14mm: remove __ARCH_HAS_5LEVEL_HACK and include/asm-generic/5level-fixup.hinclude/asm-generic/5level-fixup.h include/linux/mm.h mm/kasan/init.c +1 more+0 -830 repliesApplied

Reviews trailers per patch

None of the 14 patches has a Reviewed-by or Acked-by.

PatchChristophe LeroyMarek Szyprowski
1/14
2/14T-b
3/14
4/14
5/14
6/14
7/14
8/14T-b
9/14
10/14
11/14
12/14
13/14
14/14

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/14] mm: remove __ARCH_HAS_5LEVEL_HACK

From: Mike Rapoport <[email protected]>

Hi,

These patches convert several architectures to use page table folding and remove __ARCH_HAS_5LEVEL_HACK along with include/asm-generic/5level-fixup.h and include/asm-generic/pgtable-nop4d-hack.h. With that we'll have a single and consistent way of dealing with page table folding instead of a mix of three existing options.

The changes are mostly about mechanical replacement of pgd accessors with p4d ones and the addition of higher levels to page table traversals.

v4 is about rebasing on top of v5.7-rc1
* split arm and arm64 changes as there is no KVM host on arm anymore
* update powerpc patches to reflect its recent changes in page table handling

v3:
* add Christophe's patch that removes ppc32 get_pteptr()
* reduce amount of upper layer walks in powerpc

v2:
* collect per-arch patches into a single set
* include Geert's update of 'sh' printing messages
* rebase on v5.6-rc1+

Geert Uytterhoeven (1):
sh: fault: Modernize printing of kernel messages

Mike Rapoport (13):
h8300: remove usage of __ARCH_USE_5LEVEL_HACK
arm: add support for folded p4d page tables
arm64: add support for folded p4d page tables
hexagon: remove __ARCH_USE_5LEVEL_HACK
ia64: add support for folded p4d page tables
nios2: add support for folded p4d page tables
openrisc: add support for folded p4d page tables
powerpc: add support for folded p4d page tables
sh: drop __pXd_offset() macros that duplicate pXd_index() ones
sh: add support for folded p4d page tables
unicore32: remove __ARCH_USE_5LEVEL_HACK
asm-generic: remove pgtable-nop4d-hack.h
mm: remove __ARCH_HAS_5LEVEL_HACK and include/asm-generic/5level-fixup.h

 arch/arm/include/asm/pgtable.h                |   1 -
 arch/arm/lib/uaccess_with_memcpy.c            |   7 +-
 arch/arm/mach-sa1100/assabet.c                |   2 +-
 arch/arm/mm/dump.c                            |  29 ++-
 arch/arm/mm/fault-armv.c                      |   7 +-
 arch/arm/mm/fault.c                           |  22 +-
 arch/arm/mm/idmap.c                           |   3 +-
 arch/arm/mm/init.c                            |   2 +-
 arch/arm/mm/ioremap.c                         |  12 +-
 arch/arm/mm/mm.h                              |   2 +-
 arch/arm/mm/mmu.c                             |  35 ++-
 arch/arm/mm/pgd.c                             |  40 +++-
 arch/arm64/include/asm/kvm_mmu.h              |  10 +-
 arch/arm64/include/asm/pgalloc.h              |  10 +-
 arch/arm64/include/asm/pgtable-types.h        |   5 +-
 arch/arm64/include/asm/pgtable.h              |  37 ++--
 arch/arm64/include/asm/stage2_pgtable.h       |  48 +++-
 arch/arm64/kernel/hibernate.c                 |  44 +++-
 arch/arm64/mm/fault.c                         |   9 +-
 arch/arm64/mm/hugetlbpage.c                   |  15 +-
 arch/arm64/mm/kasan_init.c                    |  26 ++-
 arch/arm64/mm/mmu.c                           |  52 +++--
 arch/arm64/mm/pageattr.c                      |   7 +-
 arch/h8300/include/asm/pgtable.h              |   1 -
 arch/hexagon/include/asm/fixmap.h             |   4 +-
 arch/hexagon/include/asm/pgtable.h            |   1 -
 arch/ia64/include/asm/pgalloc.h               |   4 +-
 arch/ia64/include/asm/pgtable.h               |  17 +-
 arch/ia64/mm/fault.c                          |   7 +-
 arch/ia64/mm/hugetlbpage.c                    |  18 +-
 arch/ia64/mm/init.c                           |  28 ++-
 arch/nios2/include/asm/pgtable.h              |   3 +-
 arch/nios2/mm/fault.c                         |   9 +-
 arch/nios2/mm/ioremap.c                       |   6 +-
 arch/openrisc/include/asm/pgtable.h           |   1 -
 arch/openrisc/mm/fault.c                      |  10 +-
 arch/openrisc/mm/init.c                       |   4 +-
 arch/powerpc/include/asm/book3s/32/pgtable.h  |   1 -
 arch/powerpc/include/asm/book3s/64/hash.h     |   4 +-
 arch/powerpc/include/asm/book3s/64/pgalloc.h  |   4 +-
 arch/powerpc/include/asm/book3s/64/pgtable.h  |  60 ++---
 arch/powerpc/include/asm/book3s/64/radix.h    |   6 +-
 arch/powerpc/include/asm/nohash/32/pgtable.h  |   1 -
 arch/powerpc/include/asm/nohash/64/pgalloc.h  |   2 +-
 .../include/asm/nohash/64/pgtable-4k.h        |  32 +--
 arch/powerpc/include/asm/nohash/64/pgtable.h  |   6 +-
 arch/powerpc/include/asm/pgtable.h            |  10 +-
 arch/powerpc/kvm/book3s_64_mmu_radix.c        |  32 +--
 arch/powerpc/lib/code-patching.c              |   7 +-
 arch/powerpc/mm/book3s64/hash_pgtable.c       |   4 +-
 arch/powerpc/mm/book3s64/radix_pgtable.c      |  26 ++-
 arch/powerpc/mm/book3s64/subpage_prot.c       |   6 +-
 arch/powerpc/mm/hugetlbpage.c                 |  28 ++-
 arch/powerpc/mm/nohash/book3e_pgtable.c       |  15 +-
 arch/powerpc/mm/pgtable.c                     |  30 ++-
 arch/powerpc/mm/pgtable_64.c                  |  10 +-
 arch/powerpc/mm/ptdump/hashpagetable.c        |  20 +-
 arch/powerpc/mm/ptdump/ptdump.c               |  14 +-
 arch/powerpc/xmon/xmon.c                      |  18 +-
 arch/sh/include/asm/pgtable-2level.h          |   1 -
 arch/sh/include/asm/pgtable-3level.h          |   1 -
 arch/sh/include/asm/pgtable_32.h              |   5 +-
 arch/sh/include/asm/pgtable_64.h              |   5 +-
 arch/sh/kernel/io_trapped.c                   |   7 +-
 arch/sh/mm/cache-sh4.c                        |   4 +-
 arch/sh/mm/cache-sh5.c                        |   7 +-
 arch/sh/mm/fault.c                            |  65 ++++--
 arch/sh/mm/hugetlbpage.c                      |  28 ++-
 arch/sh/mm/init.c                             |  15 +-
 arch/sh/mm/kmap.c                             |   2 +-
 arch/sh/mm/tlbex_32.c                         |   6 +-
 arch/sh/mm/tlbex_64.c                         |   7 +-
 arch/unicore32/include/asm/pgtable.h          |   1 -
 arch/unicore32/kernel/hibernate.c             |   4 +-
 include/asm-generic/5level-fixup.h            |  58 -----
 include/asm-generic/pgtable-nop4d-hack.h      |  64 ------
 include/asm-generic/pgtable-nopud.h           |   4 -
 include/linux/mm.h                            |   6 -
 mm/kasan/init.c                               |  11 -
 mm/memory.c                                   |   8 -
 virt/kvm/arm/mmu.c                            | 209 +++++++++++++++---
 81 files changed, 872 insertions(+), 520 deletions(-)
 delete mode 100644 include/asm-generic/5level-fixup.h
 delete mode 100644 include/asm-generic/pgtable-nop4d-hack.h
Signature · 1 line
2.25.1