aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2011-02-21 00:31:49 -0500
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2011-04-01 00:37:20 -0400
commit45e07fd045153c0049c99b0cf6cf7254c164d37b (patch)
tree8e4bf7173712ad1608985505f4f80571ad0ebcf6 /arch
parent1c91cc570576dfd0f288d664c095d64d11aaace4 (diff)
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')
-rw-r--r--arch/powerpc/platforms/powermac/smp.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/arch/powerpc/platforms/powermac/smp.c b/arch/powerpc/platforms/powermac/smp.c
index e0ac7bb77f29..eda470913291 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)
867 867
868#if defined(CONFIG_HOTPLUG_CPU) && defined(CONFIG_PPC32) 868#if defined(CONFIG_HOTPLUG_CPU) && defined(CONFIG_PPC32)
869 869
870int smp_core99_cpu_disable(void) 870static int smp_core99_cpu_disable(void)
871{ 871{
872 set_cpu_online(smp_processor_id(), false); 872 int rc = generic_cpu_disable();
873 if (rc)
874 return rc;
873 875
874 /* XXX reset cpu affinity here */
875 mpic_cpu_set_priority(0xf); 876 mpic_cpu_set_priority(0xf);
876 asm volatile("mtdec %0" : : "r" (0x7fffffff)); 877
877 mb();
878 udelay(20);
879 asm volatile("mtdec %0" : : "r" (0x7fffffff));
880 return 0; 878 return 0;
881} 879}
882 880
@@ -902,12 +900,7 @@ struct smp_ops_t core99_smp_ops = {
902 .give_timebase = smp_core99_give_timebase, 900 .give_timebase = smp_core99_give_timebase,
903 .take_timebase = smp_core99_take_timebase, 901 .take_timebase = smp_core99_take_timebase,
904#if defined(CONFIG_HOTPLUG_CPU) 902#if defined(CONFIG_HOTPLUG_CPU)
905# if defined(CONFIG_PPC32)
906 .cpu_disable = smp_core99_cpu_disable, 903 .cpu_disable = smp_core99_cpu_disable,
907# endif
908# if defined(CONFIG_PPC64)
909 .cpu_disable = generic_cpu_disable,
910# endif
911 .cpu_die = generic_cpu_die, 904 .cpu_die = generic_cpu_die,
912#endif 905#endif
913}; 906};