Skip to content

Commit 95f67ad

Browse files
committed
fixup! cpuidle: apple: Add Apple SoC cpuidle driver
1 parent 6431481 commit 95f67ad

1 file changed

Lines changed: 5 additions & 10 deletions

File tree

drivers/cpuidle/cpuidle-apple.c

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,13 @@ asm(
3333
"orr x0, x0, #(3L << 24)\n"
3434
"msr s3_5_c15_c5_0, x0\n"
3535

36+
"1:\n"
3637
"dsb sy\n"
3738
"wfi\n"
3839

40+
"mrs x0, ISR_EL1\n"
41+
"cbz x0, 1b\n"
42+
3943
"mrs x0, s3_5_c15_c5_0\n"
4044
"bic x0, x0, #(1L << 24)\n"
4145
"msr s3_5_c15_c5_0, x0\n"
@@ -68,16 +72,7 @@ static __cpuidle int apple_enter_idle(struct cpuidle_device *dev, struct cpuidle
6872
cpu_do_idle();
6973
break;
7074
case STATE_PWRDOWN:
71-
/*
72-
* If we probed this driver in EL1, that's the m1n1 hypervisor.
73-
* Go through the motions but do a normal WFI idle, since it will
74-
* trap out the WFI idle stuff anyway. This avoids noise and slowness.
75-
*/
76-
if (is_kernel_in_hyp_mode())
77-
apple_cpu_deep_wfi();
78-
else
79-
cpu_do_idle();
80-
75+
apple_cpu_deep_wfi();
8176
break;
8277
default:
8378
WARN_ON(1);

0 commit comments

Comments
 (0)