Re: [PATCH] sparc64: Define p4d_page() instead of stubbing it to NULL

From: Andreas Larsson

Date: Wed Oct 07 2026 - 07:31:21 EST


On 2026-10-07 11:41, Nathan Chancellor wrote:
> On Tue, Oct 06, 2026 at 05:00:30PM -0700, Rosen Penev wrote:
>> LLM suggests as an alternative:
>>
>> /* sparc64 has no p4d leaf mappings, so this is never called */
>> static inline struct page *p4d_page(p4d_t p4d)
>> {
>> return NULL;
>> }
>>
>> Not sure how to proceed.
>
> That seems like a more reasonable fix to me, as it is still obvious this
> is not supported while hiding the NULL value from clang's frontend that
> emits the warning. It could be worth a comment that it is an inline
> function and not a macro to avoid the warning but I guess that is up to
> the sparc maintainers.
I agree, including comment.


Regarding "ptdump and KASAN" in the commit message, while true, both
these are locked behind KASAN which is not supported by sparc64.

Cheers,
Andreas