Re: [PATCH bpf-next v1] selftests/bpf: Fix arena_spin_lock compilation on PowerPC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 11 Mar 2025 at 16:42, Kumar Kartikeya Dwivedi <memxor@xxxxxxxxx> wrote:
>
> 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/7bc80a3b-d708-4735-aa3b-6a8c21720f9d@xxxxxxxxxxxxx
>
> Fixes: 0201027a026c ("selftests/bpf: Introduce arena spin lock")
> Reported-by: Venkat Rao Bagalkote <venkat88@xxxxxxxxxxxxx>
> Signed-off-by: Kumar Kartikeya Dwivedi <memxor@xxxxxxxxx>
> ---

Venkat, please help test, as CI and I don't have access to a PowerPC machine.

Thanks!




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux