From mboxrd@z Thu Jan 1 00:00:00 1970 From: ehrhardt@linux.vnet.ibm.com Date: Thu, 20 Mar 2008 10:17:28 +0000 Subject: [kvm-ppc-devel] [PATCH] kvmppc_sysrq: register our sysrq handler Message-Id: <1206008256712-git-send-email-ehrhardt@linux.vnet.ibm.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: kvm-ppc@vger.kernel.org Subject: [PATCH] kvmppc_sysrq: register our sysrq handler From: Christian Ehrhardt 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 --- 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