Skip to contentSkip to conversation

kvmppc_sysrq: register our sysrq handler

PATCH Applied [email protected] 2 participants 2 messages Mar 20, 2008 – Mar 21, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kvmppc_sysrq: register our sysrq handler

Subject: [PATCH] kvmppc_sysrq: register our sysrq handler

From: Christian Ehrhardt <[email protected]>

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.

---

 powerpc.c |    3 +++
 1 files changed, 3 insertions(+)
arch/powerpc/kvm/powerpc.c +7 -0
@@ -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 [email protected]
https://lists.sourceforge.net/lists/listinfo/kvm-ppc-devel

#1 lore raw
Quoted 9 lines · On Thu, 2008-03-20 at 11:17 +0100, [email protected] wrote:

Subject: [PATCH] kvmppc_sysrq: register our sysrq handler

From: Christian Ehrhardt <[email protected]>

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.

Applied, thanks.

Signature · 12 lines
Hollis Blanchard
IBM Linux Technology Center


-------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/kvm-ppc-devel