sysrq support
Tom Rini
trini at kernel.crashing.org
Sun Jan 16 05:25:24 EST 2000
On Sat, 15 Jan 2000, Olaf Hering wrote:
> On Fri, Jan 14, Giuliano Pochini wrote:
>
> > Is sysrq supported ? On my Pmac7300 2.2.14 compile dies with:
> >
> > keyboard.c: In function `handle_scancode':
> > keyboard.c:252: structure has no member named `ppc_kbd_sysrq_xlate'
>
> SysRq is broken since 2.2.14pre5.
>
> The attached patch should fix it. I guess the patch can go into the main
> kernel...
This patch (I sent it to Cort and Paul a while back, but never heard
anything) should work on CONFIG_PPC_ALL, or when you have two different
types of keyboards (ie ADB and USB).
---
Tom Rini (TR1265)
http://gate.crashing.org/~trini/
-------------- next part --------------
--- arch/ppc/kernel/gemini_setup.c.orig Mon Nov 29 15:07:10 1999
+++ arch/ppc/kernel/gemini_setup.c Mon Nov 29 15:07:25 1999
@@ -577,6 +577,6 @@
ppc_md.kbd_leds = NULL;
ppc_md.kbd_init_hw = NULL;
#ifdef CONFIG_MAGIC_SYSRQ
- ppc_md.ppc_kbd_sysrq_xlate = NULL;
+ ppc_md.kbd_sysrq_xlate = NULL;
#endif
}
--- arch/ppc/kernel/chrp_setup.c.orig Mon Nov 29 14:29:08 1999
+++ arch/ppc/kernel/chrp_setup.c Mon Nov 29 15:06:07 1999
@@ -487,6 +487,7 @@
ppc_md.kbd_init_hw = pckbd_init_hw;
#ifdef CONFIG_MAGIC_SYSRQ
ppc_md.kbd_sysrq_xlate = pckbd_sysrq_xlate;
+ ppc_md.SYSRQ_KEY = 0x54;
#endif
}
else
@@ -499,6 +500,7 @@
ppc_md.kbd_init_hw = mackbd_init_hw;
#ifdef CONFIG_MAGIC_SYSRQ
ppc_md.kbd_sysrq_xlate = mackbd_sysrq_xlate;
+ ppc_md.SYSRQ_KEY = 0x69;
#endif
}
#else
@@ -510,6 +512,7 @@
ppc_md.kbd_init_hw = pckbd_init_hw;
#ifdef CONFIG_MAGIC_SYSRQ
ppc_md.kbd_sysrq_xlate = pckbd_sysrq_xlate;
+ ppc_md.SYSRQ_KEY = 0x54;
#endif
#endif
#endif
--- arch/ppc/kernel/prep_setup.c.orig Mon Nov 29 14:29:08 1999
+++ arch/ppc/kernel/prep_setup.c Mon Nov 29 15:06:20 1999
@@ -863,6 +863,7 @@
ppc_md.kbd_init_hw = pckbd_init_hw;
#ifdef CONFIG_MAGIC_SYSRQ
ppc_md.kbd_sysrq_xlate = pckbd_sysrq_xlate;
+ ppc_md.SYSRQ_KEY = 0x54;
#endif
#endif
}
--- arch/ppc/kernel/pmac_setup.c.orig Mon Nov 29 14:29:08 1999
+++ arch/ppc/kernel/pmac_setup.c Mon Nov 29 15:06:29 1999
@@ -625,6 +625,7 @@
ppc_md.kbd_init_hw = mackbd_init_hw;
#ifdef CONFIG_MAGIC_SYSRQ
ppc_md.kbd_sysrq_xlate = mackbd_sysrq_xlate;
+ ppc_md.SYSRQ_KEY = 0x69;
#endif
#endif
--- arch/ppc/kernel/mbx_setup.c.orig Mon Nov 29 14:29:08 1999
+++ arch/ppc/kernel/mbx_setup.c Mon Nov 29 15:06:39 1999
@@ -466,6 +466,7 @@
ppc_md.kbd_init_hw = pckbd_init_hw;
#ifdef CONFIG_MAGIC_SYSRQ
ppc_md.kbd_sysrq_xlate = pckbd_sysrq_xlate;
+ ppc_md.SYSRQ_KEY = 0x54;
#endif
#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE)
--- include/asm-ppc/machdep.h.orig Mon Nov 29 14:54:12 1999
+++ include/asm-ppc/machdep.h Mon Nov 29 14:55:46 1999
@@ -50,6 +50,7 @@
void (*kbd_init_hw)(void);
#ifdef CONFIG_MAGIC_SYSRQ
unsigned char *kbd_sysrq_xlate;
+ unsigned long SYSRQ_KEY;
#endif
/* PCI interfaces */
--- include/asm-ppc/keyboard.h.orig Mon Nov 29 14:54:46 1999
+++ include/asm-ppc/keyboard.h Mon Nov 29 15:06:53 1999
@@ -71,9 +71,8 @@
ppc_md.kbd_init_hw();
}
-#define kbd_sysrq_xlate (ppc_md.ppc_kbd_sysrq_xlate)
-
-extern unsigned long SYSRQ_KEY;
+#define kbd_sysrq_xlate (ppc_md.kbd_sysrq_xlate)
+#define SYSRQ_KEY (ppc_md.SYSRQ_KEY)
/* resource allocation */
#define kbd_request_region()
More information about the Linuxppc-dev
mailing list