[PATCH] include: sbi: Don't unconditionally define '__always_inline'
Anup Patel
apatel at ventanamicro.com
Sun Sep 15 09:04:26 PDT 2024
From: Elyes Haouas <ehaouas at noos.fr>
Update __always_inline macro define to fix opensbi upstream
build for coreboot.
Refer, https://qa.coreboot.org/job/coreboot-gerrit/257449/testReport/junit/(root)/clang/EMULATION_QEMU_RISCV_RV64_/
Closes: https://github.com/riscv-software-src/opensbi/issues/366
Signed-off-by: Elyes Haouas <ehaouas at noos.fr>
Signed-off-by: Anup Patel <apatel at ventanamicro.com>
---
include/sbi/sbi_types.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/include/sbi/sbi_types.h b/include/sbi/sbi_types.h
index def88bba..a9943d29 100644
--- a/include/sbi/sbi_types.h
+++ b/include/sbi/sbi_types.h
@@ -69,7 +69,10 @@ typedef uint64_t be64_t;
#define __packed __attribute__((packed))
#define __noreturn __attribute__((noreturn))
#define __aligned(x) __attribute__((aligned(x)))
+
+#ifndef __always_inline
#define __always_inline inline __attribute__((always_inline))
+#endif
#define likely(x) __builtin_expect((x), 1)
#define unlikely(x) __builtin_expect((x), 0)
--
2.43.0
More information about the opensbi
mailing list