ref: 9e71ad24d54bcaaf06712fd56ede4e6f7cf08ac3
parent: dd12efd791045475e7749b71c1a363c91b3b48a2
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Fri May 10 10:05:04 EDT 2019
bcm64: use exclusive monitor on nrdy to wake up idlehands() when the exclusive monitor is cleared, a event is generated which we can use to wake up idlehands. that way we do not need to wait for the next timer interrupt until a cpu takes work from the run queue.
--- a/sys/src/9/bcm64/l.s
+++ b/sys/src/9/bcm64/l.s
@@ -293,10 +293,13 @@
TEXT idlehands(SB), 1, $-4
DMB $ISH
- MOVW nrdy(SB), R0
- CBNZ R0, _ready
- WFI
-_ready:
+ MOV $nrdy(SB), R1
+ LDXRW (R1), R0
+ CBZ R0, _goodnight
+ CLREX
+ SEVL
+_goodnight:
+ WFE
RETURN
TEXT cycles(SB), 1, $-4
--
⑨