diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2007-05-03 06:33:51 +1000 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-05-07 20:31:13 +1000 |
commit | d9333afd6a714760c13f76ba275a32ec7bd979c1 (patch) | |
tree | b75cb98ff938edca5aa5254b209d58037e8ec89c /arch/powerpc/kernel/idle_power4.S | |
parent | ac18c673e7fa71f62ce613edfe6634edb99f968b (diff) |
[POWERPC] powermac: Support G5 CPU hotplug
This allows "hotplugging" of CPUs on G5 machines. CPUs that are
disabled are put into an idle loop with the decrementer frequency set
to minimum. To wake them up again we kick them just like when bringing
them up. To stop those CPUs from messing with any global state we stop
them from entering the timer interrupt.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/kernel/idle_power4.S')
-rw-r--r-- | arch/powerpc/kernel/idle_power4.S | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/idle_power4.S b/arch/powerpc/kernel/idle_power4.S index ba319547860..5328709eeed 100644 --- a/arch/powerpc/kernel/idle_power4.S +++ b/arch/powerpc/kernel/idle_power4.S @@ -53,3 +53,24 @@ END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC) isync b 1b +_GLOBAL(power4_cpu_offline_powersave) + /* Go to NAP now */ + mfmsr r7 + rldicl r0,r7,48,1 + rotldi r0,r0,16 + mtmsrd r0,1 /* hard-disable interrupts */ + li r0,1 + li r6,0 + stb r0,PACAHARDIRQEN(r13) /* we'll hard-enable shortly */ + stb r6,PACASOFTIRQEN(r13) /* soft-disable irqs */ +BEGIN_FTR_SECTION + DSSALL + sync +END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC) + ori r7,r7,MSR_EE + oris r7,r7,MSR_POW@h + sync + isync + mtmsrd r7 + isync + blr |