]> git.ipfire.org Git - thirdparty/linux.git/commit
arm64: mm: Remove pmd_sect() and pud_sect()
authorRyan Roberts <ryan.roberts@arm.com>
Mon, 30 Mar 2026 16:17:04 +0000 (17:17 +0100)
committerCatalin Marinas <catalin.marinas@arm.com>
Thu, 2 Apr 2026 19:49:16 +0000 (20:49 +0100)
commit1d37713fa83780f3f500fa4c4f6c43945dd17137
tree4c8636125a8b95516c676269caa17cdd9e316f86
parent15bfba1ad77fad8e45a37aae54b3c813b33fe27c
arm64: mm: Remove pmd_sect() and pud_sect()

The semantics of pXd_leaf() are very similar to pXd_sect(). The only
difference is that pXd_sect() only considers it a section if PTE_VALID
is set, whereas pXd_leaf() permits both "valid" and "present-invalid"
types.

Using pXd_sect() has caused issues now that large leaf entries can be
present-invalid since commit a166563e7ec37 ("arm64: mm: support large
block mapping when rodata=full"), so let's just remove the API and
standardize on pXd_leaf().

There are a few callsites of the form pXd_leaf(READ_ONCE(*pXdp)). This
was previously fine for the pXd_sect() macro because it only evaluated
its argument once. But pXd_leaf() evaluates its argument multiple times.
So let's avoid unintended side effects by reimplementing pXd_leaf() as
an inline function.

Signed-off-by: Ryan Roberts <ryan.roberts@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/include/asm/pgtable.h
arch/arm64/mm/mmu.c