Re: [PATCH 3/9] x86: vdso: Introduce asm/vdso/page.h
From: Arnd Bergmann
Date: Fri Sep 06 2024 - 13:20:25 EST
On Fri, Sep 6, 2024, at 11:20, Vincenzo Frascino wrote:
> On 04/09/2024 15:52, Arnd Bergmann wrote:
>> On Tue, Sep 3, 2024, at 15:14, Vincenzo Frascino wrote:
> Looking at the definition of PAGE_SIZE and PAGE_MASK for each architecture they
> all depend on CONFIG_PAGE_SHIFT but they are slightly different, e.g.:
>
> x86:
> #define PAGE_SIZE (_AC(1,UL) << PAGE_SHIFT)
>
> powerpc:
> #define PAGE_SIZE (ASM_CONST(1) << PAGE_SHIFT)
>
> hence I left to the architecture the responsibility of redefining the constants
> for the VSDO.
ASM_CONST() is a powerpc-specific macro that is defined the
same way as _AC(). We could probably just replace all ASM_CONST()
as a cleanup, but for this purpose, just remove the custom PAGE_SIZE
and PAGE_SHIFT macros. This can be a single patch fro all
architectures.
Arnd