[PATCH v2 1/2] include: utils/hsm: Add __noreturn attribute for sifive_cease
Bo Gan <[email protected]>
| Newsgroups | org.infradead.lists.opensbi |
|---|---|
| Message-ID | <[email protected]> |
Decorate the sifive_cease to allow more compiler optimizations Signed-off-by: Bo Gan <[email protected]> --- 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 -- opensbi mailing list [email protected] http://lists.infradead.org/mailman/listinfo/opensbi