aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ppc64
diff options
context:
space:
mode:
authorMichael Ellerman <michael@ellerman.id.au>2005-11-11 08:06:05 -0500
committerPaul Mackerras <paulus@samba.org>2005-11-14 00:33:09 -0500
commitc5e24354efae9f962e0e369d875d45f47e0bb9aa (patch)
tree9a92ab7168cd45eb5104ce662e82626b62609aa4 /arch/ppc64
parent5cd16ee934eafca74a6bb790328950cec68a8b78 (diff)
[PATCH] powerpc: Turn cpu_irq_down into kexec_cpu_down
We currently have a ppc_md member called cpu_irq_down, which disables IRQs for the cpu in question. The only caller of cpu_irq_down is the kexec code. On pSeries we need to do more than just teardown IRQs at kexec time, so rename the ppc_md member to kexec_cpu_down and expand it. The pSeries code needs to know, and other platforms might too, whether we're doing a crash shutdown (ie. panicking) or a regular kexec, so add a flag for that. The pSeries implementation of kexec_cpu_down does an unregister VPA call, which tells the Hypervisor to stop writing stuff into our pacas. Without this we can get weird memory corruption bugs when we kexec, caused by the Hypervisor writing into the first kernel's pacas which happens to be somewhere interesting in the second kernel's memory. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/ppc64')
-rw-r--r--arch/ppc64/kernel/machine_kexec.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/arch/ppc64/kernel/machine_kexec.c b/arch/ppc64/kernel/machine_kexec.c
index 07ea03598c00..203f1d5e6f10 100644
--- a/arch/ppc64/kernel/machine_kexec.c
+++ b/arch/ppc64/kernel/machine_kexec.c
@@ -185,8 +185,8 @@ void kexec_copy_flush(struct kimage *image)
185 */ 185 */
186void kexec_smp_down(void *arg) 186void kexec_smp_down(void *arg)
187{ 187{
188 if (ppc_md.cpu_irq_down) 188 if (ppc_md.kexec_cpu_down)
189 ppc_md.cpu_irq_down(1); 189 ppc_md.kexec_cpu_down(0, 1);
190 190
191 local_irq_disable(); 191 local_irq_disable();
192 kexec_smp_wait(); 192 kexec_smp_wait();
@@ -233,8 +233,8 @@ static void kexec_prepare_cpus(void)
233 } 233 }
234 234
235 /* after we tell the others to go down */ 235 /* after we tell the others to go down */
236 if (ppc_md.cpu_irq_down) 236 if (ppc_md.kexec_cpu_down)
237 ppc_md.cpu_irq_down(0); 237 ppc_md.kexec_cpu_down(0, 0);
238 238
239 put_cpu(); 239 put_cpu();
240 240
@@ -255,8 +255,8 @@ static void kexec_prepare_cpus(void)
255 * UP to an SMP kernel. 255 * UP to an SMP kernel.
256 */ 256 */
257 smp_release_cpus(); 257 smp_release_cpus();
258 if (ppc_md.cpu_irq_down) 258 if (ppc_md.kexec_cpu_down)
259 ppc_md.cpu_irq_down(0); 259 ppc_md.kexec_cpu_down(0, 0);
260 local_irq_disable(); 260 local_irq_disable();
261} 261}
262 262