[PATCH v3 1/5] mm/sparse-vmemmap: provide generic vmemmap_set_pmd() and vmemmap_check_pmd()
Oscar Salvador (SUSE)
osalvador at kernel.org
Mon Jun 1 21:41:14 PDT 2026
On Mon, Jun 01, 2026 at 04:48:40PM +0800, Muchun Song wrote:
> The two weak functions are currently no-ops on every architecture,
> forcing each platform that needs them to duplicate the same handful
> of lines. Provide a generic implementation:
>
> - vmemmap_set_pmd() simply sets a huge PMD with PAGE_KERNEL protection.
>
> - vmemmap_check_pmd() verifies that the PMD is present and leaf,
> then calls the existing vmemmap_verify() helper.
>
> Architectures that need special handling can continue to override the
> weak symbols; everyone else gets the standard version for free.
>
> Signed-off-by: Muchun Song <songmuchun at bytedance.com>
Acked-by: Oscar Salvador (SUSE) <osalvador at kernel.org>
--
Oscar Salvador
SUSE Labs
More information about the linux-arm-kernel
mailing list