mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [RFC PATCH] tools/sched_ext: Use u64 for kind field to fix ARM64 atomic ops
@ 2026-02-09  8:55 Xuewen Yan
  2026-02-09 19:11 ` Tejun Heo
  0 siblings, 1 reply; 3+ messages in thread
From: Xuewen Yan @ 2026-02-09  8:55 UTC (permalink / raw)
  To: tj, void, arighi, changwoo, guohua.yan
  Cc: ke.wang, di.shen, sched-ext, linux-kernel, bpf, xuewen.yan94

From: Guohua Yan <guohua.yan@unisoc.com>

There are following compile errors in arm64:

bpftools/CORE/scx_simple.bpf.c:144:2: error: unsupported atomic operation, please use 64 bit version
  144 |         UEI_RECORD(uei, ei);
      |         ^

Convert kind from int to u64 to resolve ARM64 atomic operation
limitations. ARM64 primarily supports 64-bit atomic operations.

Signed-off-by: Guohua Yan <guohua.yan@unisoc.com>
Signed-off-by: Xuewen Yan <xuewen.yan@unisoc.com>
---
 tools/sched_ext/include/scx/user_exit_info_common.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/sched_ext/include/scx/user_exit_info_common.h b/tools/sched_ext/include/scx/user_exit_info_common.h
index 2d0981aedd89..5bad20faade1 100644
--- a/tools/sched_ext/include/scx/user_exit_info_common.h
+++ b/tools/sched_ext/include/scx/user_exit_info_common.h
@@ -21,7 +21,7 @@ enum uei_sizes {
 };
 
 struct user_exit_info {
-	int		kind;
+	u64		kind;
 	s64		exit_code;
 	char		reason[UEI_REASON_LEN];
 	char		msg[UEI_MSG_LEN];
-- 
2.25.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [RFC PATCH] tools/sched_ext: Use u64 for kind field to fix ARM64 atomic ops
  2026-02-09  8:55 [RFC PATCH] tools/sched_ext: Use u64 for kind field to fix ARM64 atomic ops Xuewen Yan
@ 2026-02-09 19:11 ` Tejun Heo
  2026-02-10  1:48   ` Xuewen Yan
  0 siblings, 1 reply; 3+ messages in thread
From: Tejun Heo @ 2026-02-09 19:11 UTC (permalink / raw)
  To: Xuewen Yan
  Cc: void, arighi, changwoo, guohua.yan, ke.wang, di.shen, sched-ext,
	linux-kernel, bpf, xuewen.yan94

On Mon, Feb 09, 2026 at 04:55:36PM +0800, Xuewen Yan wrote:
> From: Guohua Yan <guohua.yan@unisoc.com>
> 
> There are following compile errors in arm64:
> 
> bpftools/CORE/scx_simple.bpf.c:144:2: error: unsupported atomic operation, please use 64 bit version
>   144 |         UEI_RECORD(uei, ei);
>       |         ^
> 
> Convert kind from int to u64 to resolve ARM64 atomic operation
> limitations. ARM64 primarily supports 64-bit atomic operations.

Alexei says this is llvm bpf backend error and the answer is to upgrade to a
modern llvm that defaults to -mcpu=v3.

Thanks.

-- 
tejun

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [RFC PATCH] tools/sched_ext: Use u64 for kind field to fix ARM64 atomic ops
  2026-02-09 19:11 ` Tejun Heo
@ 2026-02-10  1:48   ` Xuewen Yan
  0 siblings, 0 replies; 3+ messages in thread
From: Xuewen Yan @ 2026-02-10  1:48 UTC (permalink / raw)
  To: Tejun Heo
  Cc: Xuewen Yan, void, arighi, changwoo, guohua.yan, ke.wang, di.shen,
	sched-ext, linux-kernel, bpf

On Tue, Feb 10, 2026 at 3:11 AM Tejun Heo <tj@kernel.org> wrote:
>
> On Mon, Feb 09, 2026 at 04:55:36PM +0800, Xuewen Yan wrote:
> > From: Guohua Yan <guohua.yan@unisoc.com>
> >
> > There are following compile errors in arm64:
> >
> > bpftools/CORE/scx_simple.bpf.c:144:2: error: unsupported atomic operation, please use 64 bit version
> >   144 |         UEI_RECORD(uei, ei);
> >       |         ^
> >
> > Convert kind from int to u64 to resolve ARM64 atomic operation
> > limitations. ARM64 primarily supports 64-bit atomic operations.
>
> Alexei says this is llvm bpf backend error and the answer is to upgrade to a
> modern llvm that defaults to -mcpu=v3.

Thank you for the insight. We'll upgrade our LLVM toolchain and test
with -mcpu=v3.
Appreciate your guidance on this backend issue.

Thanks!

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-02-10  1:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-02-09  8:55 [RFC PATCH] tools/sched_ext: Use u64 for kind field to fix ARM64 atomic ops Xuewen Yan
2026-02-09 19:11 ` Tejun Heo
2026-02-10  1:48   ` Xuewen Yan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome