# This is a BitKeeper generated patch for the following project: # Project Name: Linux kernel tree # This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas: # ChangeSet v2.5.53 -> 1.952 # arch/i386/mach-voyager/voyager_basic.c 1.1 -> 1.2 # Documentation/sysrq.txt 1.5 -> 1.6 # drivers/char/sysrq.c 1.24 -> 1.25 # include/asm-i386/voyager.h 1.1 -> 1.2 # # The following is the BitKeeper ChangeSet Log # -------------------------------------------- # 02/12/23 torvalds@home.transmeta.com 1.951 # Linux v2.5.53 # -------------------------------------------- # 02/12/27 jejb@raven.il.steeleye.com 1.952 # Move voyager sysrq to V key and remove from char/sysrq.c # # Patch suggested by Randy Dunlap # -------------------------------------------- # diff -Nru a/Documentation/sysrq.txt b/Documentation/sysrq.txt --- a/Documentation/sysrq.txt Sat Dec 28 17:10:59 2002 +++ b/Documentation/sysrq.txt Sat Dec 28 17:10:59 2002 @@ -59,6 +59,8 @@ '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 diff -Nru a/arch/i386/mach-voyager/voyager_basic.c b/arch/i386/mach-voyager/voyager_basic.c --- a/arch/i386/mach-voyager/voyager_basic.c Sat Dec 28 17:10:59 2002 +++ b/arch/i386/mach-voyager/voyager_basic.c Sat Dec 28 17:10:59 2002 @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include @@ -41,6 +42,21 @@ 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 @@ 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"); } @@ -141,15 +160,6 @@ pg0[0] = old; local_flush_tlb(); 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 diff -Nru a/drivers/char/sysrq.c b/drivers/char/sysrq.c --- a/drivers/char/sysrq.c Sat Dec 28 17:10:59 2002 +++ b/drivers/char/sysrq.c Sat Dec 28 17:10:59 2002 @@ -36,10 +36,6 @@ #include -#ifdef CONFIG_VOYAGER -#include -#endif - extern void reset_vc(unsigned int); extern struct list_head super_blocks; @@ -324,14 +320,6 @@ .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 @@ 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 +/* c */ NULL, /* d */ NULL, /* e */ &sysrq_term_op, /* f */ NULL, @@ -397,7 +381,7 @@ /* 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, diff -Nru a/include/asm-i386/voyager.h b/include/asm-i386/voyager.h --- a/include/asm-i386/voyager.h Sat Dec 28 17:11:00 2002 +++ b/include/asm-i386/voyager.h Sat Dec 28 17:11:00 2002 @@ -504,7 +504,6 @@ 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);