From patchwork Wed Oct 18 11:34:36 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Guilherme G. Piccoli" X-Patchwork-Id: 827534 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3yH9412j23z9t1G for ; Wed, 18 Oct 2017 22:36:01 +1100 (AEDT) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3yH9411XtBzDrTb for ; Wed, 18 Oct 2017 22:36:01 +1100 (AEDT) X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=linux.vnet.ibm.com (client-ip=148.163.156.1; helo=mx0a-001b2d01.pphosted.com; envelope-from=gpiccoli@linux.vnet.ibm.com; receiver=) Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3yH92c2F9zzDqJ7 for ; Wed, 18 Oct 2017 22:34:47 +1100 (AEDT) Received: from pps.filterd (m0098396.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id v9IBY9b7051853 for ; Wed, 18 Oct 2017 07:34:45 -0400 Received: from e18.ny.us.ibm.com (e18.ny.us.ibm.com [129.33.205.208]) by mx0a-001b2d01.pphosted.com with ESMTP id 2dp5fm3cqr-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Wed, 18 Oct 2017 07:34:45 -0400 Received: from localhost by e18.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 18 Oct 2017 07:34:44 -0400 Received: from b01cxnp22034.gho.pok.ibm.com (9.57.198.24) by e18.ny.us.ibm.com (146.89.104.205) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Wed, 18 Oct 2017 07:34:42 -0400 Received: from b01ledav005.gho.pok.ibm.com (b01ledav005.gho.pok.ibm.com [9.57.199.110]) by b01cxnp22034.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id v9IBYgl453215298; Wed, 18 Oct 2017 11:34:42 GMT Received: from b01ledav005.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6BD15AE03B; Wed, 18 Oct 2017 07:35:23 -0400 (EDT) Received: from localhost (unknown [9.80.197.210]) by b01ledav005.gho.pok.ibm.com (Postfix) with ESMTP id 8FAF6AE04E; Wed, 18 Oct 2017 07:35:22 -0400 (EDT) From: "Guilherme G. Piccoli" To: linuxppc-dev@lists.ozlabs.org Subject: [PATCH] powerpc/xmon: Always enable xmon sysrq trigger Date: Wed, 18 Oct 2017 09:34:36 -0200 X-Mailer: git-send-email 2.14.2 X-TM-AS-GCONF: 00 x-cbid: 17101811-0044-0000-0000-000003A17CFD X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00007913; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000237; SDB=6.00932874; UDB=6.00469819; IPR=6.00713164; BA=6.00005646; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00017590; XFM=3.00000015; UTC=2017-10-18 11:34:44 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17101811-0045-0000-0000-000007D083FC Message-Id: <20171018113436.16112-1-gpiccoli@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-10-18_04:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=1 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000 definitions=main-1710180163 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.24 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: brking@linux.vnet.ibm.com, paulus@samba.org, gpiccoli@linux.vnet.ibm.com Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" Distros vary the way they enable SysRq by default - mostly they seem to enable some mask and then majority of the SysRq functions are disabled. For instance, xmon does not even have a mask, and unsless SysRq are completely enabled ( == 1), xmon trigger keeps disabled. Countless times while investigating hangs we needed xmon and it was disabled - machine just got hung and while in serial console, we just couldn't drop to xmon, forcing to a new attempt to reproduce the issue with SysRq fully enabled. This patch "fixes" this by having xmon enabled in all possible masks of SysRq. In other words, xmon trigger will only be disabled if SysRq is 0 (completely disabled). So, while debugging a hung, when one tries to drop to xmon this patch prevents the frustrating message: "This sysrq operation is disabled". Signed-off-by: Guilherme G. Piccoli --- Patch built and tested against powerpc/next. arch/powerpc/xmon/xmon.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c index 4679aeb84767..780d708472a2 100644 --- a/arch/powerpc/xmon/xmon.c +++ b/arch/powerpc/xmon/xmon.c @@ -3514,6 +3514,7 @@ static struct sysrq_key_op sysrq_xmon_op = { .handler = sysrq_handle_xmon, .help_msg = "xmon(x)", .action_msg = "Entering xmon", + .enable_mask = 0xFFFF, }; static int __init setup_xmon_sysrq(void)