[PATCH v2 1/2] powerpc/mm: Move vm_get_page_prot() out of book3s64 code
Christophe Leroy
christophe.leroy at csgroup.eu
Tue Aug 9 15:35:53 AEST 2022
Le 09/08/2022 à 02:55, Russell Currey a écrit :
> On Mon, 2022-08-08 at 14:32 +0000, Christophe Leroy wrote:
>>
>>
>> Le 08/08/2022 à 15:01, Russell Currey a écrit :
>>> protection_map is about to be __ro_after_init instead of const, so
>>> move
>>> the only non-local function that consumes it to the same file so it
>>> can
>>> at least be static.
>>
>> What's the advantage of doing that ? Why does it need to be static ?
>>
>> Christophe
>
> It doesn't need to be, I didn't like having it exposed unnecessarily.
> Aneesh's suggestion lets it stay const so I can drop this patch anyway.
Yes I think Aneesh's approach is better as it keeps book3s/64 specific
stuff in dedicated file.
Also as I probably saw from the robots, including asm/pkeys.h in a non
boo3s64 file was a problem, due to the following in that file:
#ifdef CONFIG_PPC_BOOK3S_64
#include <asm/book3s/64/pkeys.h>
#else
#error "Not supported"
#endif
Christophe
More information about the Linuxppc-dev
mailing list