aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNathan Fontenot <nfont@austin.ibm.com>2008-02-06 15:37:31 -0500
committerPaul Mackerras <paulus@samba.org>2008-02-06 19:40:19 -0500
commitc3e8506c54f7263e71289e9e66533236d09f2fb7 (patch)
treeb2f067efe5e93a8acd35e876cf906697e4d0b7c6
parenta52572ddcd3d16cc5ccc9679bcbb7256d0ddad84 (diff)
[POWERPC] Split xics_teardown_cpu()
This splits off the kexec path bits of the xics_teardown_cpu() routine into its own xics_kexec_teardown_cpu() routine. With the previous combined routine the CPPR for a cpu that is being removed may have its CPPR reset in the plpar_eoi() call (which explicitly sets the CPPR to a non-zero value). Splitting of the kexec bits of the code prevents this from happening in the cpu remove path. Once again, this does not cause the cpu remove from the kernel to fail, but it does cause cpu dlpar operations to not be able to return the cpu to the hypervisor. Signed-off-by: Nathan Fontenot <nfont@austin.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
-rw-r--r--arch/powerpc/platforms/pseries/hotplug-cpu.c2
-rw-r--r--arch/powerpc/platforms/pseries/kexec.c2
-rw-r--r--arch/powerpc/platforms/pseries/xics.c14
-rw-r--r--arch/powerpc/platforms/pseries/xics.h3
4 files changed, 14 insertions, 7 deletions
diff --git a/arch/powerpc/platforms/pseries/hotplug-cpu.c b/arch/powerpc/platforms/pseries/hotplug-cpu.c
index c4ad54e0f288..1f032483c026 100644
--- a/arch/powerpc/platforms/pseries/hotplug-cpu.c
+++ b/arch/powerpc/platforms/pseries/hotplug-cpu.c
@@ -58,7 +58,7 @@ static void pseries_mach_cpu_die(void)
58{ 58{
59 local_irq_disable(); 59 local_irq_disable();
60 idle_task_exit(); 60 idle_task_exit();
61 xics_teardown_cpu(0); 61 xics_teardown_cpu();
62 unregister_slb_shadow(hard_smp_processor_id(), __pa(get_slb_shadow())); 62 unregister_slb_shadow(hard_smp_processor_id(), __pa(get_slb_shadow()));
63 rtas_stop_self(); 63 rtas_stop_self();
64 /* Should never get here... */ 64 /* Should never get here... */
diff --git a/arch/powerpc/platforms/pseries/kexec.c b/arch/powerpc/platforms/pseries/kexec.c
index 412a5e7aff2d..e9dd5fe081c9 100644
--- a/arch/powerpc/platforms/pseries/kexec.c
+++ b/arch/powerpc/platforms/pseries/kexec.c
@@ -54,7 +54,7 @@ void __init setup_kexec_cpu_down_mpic(void)
54static void pseries_kexec_cpu_down_xics(int crash_shutdown, int secondary) 54static void pseries_kexec_cpu_down_xics(int crash_shutdown, int secondary)
55{ 55{
56 pseries_kexec_cpu_down(crash_shutdown, secondary); 56 pseries_kexec_cpu_down(crash_shutdown, secondary);
57 xics_teardown_cpu(secondary); 57 xics_kexec_teardown_cpu(secondary);
58} 58}
59 59
60void __init setup_kexec_cpu_down_xics(void) 60void __init setup_kexec_cpu_down_xics(void)
diff --git a/arch/powerpc/platforms/pseries/xics.c b/arch/powerpc/platforms/pseries/xics.c
index 00e9d296118e..485cb399b837 100644
--- a/arch/powerpc/platforms/pseries/xics.c
+++ b/arch/powerpc/platforms/pseries/xics.c
@@ -775,11 +775,9 @@ void xics_request_IPIs(void)
775} 775}
776#endif /* CONFIG_SMP */ 776#endif /* CONFIG_SMP */
777 777
778void xics_teardown_cpu(int secondary) 778void xics_teardown_cpu()
779{ 779{
780 int cpu = smp_processor_id(); 780 int cpu = smp_processor_id();
781 unsigned int ipi;
782 struct irq_desc *desc;
783 781
784 xics_set_cpu_priority(0); 782 xics_set_cpu_priority(0);
785 783
@@ -790,9 +788,17 @@ void xics_teardown_cpu(int secondary)
790 lpar_qirr_info(cpu, 0xff); 788 lpar_qirr_info(cpu, 0xff);
791 else 789 else
792 direct_qirr_info(cpu, 0xff); 790 direct_qirr_info(cpu, 0xff);
791}
792
793void xics_kexec_teardown_cpu(int secondary)
794{
795 unsigned int ipi;
796 struct irq_desc *desc;
797
798 xics_teardown_cpu();
793 799
794 /* 800 /*
795 * we need to EOI the IPI if we got here from kexec down IPI 801 * we need to EOI the IPI
796 * 802 *
797 * probably need to check all the other interrupts too 803 * probably need to check all the other interrupts too
798 * should we be flagging idle loop instead? 804 * should we be flagging idle loop instead?
diff --git a/arch/powerpc/platforms/pseries/xics.h b/arch/powerpc/platforms/pseries/xics.h
index 9ffd809d29e2..c26bcff47b6d 100644
--- a/arch/powerpc/platforms/pseries/xics.h
+++ b/arch/powerpc/platforms/pseries/xics.h
@@ -16,7 +16,8 @@
16 16
17extern void xics_init_IRQ(void); 17extern void xics_init_IRQ(void);
18extern void xics_setup_cpu(void); 18extern void xics_setup_cpu(void);
19extern void xics_teardown_cpu(int secondary); 19extern void xics_teardown_cpu(void);
20extern void xics_kexec_teardown_cpu(int secondary);
20extern void xics_cause_IPI(int cpu); 21extern void xics_cause_IPI(int cpu);
21extern void xics_request_IPIs(void); 22extern void xics_request_IPIs(void);
22extern void xics_migrate_irqs_away(void); 23extern void xics_migrate_irqs_away(void);