aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/bpf/progs/bpf_tracing_net.h
diff options
context:
space:
mode:
authorKumar Kartikeya Dwivedi <[email protected]>2025-03-11 15:42:44 +0000
committerAlexei Starovoitov <[email protected]>2025-03-15 18:48:59 +0000
commit1f375aef6cc0ae03ea714bff58ba7be1ca95997c (patch)
tree5bb1d1839e9873ec55d17db82d55021f1a529b42 /tools/testing/selftests/bpf/progs/bpf_tracing_net.h
parentbpf: preload: Add MODULE_DESCRIPTION (diff)
downloadkernel-1f375aef6cc0ae03ea714bff58ba7be1ca95997c.tar.gz
kernel-1f375aef6cc0ae03ea714bff58ba7be1ca95997c.zip
selftests/bpf: Fix arena_spin_lock compilation on PowerPC
Venkat reported a compilation error for BPF selftests on PowerPC [0]. The crux of the error is the following message: In file included from progs/arena_spin_lock.c:7: /root/bpf-next/tools/testing/selftests/bpf/bpf_arena_spin_lock.h:122:8: error: member reference base type '__attribute__((address_space(1))) u32' (aka '__attribute__((address_space(1))) unsigned int') is not a structure or union 122 | old = atomic_read(&lock->val); This is because PowerPC overrides the qspinlock type changing the lock->val member's type from atomic_t to u32. To remedy this, import the asm-generic version in the arena spin lock header, name it __qspinlock (since it's aliased to arena_spinlock_t, the actual name hardly matters), and adjust the selftest to not depend on the type in vmlinux.h. [0]: https://lore.kernel.org/bpf/[email protected] Fixes: 88d706ba7cc5 ("selftests/bpf: Introduce arena spin lock") Reported-by: Venkat Rao Bagalkote <[email protected]> Signed-off-by: Kumar Kartikeya Dwivedi <[email protected]> Signed-off-by: Andrii Nakryiko <[email protected]> Tested-by: Venkat Rao Bagalkote <[email protected]> Link: https://lore.kernel.org/bpf/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
Diffstat (limited to 'tools/testing/selftests/bpf/progs/bpf_tracing_net.h')
0 files changed, 0 insertions, 0 deletions