From 0f61dbcdfc9e896119f2c236470f6e3d12fe1197 Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Fri, 30 Jan 2004 18:01:33 -0800 Subject: [PATCH] [PATCH] ppc64: use CONFIG_MAGIC_SYSRQ around xmon sysrq code From: Anton Blanchard --- arch/ppc64/xmon/start.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/ppc64/xmon/start.c b/arch/ppc64/xmon/start.c index 02e6940b17841..f26a22c53700b 100644 --- a/arch/ppc64/xmon/start.c +++ b/arch/ppc64/xmon/start.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include @@ -29,11 +30,14 @@ static inline unsigned int readtb(void) return ret; } +#ifdef CONFIG_MAGIC_SYSRQ + static void sysrq_handle_xmon(int key, struct pt_regs *pt_regs, struct tty_struct *tty) { xmon(pt_regs); } + static struct sysrq_key_op sysrq_xmon_op = { .handler = sysrq_handle_xmon, @@ -41,11 +45,15 @@ static struct sysrq_key_op sysrq_xmon_op = .action_msg = "Entering xmon\n", }; +#endif /* CONFIG_MAGIC_SYSRQ */ + void xmon_map_scc(void) { +#ifdef CONFIG_MAGIC_SYSRQ /* This maybe isn't the best place to register sysrq 'x' */ __sysrq_put_key_op('x', &sysrq_xmon_op); +#endif /* CONFIG_MAGIC_SYSRQ */ } int -- 2.53.0