Skip to content

mm/sparse-vmemmap: Provide generic vmemmap_set_pmd() and vmemmap_check_pmd()

Muchun Song linux-arm-kernel linux-mm linux-riscv lkml loongarch sparclinux 3 versions – Applied

Status from this message: This series was applied to riscv/linux.git (fixes)

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest5 patches 13 repliesApplied 5/5
  2. v25 patches 6 repliesSuperseded 1 of 5 applied
  3. v15 patches 1 replySuperseded 2 of 5 applied

Changes in v3 from the cover letter

- Replace BUG_ON() with WARN_ON_ONCE() in patch 1
- Add Will Deacon's Acked-by to patch 2

Patches in v3 All 5 applied

#Subject and filesSizeRepliesApplied
1/5mm/sparse-vmemmap: provide generic vmemmap_set_pmd() and vmemmap_check_pmd()mm/sparse-vmemmap.c+6 -14 repliesApplied
2/5arm64/mm: drop vmemmap_pmd helpers and use generic codearch/arm64/mm/mmu.c+0 -142 repliesApplied
3/5riscv/mm: drop vmemmap_pmd helpers and use generic codearch/riscv/mm/init.c+0 -132 repliesApplied
4/5loongarch/mm: drop vmemmap_check_pmd helper and use generic codearch/loongarch/mm/init.c+0 -113 repliesApplied
5/5sparc/mm: drop vmemmap_check_pmd helper and use generic codearch/sparc/mm/init_64.c+0 -112 repliesApplied

Reviews trailers per patch

All 5 patches have a Reviewed-by or Acked-by.

PatchWill DeaconDavid Hildenbrand (Arm)Oscar Salvador (SUSE)
1/5A-b A-b
2/5A-b R-b R-b
3/5R-b R-b
4/5R-b R-b
5/5R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v3 thread

Cover letter [PATCH v3 0/5] mm/sparse-vmemmap: Provide generic vmemmap_set_pmd() and vmemmap_check_pmd()

The weak vmemmap_set_pmd() and vmemmap_check_pmd() hooks are currently no-ops in the generic code, which leaves architectures that need PMD-level handling to open-code the same logic locally.

This series provides generic implementations for both helpers in mm/sparse-vmemmap.c. vmemmap_set_pmd() installs a huge PMD with PAGE_KERNEL protection, and vmemmap_check_pmd() verifies a present leaf PMD before reusing the existing vmemmap_verify() helper.

With those generic helpers in place, patches 2-5 remove the now redundant arch-specific implementations from arm64, riscv, loongarch, and sparc.

v2 -> v3:
- Replace BUG_ON() with WARN_ON_ONCE() in patch 1
- Add Will Deacon's Acked-by to patch 2

Muchun Song (5):
mm/sparse-vmemmap: provide generic vmemmap_set_pmd() and
vmemmap_check_pmd()
arm64/mm: drop vmemmap_pmd helpers and use generic code riscv/mm: drop vmemmap_pmd helpers and use generic code loongarch/mm: drop vmemmap_check_pmd helper and use generic code sparc/mm: drop vmemmap_check_pmd helper and use generic code

 arch/arm64/mm/mmu.c      | 14 --------------
 arch/loongarch/mm/init.c | 11 -----------
 arch/riscv/mm/init.c     | 13 -------------
 arch/sparc/mm/init_64.c  | 11 -----------
 mm/sparse-vmemmap.c      |  7 ++++++-
 5 files changed, 6 insertions(+), 50 deletions(-)

base-commit: 7da7f07112610a520567421dd2ffcb51beaefbcc

Signature · 1 line
2.54.0