summaryrefslogtreecommitdiff
path: root/arch/arm/include/asm/system.h
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2024-05-14 07:46:33 -0600
committerTom Rini <trini@konsulko.com>2024-05-14 07:46:33 -0600
commite7992828adcd5fad75bce9e6c41dfa9277ab93b0 (patch)
treedcb6356b6af294979f388c78c6821a63c91d3275 /arch/arm/include/asm/system.h
parentc67199962b2a819a4b0ae8d57dc68b7cadee0c9e (diff)
parent42826664e4452304bdadc909d7c5f791d4abc552 (diff)
Merge branch '2024-05-13-assorted-updates' into next
- A few zfs fixes, ARMv8 timer cleanups, support more algorithms with the nuvoton crypto driver, virtio + env in filesystem fix, K3 code cleanup and warning fix in gen_compile_commands.
Diffstat (limited to 'arch/arm/include/asm/system.h')
-rw-r--r--arch/arm/include/asm/system.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/arch/arm/include/asm/system.h b/arch/arm/include/asm/system.h
index 43f7503571d..7e30cac32a0 100644
--- a/arch/arm/include/asm/system.h
+++ b/arch/arm/include/asm/system.h
@@ -69,8 +69,10 @@
/*
* CNTHCTL_EL2 bits definitions
*/
-#define CNTHCTL_EL2_EL1PCEN_EN (1 << 1) /* Physical timer regs accessible */
-#define CNTHCTL_EL2_EL1PCTEN_EN (1 << 0) /* Physical counter accessible */
+#define CNTHCTL_EL2_EVNT_EN BIT(2) /* Enable the event stream */
+#define CNTHCTL_EL2_EVNT_I(val) ((val) << 4) /* Event stream trigger bits */
+#define CNTHCTL_EL2_EL1PCEN_EN (1 << 1) /* Physical timer regs accessible */
+#define CNTHCTL_EL2_EL1PCTEN_EN (1 << 0) /* Physical counter accessible */
/*
* HCR_EL2 bits definitions
@@ -154,6 +156,13 @@ enum dcache_option {
"wfi" : : : "memory"); \
})
+#define wfe() \
+ ({asm volatile( \
+ "wfe" : : : "memory"); \
+ })
+
+#define sev() asm volatile("sev")
+
static inline unsigned int current_el(void)
{
unsigned long el;
@@ -369,6 +378,8 @@ void switch_to_hypervisor_ret(void);
#ifdef __ARM_ARCH_7A__
#define wfi() __asm__ __volatile__ ("wfi" : : : "memory")
+#define wfe() __asm__ __volatile__ ("wfe" : : : "memory")
+#define sev() __asm__ __volatile__ ("sev")
#else
#define wfi()
#endif