Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/5] mm/sparse-vmemmap: Provide generic vmemmap_set_pmd() and vmemmap_check_pmd()
@ 2026-06-01  8:48 Muchun Song
  2026-06-01  8:48 ` [PATCH v3 1/5] mm/sparse-vmemmap: provide " Muchun Song
                   ` (4 more replies)
  0 siblings, 5 replies; 19+ messages in thread
From: Muchun Song @ 2026-06-01  8:48 UTC (permalink / raw)
  To: Andrew Morton, David Hildenbrand, Catalin Marinas, Will Deacon,
	Palmer Dabbelt, Paul Walmsley, Huacai Chen, Andreas Larsson,
	David S. Miller
  Cc: Muchun Song, Muchun Song, linux-mm, linux-kernel,
	linux-arm-kernel, linux-riscv, loongarch, sparclinux,
	Alexandre Ghiti, Albert Ou, WANG Xuerui, Lorenzo Stoakes,
	Liam R. Howlett, Vlastimil Babka, Mike Rapoport,
	Suren Baghdasaryan, Michal Hocko

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
-- 
2.54.0



^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2026-06-02  4:47 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-01  8:48 [PATCH v3 0/5] mm/sparse-vmemmap: Provide generic vmemmap_set_pmd() and vmemmap_check_pmd() Muchun Song
2026-06-01  8:48 ` [PATCH v3 1/5] mm/sparse-vmemmap: provide " Muchun Song
2026-06-01 12:22   ` David Hildenbrand (Arm)
2026-06-01 12:37     ` Muchun Song
2026-06-02  4:40       ` Oscar Salvador (SUSE)
2026-06-02  4:41   ` Oscar Salvador (SUSE)
2026-06-01  8:48 ` [PATCH v3 2/5] arm64/mm: drop vmemmap_pmd helpers and use generic code Muchun Song
2026-06-01 12:23   ` David Hildenbrand (Arm)
2026-06-02  4:42   ` Oscar Salvador (SUSE)
2026-06-01  8:48 ` [PATCH v3 3/5] riscv/mm: " Muchun Song
2026-06-01 12:23   ` David Hildenbrand (Arm)
2026-06-02  4:44   ` Oscar Salvador (SUSE)
2026-06-01  8:48 ` [PATCH v3 4/5] loongarch/mm: drop vmemmap_check_pmd helper " Muchun Song
2026-06-01 12:24   ` David Hildenbrand (Arm)
2026-06-01 12:26     ` Muchun Song
2026-06-02  4:45   ` Oscar Salvador (SUSE)
2026-06-01  8:48 ` [PATCH v3 5/5] sparc/mm: " Muchun Song
2026-06-01 12:25   ` David Hildenbrand (Arm)
2026-06-02  4:46   ` Oscar Salvador (SUSE)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox