diff options
author | Marc Zyngier <maz@kernel.org> | 2022-04-19 19:27:54 +0100 |
---|---|---|
committer | Marc Zyngier <maz@kernel.org> | 2022-04-20 13:24:44 +0100 |
commit | 9eae588529751f95834bca775b30b66291def7f6 (patch) | |
tree | ff97158fb3809f33281a50117cb446f6b66c906a | |
parent | 69bb02ebc38ace438c9cd7c5315cfe43862b51fe (diff) |
arm64: Add wfet()/wfit() helpers
Just like we have helpers for WFI and WFE, add the WFxT versions.
Note that the encoding is that reported by objdump, as no currrent
toolchain knows about these instructions yet.
Signed-off-by: Marc Zyngier <maz@kernel.org>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Link: https://lore.kernel.org/r/20220419182755.601427-10-maz@kernel.org
-rw-r--r-- | arch/arm64/include/asm/barrier.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/arm64/include/asm/barrier.h b/arch/arm64/include/asm/barrier.h index 62217be36217..9f3e2c3d2ca0 100644 --- a/arch/arm64/include/asm/barrier.h +++ b/arch/arm64/include/asm/barrier.h @@ -16,7 +16,11 @@ #define sev() asm volatile("sev" : : : "memory") #define wfe() asm volatile("wfe" : : : "memory") +#define wfet(val) asm volatile("msr s0_3_c1_c0_0, %0" \ + : : "r" (val) : "memory") #define wfi() asm volatile("wfi" : : : "memory") +#define wfit(val) asm volatile("msr s0_3_c1_c0_1, %0" \ + : : "r" (val) : "memory") #define isb() asm volatile("isb" : : : "memory") #define dmb(opt) asm volatile("dmb " #opt : : : "memory") |