* [kvm-ppc-devel] [PATCH] kvmppc_sysrq: register our sysrq handler
@ 2008-03-20 10:17 ehrhardt
2008-03-21 20:36 ` Hollis Blanchard
0 siblings, 1 reply; 2+ messages in thread
From: ehrhardt @ 2008-03-20 10:17 UTC (permalink / raw)
To: kvm-ppc
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-03-21 20:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-20 10:17 [kvm-ppc-devel] [PATCH] kvmppc_sysrq: register our sysrq handler ehrhardt
2008-03-21 20:36 ` Hollis Blanchard
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.