Add OpenBoot magic SysRq command
PATCH 2/2 Add OpenBoot magic SysRq command
This patch against 2.6.10 adds key 'o' to the Magic SysRq commands, which drops down to the OpenBoot prompt.
Martin
arch/sparc/kernel/setup.c renamed from arch/sparc/kernel/setup.c.orig +20 -0
@@ -31,6 +31,7 @@#include <linux/console.h> #include <linux/spinlock.h> #include <linux/root_dev.h> +#include <linux/sysrq.h> #include <asm/segment.h> #include <asm/system.h>
@@ -222,6 +223,22 @@ } } +#ifdef CONFIG_MAGIC_SYSRQ +static void sysrq_handle_openboot (int key,struct pt_regs *regs, +struct tty_struct *tty) +{ + stop_a_enabled =1 ; +sun_do_break (); +} + +static struct sysrq_key_op sysrq_openboot_op +{ + .handler = sysrq_handle_openboot, + .help_msg = "Openboot", + .action_msg = "Entering OpenBoot", +}; +#endif +/* This routine will in the future do all the nasty prom stuff * to probe for the mmu type and its parameters, etc. This will * also be where SMP things happen plus the Sparc specific memory
@@ -352,6 +369,10 @@ init_task.thread.kregs = &fake_swapper_regs;paging_init (); + +#ifdef CONFIG_MAGIC_SYSRQ +register_sysrq_key ('o' , &sysrq_openboot_op); +#endif }static int __init set_preferred_console (void )
David S. Miller
maintainerFrom: Martin Habets <[email protected]>
Date: Wed, 17 Aug 2005 21:55:27 +0100
Quoted 2 lines
This patch against 2.6.10 adds key 'o' to the Magic SysRq commands, which drops down to the OpenBoot prompt.
This should be registered in a common place so that both sparc and sparc64 get this feature.
Quoted 8 lines · David S. Miller
From: Martin Habets <[email protected]>
Date: Wed, 17 Aug 2005 21:55:27 +0100Quoted 2 lines
This patch against 2.6.10 adds key 'o' to the Magic SysRq commands, which drops down to the OpenBoot prompt.
This should be registered in a common place so that both sparc and sparc64 get this feature.
Unfortunately I'm not aware of such a common place. Could you (or someone else) please enlighten me?
I was considering a similar patch for sparc64, but it would be great if that is not needed.
Thanks,
Signature · 1 line
Martin