From 0f42eff6eaca80bd483292c8911292cbaa2341fd Mon Sep 17 00:00:00 2001 From: Bo Gan Date: Fri, 5 Jun 2026 00:57:07 -0700 Subject: [PATCH] include: utils/hsm: Add __noreturn attribute for sifive_cease Decorate the sifive_cease to allow more compiler optimizations Signed-off-by: Bo Gan Reviewed-by: Anup Patel Link: https://lore.kernel.org/r/20260605075708.96-2-ganboing@gmail.com Signed-off-by: Anup Patel --- 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)