Thread (28 messages) 28 messages, 3 authors, 11d ago

Re: [PATCH v8 02/10] powerpc/8xx: add pte_set_huge()

From: Barry Song <baohua@kernel.org>
Date: 2026-09-17 23:28:34
Also in: linux-arm-kernel, linux-mm, lkml

On Thu, Sep 17, 2026 at 1:30 PM Wen Jiang [off-list ref] wrote:
From: Wen Jiang <redacted>

vmap installs PTE-level block mappings (SZ_16K/SZ_512K on powerpc/8xx)
by reusing set_huge_pte_at(), a HugeTLB helper gated by
CONFIG_HUGETLB_PAGE. This makes the feature silently unavailable on
CONFIG_HUGETLB_PAGE=n kernels and couples mm/vmalloc.c to HugeTLB
internals it does not otherwise need.

Add pte_set_huge() to powerpc/8xx, next to the existing
pmd_clear_huge()/pud_clear_huge() in mm/nohash/8xx.c. It builds the huge
PTE and writes it into the backing cells directly, without going through
set_huge_pte_at(), so it does not depend on CONFIG_HUGETLB_PAGE.

No pte_clear_huge() is needed: 8xx does not implement
arch_vmap_pte_range_unmap_size(), so the vmap unmap path never takes the
block-mapping branch.
I assume you mean the block-unmapping (or PTE-clearing) branch.
Please make this clear in the changelog.
In practice PPC_8xx selects HUGETLBFS unconditionally, so
CONFIG_HUGETLB_PAGE=n does not occur there today; this is a decoupling
cleanup rather than a new configuration.

There is no caller yet: mm/vmalloc.c is converted later in this series,
once the generic fallbacks are in place.

Signed-off-by: Wen Jiang <redacted>
---
BTW, this patch applies cleanly to the mm-new branch.

Best Regards
Barry
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help