[PATCH 1/2] include: utils/hsm: Add __noreturn attribute for sifive_cease

Bo Gan
2026-03-02T08:42:41Z

Decorate the sifive_cease to allow more compiler optimizations

Signed-off-by: Bo Gan <ganboing@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)