Commit 5dceba83 authored by James Bottomley's avatar James Bottomley

Move voyager sysrq to V key and remove from char/sysrq.c

Patch suggested by Randy Dunlap
parent 5cc3a0fb
......@@ -59,6 +59,8 @@ On other - If you know of the key combos for other architectures, please
'm' - Will dump current memory info to your console.
'v' - Dumps Voyager SMP processor info to your console.
'0'-'9' - Sets the console log level, controlling which kernel messages
will be printed to your console. ('0', for example would make
it so that only emergency messages like PANICs or OOPSes would
......
......@@ -21,6 +21,7 @@
#include <linux/init.h>
#include <linux/delay.h>
#include <linux/reboot.h>
#include <linux/sysrq.h>
#include <asm/io.h>
#include <asm/pgalloc.h>
#include <asm/voyager.h>
......@@ -41,6 +42,21 @@ int voyager_level = 0;
struct voyager_SUS *voyager_SUS = NULL;
#ifdef CONFIG_SMP
static void
voyager_dump(int dummy1, struct pt_regs *dummy2, struct tty_struct *dummy3)
{
/* get here via a sysrq */
voyager_smp_dump();
}
static struct sysrq_key_op sysrq_voyager_dump_op = {
.handler = voyager_dump,
.help_msg = "Voyager",
.action_msg = "Dump Voyager Status\n",
};
#endif
void
voyager_detect(struct voyager_bios_info *bios)
{
......@@ -62,6 +78,9 @@ voyager_detect(struct voyager_bios_info *bios)
printk("\n**WARNING**: Voyager HAL only supports Levels 4 and 5 Architectures at the moment\n\n");
/* install the power off handler */
pm_power_off = voyager_power_off;
#ifdef CONFIG_SMP
register_sysrq_key('v', &sysrq_voyager_dump_op);
#endif
} else {
printk("\n\n**WARNING**: No Voyager Subsystem Found\n");
}
......@@ -143,15 +162,6 @@ voyager_memory_detect(int region, __u32 *start, __u32 *length)
return retval;
}
void
voyager_dump()
{
/* get here via a sysrq */
#ifdef CONFIG_SMP
voyager_smp_dump();
#endif
}
/* voyager specific handling code for timer interrupts. Used to hand
* off the timer tick to the SMP code, since the VIC doesn't have an
* internal timer (The QIC does, but that's another story). */
......
......@@ -36,10 +36,6 @@
#include <asm/ptrace.h>
#ifdef CONFIG_VOYAGER
#include <asm/voyager.h>
#endif
extern void reset_vc(unsigned int);
extern struct list_head super_blocks;
......@@ -324,14 +320,6 @@ static struct sysrq_key_op sysrq_term_op = {
.action_msg = "Terminate All Tasks",
};
#ifdef CONFIG_VOYAGER
static struct sysrq_key_op sysrq_voyager_dump_op = {
.handler = voyager_dump,
.help_msg = "voyager",
.action_msg = "Dump Voyager Status\n",
};
#endif
static void sysrq_handle_kill(int key, struct pt_regs *pt_regs,
struct tty_struct *tty)
{
......@@ -365,11 +353,7 @@ static struct sysrq_key_op *sysrq_key_table[SYSRQ_KEY_TABLE_LENGTH] = {
it is handled specially on the sparc
and will never arrive */
/* b */ &sysrq_reboot_op,
#ifdef CONFIG_VOYAGER
/* c */ &sysrq_voyager_dump_op,
#else
/* c */ NULL,
#endif
/* d */ NULL,
/* e */ &sysrq_term_op,
/* f */ NULL,
......@@ -397,7 +381,7 @@ static struct sysrq_key_op *sysrq_key_table[SYSRQ_KEY_TABLE_LENGTH] = {
/* s */ &sysrq_sync_op,
/* t */ &sysrq_showstate_op,
/* u */ &sysrq_mountro_op,
/* v */ NULL,
/* v */ NULL, /* May be assigned at init time by SMP VOYAGER */
/* w */ NULL,
/* x */ NULL,
/* y */ NULL,
......
......@@ -504,7 +504,6 @@ extern void voyager_setup_irqs(void);
extern int voyager_memory_detect(int region, __u32 *addr, __u32 *length);
extern void voyager_smp_intr_init(void);
extern __u8 voyager_extended_cmos_read(__u16 cmos_address);
extern void voyager_dump(void);
extern void voyager_smp_dump(void);
extern void voyager_timer_interrupt(struct pt_regs *regs);
extern void smp_local_timer_interrupt(struct pt_regs * regs);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment