[PATCH RFC 2/6] mm: PGTABLE_HAS_P[MU]D_LEAVES config options
Peter Xu
peterx at redhat.com
Tue Aug 27 00:34:39 AEST 2024
On Fri, Aug 23, 2024 at 06:19:52AM +0000, LEROY Christophe wrote:
> Why is an option needed for that ? If pmd_leaf() returns always false,
> it means the arch doesn't support pmd mappings and if properly used all
> related code should fold away without a config option, shouldn't it ?
It's not always easy to leverage an "if" clause there, IIUC. Take the case
of when a driver wants to inject a pmd pfnmap, we may want something like:
if (pmd_leaf_supported())
inject_pmd_leaf(&pmd);
We don't have a pmd entry to reference at the point of pmd_leaf_supported()
when making the decision.
Thanks,
--
Peter Xu
More information about the Linuxppc-dev
mailing list