From: Vaibhav Jain <vaibhav@linux.vnet.ibm.com>
To: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org
Cc: Vaibhav Jain <vaibhav@linux.vnet.ibm.com>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Paul Mackerras <paulus@samba.org>,
Michael Ellerman <mpe@ellerman.id.au>,
Balbir Singh <bsingharora@gmail.com>,
Nicholas Piggin <npiggin@gmail.com>,
Douglas Miller <dougmill@linux.vnet.ibm.com>,
Pan Xinhui <xinhui.pan@linux.vnet.ibm.com>
Subject: [PATCH] powerpc/xmon: Dont register sysrq key when kernel param xmon=off
Date: Mon, 12 Feb 2018 14:29:56 +0530 [thread overview]
Message-ID: <20180212085956.12016-1-vaibhav@linux.vnet.ibm.com> (raw)
Presently sysrq key for xmon('x') is registered during kernel init
irrespective of the value of kernel param 'xmon'. Thus xmon is enabled
even if 'xmon=off' is passed on the kernel command line.
This minor patch updates setup_xmon_sysrq() to register
'sysrq_xmon_op' only when variable 'xmon_on' is set.
Signed-off-by: Vaibhav Jain <vaibhav@linux.vnet.ibm.com>
---
arch/powerpc/xmon/xmon.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c
index 82e1a3ee6e0f..3b995474b102 100644
--- a/arch/powerpc/xmon/xmon.c
+++ b/arch/powerpc/xmon/xmon.c
@@ -3642,8 +3642,7 @@ static struct sysrq_key_op sysrq_xmon_op = {
static int __init setup_xmon_sysrq(void)
{
- register_sysrq_key('x', &sysrq_xmon_op);
- return 0;
+ return xmon_on ? register_sysrq_key('x', &sysrq_xmon_op) : 0;
}
device_initcall(setup_xmon_sysrq);
#endif /* CONFIG_MAGIC_SYSRQ */
--
2.14.3
next reply other threads:[~2018-02-12 9:00 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-12 8:59 Vaibhav Jain [this message]
2018-02-12 11:12 ` [PATCH] powerpc/xmon: Dont register sysrq key when kernel param xmon=off Balbir Singh
2018-02-12 12:35 ` Vaibhav Jain
2018-02-13 22:01 ` Balbir Singh
2018-02-14 11:40 ` Michael Ellerman
2018-02-15 6:43 ` Vaibhav Jain
2018-02-19 8:36 ` Michael Ellerman
2018-02-26 11:46 ` Vaibhav Jain
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180212085956.12016-1-vaibhav@linux.vnet.ibm.com \
--to=vaibhav@linux.vnet.ibm.com \
--cc=benh@kernel.crashing.org \
--cc=bsingharora@gmail.com \
--cc=dougmill@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=npiggin@gmail.com \
--cc=paulus@samba.org \
--cc=xinhui.pan@linux.vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).