diff options
author | Paul Mackerras <paulus@samba.org> | 2006-03-27 17:28:14 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-03-27 17:28:14 -0500 |
commit | ff2e6d7e27cf1f757ab0d97e1a9e46de47152a0e (patch) | |
tree | 3fc5952629df5cd6a5c3e49e44b3f43a2e0414bb /arch | |
parent | 9618edab82fda8dbce5ea3abcdac9ded07abb2d4 (diff) |
powerpc: Fix goof in 6xx and POWER4 idle power-save functions
This fixes a mistake I made when editing these functions - when I
took out the interrupt disabling code (because interrupts are now
disabled by the caller) I left the register that is used for the MSR
value to be used during doze/nap uninitialized. This fixes it.
Also updated some of the comments in idle_power4.S and removed some
code that was copied over from idle_6xx.S but is no longer relevant
(we don't ever clear the CPU_FTR_CAN_NAP bit at runtime for POWER4).
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/kernel/idle_6xx.S | 3 | ||||
-rw-r--r-- | arch/powerpc/kernel/idle_power4.S | 23 |
2 files changed, 5 insertions, 21 deletions
diff --git a/arch/powerpc/kernel/idle_6xx.S b/arch/powerpc/kernel/idle_6xx.S index 1647ea361ef7..12a4efbaa08f 100644 --- a/arch/powerpc/kernel/idle_6xx.S +++ b/arch/powerpc/kernel/idle_6xx.S | |||
@@ -144,7 +144,8 @@ BEGIN_FTR_SECTION | |||
144 | DSSALL | 144 | DSSALL |
145 | sync | 145 | sync |
146 | END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC) | 146 | END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC) |
147 | ori r7,r7,MSR_EE /* Could be ommited (already set) */ | 147 | mfmsr r7 |
148 | ori r7,r7,MSR_EE | ||
148 | oris r7,r7,MSR_POW@h | 149 | oris r7,r7,MSR_POW@h |
149 | sync | 150 | sync |
150 | isync | 151 | isync |
diff --git a/arch/powerpc/kernel/idle_power4.S b/arch/powerpc/kernel/idle_power4.S index 692cf2ebe0f4..6dad1c02496e 100644 --- a/arch/powerpc/kernel/idle_power4.S +++ b/arch/powerpc/kernel/idle_power4.S | |||
@@ -1,11 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * This file contains the power_save function for 6xx & 7xxx CPUs | 2 | * This file contains the power_save function for 970-family CPUs. |
3 | * rewritten in assembler | ||
4 | * | ||
5 | * Warning ! This code assumes that if your machine has a 750fx | ||
6 | * it will have PLL 1 set to low speed mode (used during NAP/DOZE). | ||
7 | * if this is not the case some additional changes will have to | ||
8 | * be done to check a runtime var (a bit like powersave-nap) | ||
9 | * | 3 | * |
10 | * This program is free software; you can redistribute it and/or | 4 | * This program is free software; you can redistribute it and/or |
11 | * modify it under the terms of the GNU General Public License | 5 | * modify it under the terms of the GNU General Public License |
@@ -26,23 +20,10 @@ | |||
26 | 20 | ||
27 | .text | 21 | .text |
28 | 22 | ||
29 | /* | ||
30 | * Here is the power_save_6xx function. This could eventually be | ||
31 | * split into several functions & changing the function pointer | ||
32 | * depending on the various features. | ||
33 | */ | ||
34 | _GLOBAL(power4_idle) | 23 | _GLOBAL(power4_idle) |
35 | BEGIN_FTR_SECTION | 24 | BEGIN_FTR_SECTION |
36 | blr | 25 | blr |
37 | END_FTR_SECTION_IFCLR(CPU_FTR_CAN_NAP) | 26 | END_FTR_SECTION_IFCLR(CPU_FTR_CAN_NAP) |
38 | /* We must dynamically check for the NAP feature as it | ||
39 | * can be cleared by CPU init after the fixups are done | ||
40 | */ | ||
41 | LOAD_REG_ADDRBASE(r3,cur_cpu_spec) | ||
42 | ld r4,ADDROFF(cur_cpu_spec)(r3) | ||
43 | ld r4,CPU_SPEC_FEATURES(r4) | ||
44 | andi. r0,r4,CPU_FTR_CAN_NAP | ||
45 | beqlr | ||
46 | /* Now check if user or arch enabled NAP mode */ | 27 | /* Now check if user or arch enabled NAP mode */ |
47 | LOAD_REG_ADDRBASE(r3,powersave_nap) | 28 | LOAD_REG_ADDRBASE(r3,powersave_nap) |
48 | lwz r4,ADDROFF(powersave_nap)(r3) | 29 | lwz r4,ADDROFF(powersave_nap)(r3) |
@@ -54,6 +35,8 @@ BEGIN_FTR_SECTION | |||
54 | DSSALL | 35 | DSSALL |
55 | sync | 36 | sync |
56 | END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC) | 37 | END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC) |
38 | mfmsr r7 | ||
39 | ori r7,r7,MSR_EE | ||
57 | oris r7,r7,MSR_POW@h | 40 | oris r7,r7,MSR_POW@h |
58 | sync | 41 | sync |
59 | isync | 42 | isync |