aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/xmon
diff options
context:
space:
mode:
authorMichael Ellerman <mpe@ellerman.id.au>2013-12-23 07:46:06 -0500
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2014-02-10 19:24:51 -0500
commitd2b496e5e1fa7a6796534e435440eb9d3ed184dd (patch)
tree8de313f2c772d2d62a8bdaeb3ed5c2aff0ea5253 /arch/powerpc/xmon
parent1507589787529b0d8e2a9e66e0c6f113ecab5181 (diff)
powerpc/xmon: Don't signal we've entered until we're finished printing
Currently we set our cpu's bit in cpus_in_xmon, and then we take the output lock and print the exception information. This can race with the master cpu entering the command loop and printing the backtrace. The result is that the backtrace gets garbled with another cpu's exception print out. Fix it by delaying the set of cpus_in_xmon until we are finished printing. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/xmon')
-rw-r--r--arch/powerpc/xmon/xmon.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c
index d712b23974ec..b07909850f77 100644
--- a/arch/powerpc/xmon/xmon.c
+++ b/arch/powerpc/xmon/xmon.c
@@ -404,7 +404,6 @@ static int xmon_core(struct pt_regs *regs, int fromipi)
404 } 404 }
405 405
406 xmon_fault_jmp[cpu] = recurse_jmp; 406 xmon_fault_jmp[cpu] = recurse_jmp;
407 cpumask_set_cpu(cpu, &cpus_in_xmon);
408 407
409 bp = NULL; 408 bp = NULL;
410 if ((regs->msr & (MSR_IR|MSR_PR|MSR_64BIT)) == (MSR_IR|MSR_64BIT)) 409 if ((regs->msr & (MSR_IR|MSR_PR|MSR_64BIT)) == (MSR_IR|MSR_64BIT))
@@ -426,6 +425,8 @@ static int xmon_core(struct pt_regs *regs, int fromipi)
426 release_output_lock(); 425 release_output_lock();
427 } 426 }
428 427
428 cpumask_set_cpu(cpu, &cpus_in_xmon);
429
429 waiting: 430 waiting:
430 secondary = 1; 431 secondary = 1;
431 while (secondary && !xmon_gate) { 432 while (secondary && !xmon_gate) {