From: Ben Dooks <ben.dooks@codethink.co.uk>
To: linux-sparse@vger.kernel.org
Cc: Ben Dooks <ben.dooks@codethink.co.uk>
Subject: [PATCH 1/2] RISC-V: Stop warning about Zabha and Zacas
Date: Fri, 2 Jan 2026 11:44:48 +0000 [thread overview]
Message-ID: <20260102114449.535597-2-ben.dooks@codethink.co.uk> (raw)
In-Reply-To: <20260102114449.535597-1-ben.dooks@codethink.co.uk>
The zabha (atomic byte and halfword) and zacas (atomic compare/swap)
are now being used by the kernel, so parse these and stop the warnings
when running make C=1 on current kernels.
WARNING: invalid argument to '-march': '_zacas_zabha'
Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
---
target-riscv.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/target-riscv.c b/target-riscv.c
index d30be04b..80c25285 100644
--- a/target-riscv.c
+++ b/target-riscv.c
@@ -22,6 +22,8 @@
#define RISCV_ZICBOM (1 << 12)
#define RISCV_ZIHINTPAUSE (1 << 13)
#define RISCV_VECTOR (1 << 14)
+#define RISCV_ATOMIC_CAS (1 << 15)
+#define RISCV_ATOMIC_BH (1 << 16)
static unsigned int riscv_flags;
@@ -43,6 +45,8 @@ static void parse_march_riscv(const char *arg)
{ "d", RISCV_DOUBLE|RISCV_FDIV|RISCV_ZICSR },
{ "c", RISCV_COMP },
{ "v", RISCV_VECTOR|RISCV_FPU|RISCV_ZICSR },
+ { "_zacas", RISCV_ATOMIC_CAS },
+ { "_zabha", RISCV_ATOMIC_BH },
{ "_zicsr", RISCV_ZICSR },
{ "_zifencei", RISCV_ZIFENCEI },
{ "_zicbom", RISCV_ZICBOM },
--
2.37.2.352.g3c44437643
next prev parent reply other threads:[~2026-01-02 12:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-02 11:44 Two updates for RISC-V -march warnings Ben Dooks
2026-01-02 11:44 ` Ben Dooks [this message]
2026-01-07 20:41 ` [PATCH 1/2] RISC-V: Stop warning about Zabha and Zacas Paul Walmsley
2026-01-02 11:44 ` [PATCH 2/2] RISC-V: restart extension search on match Ben Dooks
2026-01-07 20:42 ` Paul Walmsley
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260102114449.535597-2-ben.dooks@codethink.co.uk \
--to=ben.dooks@codethink.co.uk \
--cc=linux-sparse@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox