diff options
-rw-r--r-- | arch/powerpc/include/asm/cpuidle.h | 13 | ||||
-rw-r--r-- | arch/powerpc/kernel/idle_book3s.S | 12 |
2 files changed, 13 insertions, 12 deletions
diff --git a/arch/powerpc/include/asm/cpuidle.h b/arch/powerpc/include/asm/cpuidle.h index 3d7fc06532a1..01b8a13f0224 100644 --- a/arch/powerpc/include/asm/cpuidle.h +++ b/arch/powerpc/include/asm/cpuidle.h | |||
@@ -19,4 +19,17 @@ extern u64 pnv_first_deep_stop_state; | |||
19 | 19 | ||
20 | #endif | 20 | #endif |
21 | 21 | ||
22 | /* Idle state entry routines */ | ||
23 | #ifdef CONFIG_PPC_P7_NAP | ||
24 | #define IDLE_STATE_ENTER_SEQ(IDLE_INST) \ | ||
25 | /* Magic NAP/SLEEP/WINKLE mode enter sequence */ \ | ||
26 | std r0,0(r1); \ | ||
27 | ptesync; \ | ||
28 | ld r0,0(r1); \ | ||
29 | 1: cmp cr0,r0,r0; \ | ||
30 | bne 1b; \ | ||
31 | IDLE_INST; \ | ||
32 | b . | ||
33 | #endif /* CONFIG_PPC_P7_NAP */ | ||
34 | |||
22 | #endif | 35 | #endif |
diff --git a/arch/powerpc/kernel/idle_book3s.S b/arch/powerpc/kernel/idle_book3s.S index 07a330ed7022..2265c6398a17 100644 --- a/arch/powerpc/kernel/idle_book3s.S +++ b/arch/powerpc/kernel/idle_book3s.S | |||
@@ -44,18 +44,6 @@ | |||
44 | PSSCR_PSLL_MASK | PSSCR_TR_MASK | \ | 44 | PSSCR_PSLL_MASK | PSSCR_TR_MASK | \ |
45 | PSSCR_MTL_MASK | 45 | PSSCR_MTL_MASK |
46 | 46 | ||
47 | /* Idle state entry routines */ | ||
48 | |||
49 | #define IDLE_STATE_ENTER_SEQ(IDLE_INST) \ | ||
50 | /* Magic NAP/SLEEP/WINKLE mode enter sequence */ \ | ||
51 | std r0,0(r1); \ | ||
52 | ptesync; \ | ||
53 | ld r0,0(r1); \ | ||
54 | 1: cmp cr0,r0,r0; \ | ||
55 | bne 1b; \ | ||
56 | IDLE_INST; \ | ||
57 | b . | ||
58 | |||
59 | .text | 47 | .text |
60 | 48 | ||
61 | /* | 49 | /* |