linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] RISC-V: Add support for the zicbom extension
@ 2022-08-11  3:31 Palmer Dabbelt
  2022-08-12  8:25 ` Conor Dooley
  2023-12-18 13:58 ` Luc Van Oostenryck
  0 siblings, 2 replies; 7+ messages in thread
From: Palmer Dabbelt @ 2022-08-11  3:31 UTC (permalink / raw)
  To: luc.vanoostenryck, linux-sparse; +Cc: Palmer Dabbelt

This was recently added to binutils and with any luck will soon be in
Linux, without it sparse will fail when trying to build new kernels on
systems with new toolchains.

Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
---
 target-riscv.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/target-riscv.c b/target-riscv.c
index 217ab7e8..db0f7e57 100644
--- a/target-riscv.c
+++ b/target-riscv.c
@@ -19,6 +19,7 @@
 #define RISCV_GENERIC	(RISCV_MUL|RISCV_DIV|RISCV_ATOMIC|RISCV_FPU)
 #define RISCV_ZICSR	(1 << 10)
 #define RISCV_ZIFENCEI	(1 << 11)
+#define RISCV_ZICBOM	(1 << 12)
 
 static unsigned int riscv_flags;
 
@@ -41,6 +42,7 @@ static void parse_march_riscv(const char *arg)
 		{ "c",		RISCV_COMP },
 		{ "_zicsr",	RISCV_ZICSR },
 		{ "_zifencei",	RISCV_ZIFENCEI },
+		{ "_zicbom",	RISCV_ZICBOM },
 	};
 	int i;
 
@@ -131,6 +133,8 @@ static void predefine_riscv(const struct target *self)
 		predefine("__riscv_zicsr", 1, "1");
 	if (riscv_flags & RISCV_ZIFENCEI)
 		predefine("__riscv_zifencei", 1, "1");
+	if (riscv_flags & RISCV_ZICBOM)
+		predefine("__riscv_zicbom", 1, "1");
 
 	if (cmodel)
 		predefine_strong("__riscv_cmodel_%s", cmodel);
-- 
2.34.1


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

end of thread, other threads:[~2023-12-18 13:58 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-11  3:31 [PATCH] RISC-V: Add support for the zicbom extension Palmer Dabbelt
2022-08-12  8:25 ` Conor Dooley
2022-10-12 21:11   ` Conor Dooley
2022-10-12 23:34     ` Palmer Dabbelt
2022-10-13 11:34       ` Conor Dooley
2023-12-15 12:37   ` Geert Uytterhoeven
2023-12-18 13:58 ` Luc Van Oostenryck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).