public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] riscv: Add macros for software check and hardware error exception codes
@ 2026-01-22  2:38 Austin Kim
  2026-01-24  7:57 ` Paul Walmsley
  0 siblings, 1 reply; 3+ messages in thread
From: Austin Kim @ 2026-01-22  2:38 UTC (permalink / raw)
  To: Paul Walmsley, Palmer Dabbelt, Alexandre Ghiti, Albert Ou
  Cc: linux-kernel, linux-riscv, austindh.kim

The latest RISC-V Privileged specification defines new synchronous
exception codes in the scause register:

   18: Software check
   19: Hardware error

Link: https://docs.riscv.org/reference/isa/priv/supervisor.html
- 12.1.8. Supervisor Cause (scause) Register

Add these macros for future use.

Signed-off-by: Austin Kim <austindh.kim@gmail.com>
---
 arch/riscv/include/asm/csr.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/riscv/include/asm/csr.h b/arch/riscv/include/asm/csr.h
index 4a37a9839..5ea875813 100644
--- a/arch/riscv/include/asm/csr.h
+++ b/arch/riscv/include/asm/csr.h
@@ -108,6 +108,8 @@
 #define EXC_INST_PAGE_FAULT	12
 #define EXC_LOAD_PAGE_FAULT	13
 #define EXC_STORE_PAGE_FAULT	15
+#define EXC_SOFTWARE_CHECK	18
+#define EXC_HARDWARE_ERROR      19
 #define EXC_INST_GUEST_PAGE_FAULT	20
 #define EXC_LOAD_GUEST_PAGE_FAULT	21
 #define EXC_VIRTUAL_INST_FAULT		22
-- 
2.34.1


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

end of thread, other threads:[~2026-01-26  9:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-22  2:38 [PATCH] riscv: Add macros for software check and hardware error exception codes Austin Kim
2026-01-24  7:57 ` Paul Walmsley
2026-01-26  9:39   ` Austin Kim

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