Skip to content

Commit

Permalink
powerpc/xmon: Fix disabling tracing while in xmon
Browse files Browse the repository at this point in the history
Commit ed49f7f ("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: ed49f7f ("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>
  • Loading branch information
Naveen N. Rao authored and Michael Ellerman committed Jul 1, 2019
1 parent 6820e56 commit aaf0666
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions arch/powerpc/xmon/xmon.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit aaf0666

Please sign in to comment.