Drop x86's duplicate version of barrier() in favor of the generic #define provided by linux/compiler.h. Include compiler.h in the all-encompassing libcflat.h to pick up barrier() and other future goodies, e.g. new attributes defines. Signed-off-by: Sean Christopherson <seanjc@xxxxxxxxxx> --- lib/libcflat.h | 1 + lib/x86/processor.h | 5 ----- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/libcflat.h b/lib/libcflat.h index 97db9e3..e619de1 100644 --- a/lib/libcflat.h +++ b/lib/libcflat.h @@ -22,6 +22,7 @@ #ifndef __ASSEMBLY__ +#include <linux/compiler.h> #include <stdarg.h> #include <stddef.h> #include <stdint.h> diff --git a/lib/x86/processor.h b/lib/x86/processor.h index f380321..eaf24d4 100644 --- a/lib/x86/processor.h +++ b/lib/x86/processor.h @@ -216,11 +216,6 @@ struct descriptor_table_ptr { ulong base; } __attribute__((packed)); -static inline void barrier(void) -{ - asm volatile ("" : : : "memory"); -} - static inline void clac(void) { asm volatile (".byte 0x0f, 0x01, 0xca" : : : "memory"); -- 2.33.0.309.g3052b89438-goog