* [PATCH v2] selftests/rseq: Fix a building error for riscv arch
@ 2026-07-07 8:23 Hui Wang
2026-07-08 17:00 ` patchwork-bot+linux-riscv
2026-07-08 23:05 ` Paul Walmsley
0 siblings, 2 replies; 3+ messages in thread
From: Hui Wang @ 2026-07-07 8:23 UTC (permalink / raw)
To: mathieu.desnoyers, peterz, shuah, paulmck, boqun, zhouquan,
ajones, linux-kselftest, linux-riscv
Cc: stable, hui.wang
RISC-V rseq selftests include asm/fence.h from tools/arch/riscv,
but the rseq Makefile only adds tools/include in the CFLAGS, this
results in the building failure both for native and cross build:
In file included from rseq.h:131,
from rseq.c:37:
rseq-riscv.h:11:10: fatal error: asm/fence.h: No such file or directory
To fix it, add the matching tools/arch/$(ARCH)/include path in the
CFLAGS and derive ARCH from SUBARCH for standalone native builds where
ARCH is not set.
Fixes: c92786e179e0 ("KVM: riscv: selftests: Use the existing RISCV_FENCE macro in `rseq-riscv.h`")
Cc: stable@vger.kernel.org
Signed-off-by: Hui Wang <hui.wang@canonical.com>
---
tools/testing/selftests/rseq/Makefile | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/tools/testing/selftests/rseq/Makefile b/tools/testing/selftests/rseq/Makefile
index 50d69e22ee7a..aba6317f6cb8 100644
--- a/tools/testing/selftests/rseq/Makefile
+++ b/tools/testing/selftests/rseq/Makefile
@@ -5,9 +5,13 @@ CLANG_FLAGS += -no-integrated-as
endif
top_srcdir = ../../../..
+include $(top_srcdir)/scripts/subarch.include
+ARCH ?= $(SUBARCH)
+LINUX_TOOL_ARCH_INCLUDE = $(top_srcdir)/tools/arch/$(ARCH)/include
CFLAGS += -O2 -Wall -g -I./ $(KHDR_INCLUDES) -L$(OUTPUT) -Wl,-rpath=./ \
- $(CLANG_FLAGS) -I$(top_srcdir)/tools/include
+ $(CLANG_FLAGS) -I$(top_srcdir)/tools/include \
+ -I$(LINUX_TOOL_ARCH_INCLUDE)
LDLIBS += -lpthread -ldl
# Own dependencies because we only want to build against 1st prerequisite, but
--
2.43.0
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2] selftests/rseq: Fix a building error for riscv arch
2026-07-07 8:23 [PATCH v2] selftests/rseq: Fix a building error for riscv arch Hui Wang
@ 2026-07-08 17:00 ` patchwork-bot+linux-riscv
2026-07-08 23:05 ` Paul Walmsley
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+linux-riscv @ 2026-07-08 17:00 UTC (permalink / raw)
To: Hui Wang
Cc: linux-riscv, mathieu.desnoyers, peterz, shuah, paulmck, boqun,
zhouquan, ajones, linux-kselftest, stable
Hello:
This patch was applied to riscv/linux.git (fixes)
by Paul Walmsley <pjw@kernel.org>:
On Tue, 7 Jul 2026 16:23:48 +0800 you wrote:
> RISC-V rseq selftests include asm/fence.h from tools/arch/riscv,
> but the rseq Makefile only adds tools/include in the CFLAGS, this
> results in the building failure both for native and cross build:
>
> In file included from rseq.h:131,
> from rseq.c:37:
> rseq-riscv.h:11:10: fatal error: asm/fence.h: No such file or directory
>
> [...]
Here is the summary with links:
- [v2] selftests/rseq: Fix a building error for riscv arch
https://git.kernel.org/riscv/c/a2ac823d8a22
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] selftests/rseq: Fix a building error for riscv arch
2026-07-07 8:23 [PATCH v2] selftests/rseq: Fix a building error for riscv arch Hui Wang
2026-07-08 17:00 ` patchwork-bot+linux-riscv
@ 2026-07-08 23:05 ` Paul Walmsley
1 sibling, 0 replies; 3+ messages in thread
From: Paul Walmsley @ 2026-07-08 23:05 UTC (permalink / raw)
To: Hui Wang
Cc: mathieu.desnoyers, peterz, shuah, paulmck, boqun, zhouquan,
ajones, linux-kselftest, linux-riscv, stable
On Tue, 7 Jul 2026, Hui Wang wrote:
> RISC-V rseq selftests include asm/fence.h from tools/arch/riscv,
> but the rseq Makefile only adds tools/include in the CFLAGS, this
> results in the building failure both for native and cross build:
>
> In file included from rseq.h:131,
> from rseq.c:37:
> rseq-riscv.h:11:10: fatal error: asm/fence.h: No such file or directory
>
> To fix it, add the matching tools/arch/$(ARCH)/include path in the
> CFLAGS and derive ARCH from SUBARCH for standalone native builds where
> ARCH is not set.
>
> Fixes: c92786e179e0 ("KVM: riscv: selftests: Use the existing RISCV_FENCE macro in `rseq-riscv.h`")
> Cc: stable@vger.kernel.org
> Signed-off-by: Hui Wang <hui.wang@canonical.com>
Thanks, queued for v7.2-rc.
- Paul
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-07-08 23:05 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-07 8:23 [PATCH v2] selftests/rseq: Fix a building error for riscv arch Hui Wang
2026-07-08 17:00 ` patchwork-bot+linux-riscv
2026-07-08 23:05 ` Paul Walmsley
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox