arm64/barriers.h: Generalize barrier macros
Make it possible to define arguments for barriers
This commit is contained in:
parent
52781221b3
commit
7f228b1554
@ -35,32 +35,25 @@
|
||||
* ARM DDI 0487E.a C6.2.81
|
||||
*/
|
||||
|
||||
static inline void arm64_dsb(void)
|
||||
{
|
||||
__asm__ volatile ("dsb sy" : : : "memory");
|
||||
}
|
||||
#define __DSB(arg) __asm__ volatile ("dsb " #arg : : : "memory");
|
||||
|
||||
/* See Arm® Architecture Reference Manual
|
||||
* ARM DDI 0487E.a C6.2.79
|
||||
*/
|
||||
|
||||
static inline void arm64_dmb(void)
|
||||
{
|
||||
__asm__ volatile ("dmb sy" : : : "memory");
|
||||
}
|
||||
#define __DMB(arg) __asm__ volatile ("dmb " #arg : : : "memory");
|
||||
|
||||
/* See Arm® Architecture Reference Manual
|
||||
* ARM DDI 0487E.a C6.2.96
|
||||
*/
|
||||
|
||||
static inline void arm64_isb(void)
|
||||
{
|
||||
__asm__ volatile ("isb" : : : "memory");
|
||||
}
|
||||
#define __ISB() __asm__ volatile ("isb" : : : "memory");
|
||||
|
||||
#define ARM64_DSB() arm64_dsb()
|
||||
#define ARM64_ISB() arm64_isb()
|
||||
#define ARM64_DMB() arm64_dmb()
|
||||
/* THe most common barriers */
|
||||
|
||||
#define ARM64_DSB() __DSB(sy)
|
||||
#define ARM64_DMB() __DMB(sy)
|
||||
#define ARM64_ISB() __ISB()
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user