Re: [PATCH v2] percpu: do not put btf_type_tag on per-cpu variable declarations
From: Alexei Starovoitov
Date: Wed Dec 02 2026 - 14:49:01 EST
On Wed, Dec 02, 2026 at 11:03 AM Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> wrote:
> On Tue, 17 Nov 2026 14:08:24 -0800 Vineet Gupta <vineet.gupta@xxxxxxxxx> wrote:
>
>> and GCC warns:
>>
>> processor.h:232:36: warning: ignoring attributes applied to
>> 'struct cpuinfo_x86' after definition [-Wattributes]
>>
>> which -Werror turns into a build failure.
It's a prep for GCC support.
> Sorry, I've been hiding from this patch because I don't understand the
> BTF stuff at all :( Would it be more appropriate for a BPF person to
> handle this?
The BPF side is fine.
It's really GCC behavior. clang does fine as-is.
It's arguable whether it's a gcc bug or correct behavior.
I feel the latter.
> otoh, Chris had a good look at the previous version so that and a few
> weeks of -next exposure is enough.
I think it better fits in Nick's build tree, since it's about GCC
and less about bpf/btf.
But if folks are fine I can take it into bpf-next.