* Patch "powerpc/xmon: Fix an unexpected xmon on/off state change" has been added to the 4.9-stable tree
@ 2018-03-18 16:03 gregkh
2018-03-19 3:42 ` Michael Ellerman
0 siblings, 1 reply; 3+ messages in thread
From: gregkh @ 2018-03-18 16:03 UTC (permalink / raw)
To: xinhui.pan, alexander.levin, gpiccoli, gregkh, mpe; +Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
powerpc/xmon: Fix an unexpected xmon on/off state change
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
powerpc-xmon-fix-an-unexpected-xmon-on-off-state-change.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From foo@baz Sun Mar 18 16:55:33 CET 2018
From: Pan Xinhui <xinhui.pan@linux.vnet.ibm.com>
Date: Wed, 22 Mar 2017 16:27:49 -0300
Subject: powerpc/xmon: Fix an unexpected xmon on/off state change
From: Pan Xinhui <xinhui.pan@linux.vnet.ibm.com>
[ Upstream commit 3b5bf42b81d56085fd58692b5117f69aa77fdff7 ]
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>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/powerpc/xmon/xmon.c | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)
--- a/arch/powerpc/xmon/xmon.c
+++ b/arch/powerpc/xmon/xmon.c
@@ -74,6 +74,7 @@ static int xmon_gate;
#endif /* CONFIG_SMP */
static unsigned long in_xmon __read_mostly = 0;
+static int xmon_on = IS_ENABLED(CONFIG_XMON_DEFAULT);
static unsigned long adrs;
static int size = 1;
@@ -3244,6 +3245,8 @@ static void sysrq_handle_xmon(int key)
/* ensure xmon is enabled */
xmon_init(1);
debugger(get_irq_regs());
+ if (!xmon_on)
+ xmon_init(0);
}
static struct sysrq_key_op sysrq_xmon_op = {
@@ -3260,7 +3263,7 @@ static int __init setup_xmon_sysrq(void)
__initcall(setup_xmon_sysrq);
#endif /* CONFIG_MAGIC_SYSRQ */
-static int __initdata xmon_early, xmon_off;
+static int __initdata xmon_early;
static int __init early_parse_xmon(char *p)
{
@@ -3268,10 +3271,12 @@ static int __init early_parse_xmon(char
/* just "xmon" is equivalent to "xmon=early" */
xmon_init(1);
xmon_early = 1;
- } else if (strncmp(p, "on", 2) == 0)
+ xmon_on = 1;
+ } else if (strncmp(p, "on", 2) == 0) {
xmon_init(1);
- else if (strncmp(p, "off", 3) == 0)
- xmon_off = 1;
+ xmon_on = 1;
+ } else if (strncmp(p, "off", 3) == 0)
+ xmon_on = 0;
else if (strncmp(p, "nobt", 4) == 0)
xmon_no_auto_backtrace = 1;
else
@@ -3283,10 +3288,8 @@ early_param("xmon", early_parse_xmon);
void __init xmon_setup(void)
{
-#ifdef CONFIG_XMON_DEFAULT
- if (!xmon_off)
+ if (xmon_on)
xmon_init(1);
-#endif
if (xmon_early)
debugger(NULL);
}
Patches currently in stable-queue which might be from xinhui.pan@linux.vnet.ibm.com are
queue-4.9/powerpc-xmon-fix-an-unexpected-xmon-on-off-state-change.patch
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Patch "powerpc/xmon: Fix an unexpected xmon on/off state change" has been added to the 4.9-stable tree
2018-03-18 16:03 Patch "powerpc/xmon: Fix an unexpected xmon on/off state change" has been added to the 4.9-stable tree gregkh
@ 2018-03-19 3:42 ` Michael Ellerman
2018-03-19 8:57 ` Greg KH
0 siblings, 1 reply; 3+ messages in thread
From: Michael Ellerman @ 2018-03-19 3:42 UTC (permalink / raw)
To: gregkh, xinhui.pan, alexander.levin, gpiccoli, gregkh
Cc: stable, stable-commits
<gregkh@linuxfoundation.org> writes:
> This is a note to let you know that I've just added the patch titled
>
> powerpc/xmon: Fix an unexpected xmon on/off state change
>
> to the 4.9-stable tree which can be found at:
> http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
>
> The filename of the patch is:
> powerpc-xmon-fix-an-unexpected-xmon-on-off-state-change.patch
> and it can be found in the queue-4.9 subdirectory.
>
> If you, or anyone else, feels it should not be added to the stable tree,
> please let <stable@vger.kernel.org> know about it.
>
>
> From foo@baz Sun Mar 18 16:55:33 CET 2018
> From: Pan Xinhui <xinhui.pan@linux.vnet.ibm.com>
> Date: Wed, 22 Mar 2017 16:27:49 -0300
> Subject: powerpc/xmon: Fix an unexpected xmon on/off state change
Please drop this from stable for now, there are some fixes for it
pending in my next branch.
cheers
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Patch "powerpc/xmon: Fix an unexpected xmon on/off state change" has been added to the 4.9-stable tree
2018-03-19 3:42 ` Michael Ellerman
@ 2018-03-19 8:57 ` Greg KH
0 siblings, 0 replies; 3+ messages in thread
From: Greg KH @ 2018-03-19 8:57 UTC (permalink / raw)
To: Michael Ellerman
Cc: xinhui.pan, alexander.levin, gpiccoli, stable, stable-commits
On Mon, Mar 19, 2018 at 02:42:30PM +1100, Michael Ellerman wrote:
> <gregkh@linuxfoundation.org> writes:
>
> > This is a note to let you know that I've just added the patch titled
> >
> > powerpc/xmon: Fix an unexpected xmon on/off state change
> >
> > to the 4.9-stable tree which can be found at:
> > http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
> >
> > The filename of the patch is:
> > powerpc-xmon-fix-an-unexpected-xmon-on-off-state-change.patch
> > and it can be found in the queue-4.9 subdirectory.
> >
> > If you, or anyone else, feels it should not be added to the stable tree,
> > please let <stable@vger.kernel.org> know about it.
> >
> >
> > From foo@baz Sun Mar 18 16:55:33 CET 2018
> > From: Pan Xinhui <xinhui.pan@linux.vnet.ibm.com>
> > Date: Wed, 22 Mar 2017 16:27:49 -0300
> > Subject: powerpc/xmon: Fix an unexpected xmon on/off state change
>
> Please drop this from stable for now, there are some fixes for it
> pending in my next branch.
Now dropped, thanks for letting me know.
greg k-h
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-03-19 8:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-18 16:03 Patch "powerpc/xmon: Fix an unexpected xmon on/off state change" has been added to the 4.9-stable tree gregkh
2018-03-19 3:42 ` Michael Ellerman
2018-03-19 8:57 ` Greg KH
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.