mirror of
https://github.com/AsahiLinux/m1n1
synced 2024-11-10 09:44:13 +00:00
utils_asm: Save/restore CYC_OVRD register
This keeps the previous WFI setting instead of unconditionally flipping to 3 then back to 2. Signed-off-by: Hector Martin <marcan@marcan.st>
This commit is contained in:
parent
b067f26971
commit
8cf0df0553
1 changed files with 8 additions and 10 deletions
|
@ -153,7 +153,11 @@ put_simd_state:
|
|||
.globl deep_wfi
|
||||
.type deep_wfi, @function
|
||||
deep_wfi:
|
||||
str x30, [sp, #-16]!
|
||||
mrs x0, SYS_IMP_APL_CYC_OVRD
|
||||
orr x1, x0, #(3L << 24)
|
||||
msr SYS_IMP_APL_CYC_OVRD, x1
|
||||
|
||||
stp x30, x0, [sp, #-16]!
|
||||
stp x28, x29, [sp, #-16]!
|
||||
stp x26, x27, [sp, #-16]!
|
||||
stp x24, x25, [sp, #-16]!
|
||||
|
@ -161,22 +165,16 @@ deep_wfi:
|
|||
stp x20, x21, [sp, #-16]!
|
||||
stp x18, x19, [sp, #-16]!
|
||||
|
||||
mrs x0, SYS_IMP_APL_CYC_OVRD
|
||||
orr x0, x0, #(3L << 24)
|
||||
msr SYS_IMP_APL_CYC_OVRD, x0
|
||||
|
||||
wfi
|
||||
|
||||
mrs x0, SYS_IMP_APL_CYC_OVRD
|
||||
bic x0, x0, #(1L << 24)
|
||||
msr SYS_IMP_APL_CYC_OVRD, x0
|
||||
|
||||
ldp x18, x19, [sp], #16
|
||||
ldp x20, x21, [sp], #16
|
||||
ldp x22, x23, [sp], #16
|
||||
ldp x24, x25, [sp], #16
|
||||
ldp x26, x27, [sp], #16
|
||||
ldp x28, x29, [sp], #16
|
||||
ldr x30, [sp], #16
|
||||
ldp x30, x0, [sp], #16
|
||||
|
||||
msr SYS_IMP_APL_CYC_OVRD, x0
|
||||
|
||||
ret
|
||||
|
|
Loading…
Reference in a new issue