diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2011-02-21 16:31:49 +1100 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2011-04-01 15:37:20 +1100 |
commit | 45e07fd045153c0049c99b0cf6cf7254c164d37b (patch) | |
tree | 8e4bf7173712ad1608985505f4f80571ad0ebcf6 /arch/powerpc | |
parent | 1c91cc570576dfd0f288d664c095d64d11aaace4 (diff) | |
download | op-kernel-dev-45e07fd045153c0049c99b0cf6cf7254c164d37b.zip op-kernel-dev-45e07fd045153c0049c99b0cf6cf7254c164d37b.tar.gz |
powerpc/pmac/smp: Fixup smp_core99_cpu_disable() and use it on 64-bit
Use the generic code, just add the MPIC priority setting,
I don't see any use in mucking around with the decrementer,
as 32-bit will have EE off all along, and 64-bit will be able
to deal with it.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/platforms/powermac/smp.c | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/arch/powerpc/platforms/powermac/smp.c b/arch/powerpc/platforms/powermac/smp.c index e0ac7bb..eda4709 100644 --- a/arch/powerpc/platforms/powermac/smp.c +++ b/arch/powerpc/platforms/powermac/smp.c @@ -867,16 +867,14 @@ static void __devinit smp_core99_setup_cpu(int cpu_nr) #if defined(CONFIG_HOTPLUG_CPU) && defined(CONFIG_PPC32) -int smp_core99_cpu_disable(void) +static int smp_core99_cpu_disable(void) { - set_cpu_online(smp_processor_id(), false); + int rc = generic_cpu_disable(); + if (rc) + return rc; - /* XXX reset cpu affinity here */ mpic_cpu_set_priority(0xf); - asm volatile("mtdec %0" : : "r" (0x7fffffff)); - mb(); - udelay(20); - asm volatile("mtdec %0" : : "r" (0x7fffffff)); + return 0; } @@ -902,12 +900,7 @@ struct smp_ops_t core99_smp_ops = { .give_timebase = smp_core99_give_timebase, .take_timebase = smp_core99_take_timebase, #if defined(CONFIG_HOTPLUG_CPU) -# if defined(CONFIG_PPC32) .cpu_disable = smp_core99_cpu_disable, -# endif -# if defined(CONFIG_PPC64) - .cpu_disable = generic_cpu_disable, -# endif .cpu_die = generic_cpu_die, #endif }; |