[PATCH linux-next] riscv/mm: fix up the mm-fixes merge of free_pmd_table()

From: Sasha Levin

Date: Fri Oct 30 2026 - 18:14:12 EST


The mm-fixes merge reuses an older resolution of the conflict in
remove_pud_mapping() and keeps the free_pmd_table() call that passes
is_vmemmap. Commit f998a21c2ba5 ("riscv/mm: fix hotplug page-table
destructor handling") in mm-fixes removed that argument, so a riscv
build with CONFIG_MEMORY_HOTPLUG fails:

arch/riscv/mm/init.c:1657:35: error: too many arguments to function call, expected 2, have 3

Drop the argument to match the mm-fixes version of the call.

Fixes: f383866da287 ("Merge branch 'for-next-fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/mm/linux.git";)
Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>
---
Mark, this applies on top of next-20261030 and is meant to be folded into
the mm-fixes merge resolution. Next/merge.log says it was resolved using
a previous resolution, I think the one from the risc-v/mm conflict on
2026-10-12, which had the same problem (next-20261012 has it too).

Build tested with clang: riscv defconfig plus MEMORY_HOTPLUG and
MEMORY_HOTREMOVE, W=1 build of arch/riscv/mm/ (also mm/memory_hotplug.o and
mm/sparse-vmemmap.o), and plain defconfig.

arch/riscv/mm/init.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/riscv/mm/init.c b/arch/riscv/mm/init.c
index 2400537a01215..e822fce0af4b0 100644
--- a/arch/riscv/mm/init.c
+++ b/arch/riscv/mm/init.c
@@ -1654,7 +1654,7 @@ static void __meminit remove_pud_mapping(pud_t *pud_base, unsigned long addr, un
remove_pmd_mapping(pmd_base, addr, next, is_vmemmap, altmap);

if (pgtable_l4_enabled())
- free_pmd_table(pmd_base, pudp, is_vmemmap);
+ free_pmd_table(pmd_base, pudp);
}
}


base-commit: 7649ba73f9e7e1e04d0b46213e39c79ae09dd55c
--
2.53.0