All of lore.kernel.org
 help / color / mirror / Atom feed
From: ehrhardt@linux.vnet.ibm.com
To: kvm-ppc@vger.kernel.org
Subject: [kvm-ppc-devel] [PATCH] kvmppc_sysrq: register our sysrq handler
Date: Thu, 20 Mar 2008 10:17:28 +0000	[thread overview]
Message-ID: <1206008256712-git-send-email-ehrhardt@linux.vnet.ibm.com> (raw)

Subject: [PATCH] kvmppc_sysrq: register our sysrq handler

From: Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>

At the moment the existing patch adds handler and the ops structure
but does not use it in any way. This patch adds the needed call to
register_sysrq_key to be able to actually use it.
Additionally a new ifdef prevents a warning about unused sysrq_kvm_op
in the case that CONFIG_MAGIC_SYSRQ is not sleected.

Signed-off-by: Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>
---

 powerpc.c |    3 +++
 1 files changed, 3 insertions(+)

diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c
--- a/arch/powerpc/kvm/powerpc.c
+++ b/arch/powerpc/kvm/powerpc.c
@@ -981,6 +981,7 @@ static struct rchan_callbacks relay_call
         .remove_buf_file = remove_buf_file_handler,
 };
 
+#ifdef CONFIG_MAGIC_SYSRQ
 static void sysrq_handle_kvm(int key, struct tty_struct *tty)
 {
        kvmppc_debug = !kvmppc_debug;
@@ -990,6 +991,7 @@ static struct sysrq_key_op sysrq_kvm_op 
        .help_msg       = "kVmppc debug",
        .action_msg     = "Enable KVM debugging",
 };
+#endif
 
 int kvm_arch_init(void *opaque)
 {
@@ -997,6 +999,11 @@ int kvm_arch_init(void *opaque)
 	                                 &relay_callbacks, NULL);
 	if (!kvmppc_44x_tlb_chan)
 		printk("relay_open failed\n");
+
+#ifdef CONFIG_MAGIC_SYSRQ
+	printk("Registering kvmppc sysrq handler\n");
+	register_sysrq_key('V', &sysrq_kvm_op);
+#endif
 
 	return 0;
 }

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
kvm-ppc-devel mailing list
kvm-ppc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-ppc-devel

             reply	other threads:[~2008-03-20 10:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-20 10:17 ehrhardt [this message]
2008-03-21 20:36 ` [kvm-ppc-devel] [PATCH] kvmppc_sysrq: register our sysrq handler Hollis Blanchard

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=1206008256712-git-send-email-ehrhardt@linux.vnet.ibm.com \
    --to=ehrhardt@linux.vnet.ibm.com \
    --cc=kvm-ppc@vger.kernel.org \
    /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 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.