summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNaveen N. Rao2019-06-27 11:59:40 +0200
committerMichael Ellerman2019-07-01 08:26:55 +0200
commitaaf06665f7ea3ee9f9754e16c1a507a89f1de5b1 (patch)
treefb1945c13dbcadfdc0b2f36c103e4b011c5023ef
parentselftests/powerpc: ppc_asm.h: typo in the header guard (diff)
downloadkernel-qcow2-linux-aaf06665f7ea3ee9f9754e16c1a507a89f1de5b1.tar.gz
kernel-qcow2-linux-aaf06665f7ea3ee9f9754e16c1a507a89f1de5b1.tar.xz
kernel-qcow2-linux-aaf06665f7ea3ee9f9754e16c1a507a89f1de5b1.zip
powerpc/xmon: Fix disabling tracing while in xmon
Commit ed49f7fd6438d ("powerpc/xmon: Disable tracing when entering xmon") added code to disable recording trace entries while in xmon. The commit introduced a variable 'tracing_enabled' to record if tracing was enabled on xmon entry, and used this to conditionally enable tracing during exit from xmon. However, we are not checking the value of 'fromipi' variable in xmon_core() when setting 'tracing_enabled'. Due to this, when secondary cpus enter xmon, they will see tracing as being disabled already and tracing won't be re-enabled on exit. Fix the same. Fixes: ed49f7fd6438d ("powerpc/xmon: Disable tracing when entering xmon") Signed-off-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
-rw-r--r--arch/powerpc/xmon/xmon.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c
index 1b0149b2bb6c..f1c4e1601b9d 100644
--- a/arch/powerpc/xmon/xmon.c
+++ b/arch/powerpc/xmon/xmon.c
@@ -469,8 +469,10 @@ static int xmon_core(struct pt_regs *regs, int fromipi)
local_irq_save(flags);
hard_irq_disable();
- tracing_enabled = tracing_is_on();
- tracing_off();
+ if (!fromipi) {
+ tracing_enabled = tracing_is_on();
+ tracing_off();
+ }
bp = in_breakpoint_table(regs->nip, &offset);
if (bp != NULL) {