[PATCH] mm: Move set_pxd_safe() helpers from generic to platform
Anshuman Khandual
anshuman.khandual at arm.com
Thu Sep 19 23:42:47 PDT 2024
On 9/20/24 11:19, Dave Hansen wrote:
> On 9/19/24 22:30, Anshuman Khandual wrote:
>> set_pxd_safe() helpers that serve a specific purpose for both x86 and riscv
>> platforms, do not need to be in the common memory code. Otherwise they just
>> unnecessarily make the common API more complicated. This moves the helpers
>> from common code to platform instead.
>
> 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
#define DEFINE_ENTRY(type1, type2, init) \
static inline void set_##type1##_init(type1##_t *arg1, \
type2##_t arg2, bool init) \
{ \
if (init) \
set_##type1##_safe(arg1, arg2); \
else \
set_##type1(arg1, arg2); \
}
DEFINE_ENTRY(p4d, p4d, init)
DEFINE_ENTRY(pud, pud, init)
DEFINE_ENTRY(pmd, pmd, init)
DEFINE_ENTRY(pte, pte, init)
We had triggered a build problem after dropping off set_pte_safe()
which seemed not to be used after normal grep.
https://lore.kernel.org/linux-mm/202409131220.CJ5MlGCG-lkp@intel.com/
More information about the linux-riscv
mailing list