[PATCH] mm: Move set_pxd_safe() helpers from generic to platform
Anshuman Khandual
anshuman.khandual at arm.com
Fri Sep 20 02:27:25 PDT 2024
On 9/20/24 14:22, Dave Hansen wrote:
> On 9/19/24 23:42, Anshuman Khandual wrote:
>>> I just did a quick grep and don't see any difference between the _safe
>>> and normal variants. A quick grep didn't turn up any actual users.
>>>
>>> Did anyone actually double check that these are still needed on x86 in
>>> the first place?
>> arch/x86/mm/init_64.c
>
> Ahh, the #defines make them immune to grep. :)
>
> Long-term, we should make sure these are still necessary. Short term
Agreed, David H has also mentioned about that.
> (in this patch), please just put the #defines in init_64.c if it is the
> only site that needs them.
That is not the only site where they get used. set_pmd/pud/p4d/pgd_safe()
are also called from respective pmd/pud/p4d/pgd_populate_safe() helpers
in the header arch/x86/include/asm/pgalloc.h.
Besides also hit a road block in converting these macros as static inline
functions as suggested by David H earlier, because pmd/pud/p4d/pgd_same()
macros are defined in include/linux/pgtable.h, way after <asm/pgtable.h>
gets included.
I guess we will have just leave these macros is in arch/x86/include/asm/pgtable.h
More information about the linux-riscv
mailing list