arm64: Use WFI for idling

Change-Id: I00f17c1db7c032879da59d17c67c13c24e0b9ef8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7519
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: David Karoly <karolyd577@gmail.com>
This commit is contained in:
milek7 2024-03-11 20:58:27 +01:00 committed by Fredrik Holmqvist
parent 6f1b41351e
commit 6034ee94a2

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();
}