arm64: Use WFI for idling

Change-Id: I00f17c1db7c032879da59d17c67c13c24e0b9ef8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7519
Reviewed-by: Fredrik Holmqvist <[email protected]>
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: David Karoly <[email protected]>
This commit is contained in:
milek7
2024-03-12 20:44:21 +00:00
committed by Fredrik Holmqvist
parent 6f1b41351e
commit 6034ee94a2
+2 -1
View File
@@ -25,6 +25,7 @@
#define arm64_dmb() __asm__ __volatile__("dmb" : : : "memory")
#define arm64_isb() __asm__ __volatile__("isb" : : : "memory")
#define arm64_nop() __asm__ __volatile__("nop" : : : "memory")
#define arm64_wfi() __asm__ __volatile__("wfi" : : : "memory")
#define arm64_yield() __asm__ __volatile__("yield" : : : "memory")
/* Extract CPU affinity levels 0-3 */
@@ -170,7 +171,7 @@ static inline void arch_cpu_pause(void)
static inline void arch_cpu_idle(void)
{
arm64_yield();
arm64_wfi();
}