From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752413AbdBOVW3 (ORCPT ); Wed, 15 Feb 2017 16:22:29 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:41846 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751686AbdBOVW2 (ORCPT ); Wed, 15 Feb 2017 16:22:28 -0500 Subject: Re: [PATCH] powerpc/xmon: Fix an unexpected xmon onoff state change To: Pan Xinhui , linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org References: <1487144990-5969-1-git-send-email-xinhui.pan@linux.vnet.ibm.com> Cc: benh@kernel.crashing.org, paulus@samba.org, mpe@ellerman.id.au, npiggin@gmail.com From: "Guilherme G. Piccoli" Date: Wed, 15 Feb 2017 19:22:16 -0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: <1487144990-5969-1-git-send-email-xinhui.pan@linux.vnet.ibm.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 17021521-0032-0000-0000-0000053F234C X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17021521-0033-0000-0000-000011C22538 Message-Id: X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-02-15_11:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1612050000 definitions=main-1702150193 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 15/02/2017 05:49, Pan Xinhui wrote: > 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 interrut > fail to dump. So keep xmon in its original state after exit. > > Signed-off-by: Pan Xinhui Patch is fine - minor typo: interrut => interrupt Feel free to add my: Tested-by: Guilherme G. Piccoli Thanks, Guilherme > --- > arch/powerpc/xmon/xmon.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c > index 9c0e17c..721212f 100644 > --- a/arch/powerpc/xmon/xmon.c > +++ b/arch/powerpc/xmon/xmon.c > @@ -76,6 +76,7 @@ static int xmon_gate; > #endif /* CONFIG_SMP */ > > static unsigned long in_xmon __read_mostly = 0; > +static int xmon_off = 0; > > static unsigned long adrs; > static int size = 1; > @@ -3250,6 +3251,8 @@ static void sysrq_handle_xmon(int key) > /* ensure xmon is enabled */ > xmon_init(1); > debugger(get_irq_regs()); > + if (xmon_off) > + xmon_init(0); > } > > static struct sysrq_key_op sysrq_xmon_op = { > @@ -3266,7 +3269,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) > { >