[PATCH 21/22] arm: mm: drop ctor call for kernel page tables

From: Kevin Brodsky

Date: Tue Jul 14 2026 - 10:18:26 EST


Thanks to recent changes:

* pagetable_pte_ctor() does nothing for kernel page tables.

* efi_mm is also treated like a kernel mm by the page table logic,
including ctors.

We can therefore drop the ctor call when allocating special kernel
page tables in mmu.c.

Signed-off-by: Kevin Brodsky <kevin.brodsky@xxxxxxx>
---
arch/arm/mm/mmu.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c
index 23b87b5ef7f1..c8de77a6f01e 100644
--- a/arch/arm/mm/mmu.c
+++ b/arch/arm/mm/mmu.c
@@ -728,8 +728,7 @@ static void *__init late_alloc(unsigned long sz)
void *ptdesc = pagetable_alloc(GFP_PGTABLE_KERNEL & ~__GFP_HIGHMEM,
get_order(sz));

- if (!ptdesc || !pagetable_pte_ctor(NULL, ptdesc))
- BUG();
+ BUG_ON(!ptdesc);
return ptdesc_address(ptdesc);
}


--
2.51.2