[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAADnVQ+BoEMQ3i01YpzdNPAaL_mdNogkvHp0Ef73TBG8w726Zw@mail.gmail.com>
Date: Thu, 7 Aug 2025 15:21:42 -0700
From: Alexei Starovoitov <alexei.starovoitov@...il.com>
To: Saket Kumar Bhaskar <skb99@...ux.ibm.com>
Cc: bpf <bpf@...r.kernel.org>, ppc-dev <linuxppc-dev@...ts.ozlabs.org>,
"open list:KERNEL SELFTEST FRAMEWORK" <linux-kselftest@...r.kernel.org>, LKML <linux-kernel@...r.kernel.org>,
Hari Bathini <hbathini@...ux.ibm.com>, sachinpb@...ux.ibm.com,
Venkat Rao Bagalkote <venkat88@...ux.ibm.com>, Andrii Nakryiko <andrii@...nel.org>, Eduard <eddyz87@...il.com>,
Mykola Lysenko <mykolal@...com>, Alexei Starovoitov <ast@...nel.org>, Daniel Borkmann <daniel@...earbox.net>,
Martin KaFai Lau <martin.lau@...ux.dev>, Song Liu <song@...nel.org>,
Yonghong Song <yonghong.song@...ux.dev>, John Fastabend <john.fastabend@...il.com>,
KP Singh <kpsingh@...nel.org>, Stanislav Fomichev <sdf@...ichev.me>, Hao Luo <haoluo@...gle.com>,
Jiri Olsa <jolsa@...nel.org>, Christophe Leroy <christophe.leroy@...roup.eu>,
"Naveen N. Rao" <naveen@...nel.org>, Madhavan Srinivasan <maddy@...ux.ibm.com>,
Michael Ellerman <mpe@...erman.id.au>, Nicholas Piggin <npiggin@...il.com>,
Kumar Kartikeya Dwivedi <memxor@...il.com>, Ilya Leoshkevich <iii@...ux.ibm.com>, Shuah Khan <shuah@...nel.org>
Subject: Re: [bpf-next 6/6] selftests/bpf: Fix arena_spin_lock selftest failure
On Mon, Aug 4, 2025 at 11:29 PM Saket Kumar Bhaskar <skb99@...ux.ibm.com> wrote:
>
> @@ -60,9 +65,16 @@ static void test_arena_spin_lock_size(int size)
> return;
> }
>
> - skel = arena_spin_lock__open_and_load();
> - if (!ASSERT_OK_PTR(skel, "arena_spin_lock__open_and_load"))
> + skel = arena_spin_lock__open();
> + if (!ASSERT_OK_PTR(skel, "arena_spin_lock__open"))
> return;
> +
> + skel->rodata->nr_cpus = get_nprocs();
...
> --- a/tools/testing/selftests/bpf/progs/bpf_arena_spin_lock.h
> +++ b/tools/testing/selftests/bpf/progs/bpf_arena_spin_lock.h
> @@ -20,8 +20,6 @@
> #define __arena __attribute__((address_space(1)))
> #endif
>
> -extern unsigned long CONFIG_NR_CPUS __kconfig;
> -
> /*
> * Typically, we'd just rely on the definition in vmlinux.h for qspinlock, but
> * PowerPC overrides the definition to define lock->val as u32 instead of
> @@ -494,7 +492,7 @@ static __always_inline int arena_spin_lock(arena_spinlock_t __arena *lock)
> {
> int val = 0;
>
> - if (CONFIG_NR_CPUS > 1024)
> + if (nr_cpus > 1024)
> return -EOPNOTSUPP;
We cannot do this. It will make arena_spin_lock much harder to use.
BPF CI doesn't run on powerpc anyway, but you can document that this
test is disable by creating selftests/bpf/DENYLIST.powerpc.
Powered by blists - more mailing lists