From 7b3de48cd583dbd8c0b9efa65f417c4e5d5a6b79 Mon Sep 17 00:00:00 2001 From: Elyes Haouas Date: Sun, 15 Sep 2024 21:34:26 +0530 Subject: [PATCH] include: sbi: Don't unconditionally define '__always_inline' 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 Signed-off-by: Anup Patel --- 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)