OSDN Git Service

powerpc/xmon: Fix an unexpected xmon on/off state change
authorPan Xinhui <xinhui.pan@linux.vnet.ibm.com>
Wed, 22 Mar 2017 19:27:49 +0000 (16:27 -0300)
committerMichael Ellerman <mpe@ellerman.id.au>
Mon, 27 Mar 2017 23:52:00 +0000 (10:52 +1100)
commit3b5bf42b81d56085fd58692b5117f69aa77fdff7
tree0af0955fad922cd8a531a55bc8c261b072a369f4
parentc7e790c5f4c3e923664f45dfbc84492406bef045
powerpc/xmon: Fix an unexpected xmon on/off state change

Once xmon is triggered by sysrq-x, it is enabled always afterwards even
if it is disabled during boot. This will cause a system reset interrupt
fail to dump. So keep xmon in its original state after exit.

We have several ways to set xmon on or off.
1) by a build config CONFIG_XMON_DEFAULT.
2) by a boot cmdline with xmon or xmon=early or xmon=on to enable xmon
and xmon=off to disable xmon. This value will override that in step 1.
3) by a debugfs interface, as proposed in this patchset.
And this value can override those in step 1 and 2.

Signed-off-by: Pan Xinhui <xinhui.pan@linux.vnet.ibm.com>
Signed-off-by: Guilherme G. Piccoli <gpiccoli@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/xmon/xmon.c