[PATCH 1/2] include: utils/hsm: Add __noreturn attribute for sifive_cease
Bo Gan
ganboing at gmail.com
Mon Mar 2 00:40:28 PST 2026
Decorate the sifive_cease to allow more compiler optimizations
Signed-off-by: Bo Gan <ganboing at gmail.com>
---
include/sbi_utils/hsm/fdt_hsm_sifive_inst.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/include/sbi_utils/hsm/fdt_hsm_sifive_inst.h b/include/sbi_utils/hsm/fdt_hsm_sifive_inst.h
index 7e9180ea..8de853ed 100644
--- a/include/sbi_utils/hsm/fdt_hsm_sifive_inst.h
+++ b/include/sbi_utils/hsm/fdt_hsm_sifive_inst.h
@@ -7,9 +7,10 @@
#ifndef __FDT_HSM_SIFIVE_INST_H__
#define __FDT_HSM_SIFIVE_INST_H__
-static inline void sifive_cease(void)
+static inline void __noreturn sifive_cease(void)
{
__asm__ __volatile__(".word 0x30500073" ::: "memory");
+ __builtin_unreachable();
}
static inline void sifive_cflush(void)
--
2.34.1
More information about the opensbi
mailing list