diff --git a/include/arch/arm/aarch64/asm_inline_gcc.h b/include/arch/arm/aarch64/asm_inline_gcc.h index 22d1f866399..f8614880c3e 100644 --- a/include/arch/arm/aarch64/asm_inline_gcc.h +++ b/include/arch/arm/aarch64/asm_inline_gcc.h @@ -23,6 +23,21 @@ extern "C" { #endif +static ALWAYS_INLINE void __DSB(void) +{ + __asm__ volatile ("dsb sy" : : : "memory"); +} + +static ALWAYS_INLINE void __DMB(void) +{ + __asm__ volatile ("dmb sy" : : : "memory"); +} + +static ALWAYS_INLINE void __ISB(void) +{ + __asm__ volatile ("isb" : : : "memory"); +} + static ALWAYS_INLINE unsigned int arch_irq_lock(void) { unsigned int key; diff --git a/include/arch/arm/aarch64/cpu.h b/include/arch/arm/aarch64/cpu.h index 9e40892c524..73acf8bcb1d 100644 --- a/include/arch/arm/aarch64/cpu.h +++ b/include/arch/arm/aarch64/cpu.h @@ -106,9 +106,6 @@ #endif /* !_ASMLANGUAGE */ -#define __ISB() __asm__ volatile ("isb sy" : : : "memory") -#define __DMB() __asm__ volatile ("dmb sy" : : : "memory") - #define MODE_EL_SHIFT (0x2) #define MODE_EL_MASK (0x3)