>>>>> "tytso" == Theodore Ts'o <tytso@mit.edu> writes:
Hi
tytso> 1) Serial sysrq is reported no to work for 2.4 kernels.
tytso> I haven't heard of any such reports. I'm currently on the road right
tytso> now, so I can't test this right away. If someone running 2.4.0test5 can
tytso> test this and confirm/deny this claim, I would appreciate it. If it
tytso> doesn't work, full debugging particulars would be appreciate it.
SysRq don't work here over serial console (has never worked
ok). Phillip Rumpf solved my problems. I thought that you had the
patch. This is the patch actualized to test6-pre1.
If you need any more details, let me know (I am _very_ interested in
the serial console + sysrq to work :)
Later, Juan.
diff -urN --exclude-from=/home/lfcia/quintela/work/kernel/exclude base/arch/i386/config.in working/arch/i386/config.in
--- base/arch/i386/config.in Wed Aug 2 14:32:01 2000
+++ working/arch/i386/config.in Tue Aug 1 17:29:51 2000
@@ -344,7 +344,7 @@
comment 'Kernel hacking'
#bool 'Debug kmalloc/kfree' CONFIG_DEBUG_MALLOC
-dep_bool 'Magic SysRq key' CONFIG_MAGIC_SYSRQ $CONFIG_VT
+bool 'Magic SysRq key' CONFIG_MAGIC_SYSRQ
bool 'Built-in Kernel Debugger support' CONFIG_KDB
if [ "$CONFIG_KDB" = "y" ]; then
comment 'Load all symbols for debugging is required for KDB'
diff -urN --exclude-from=/home/lfcia/quintela/work/kernel/exclude base/drivers/char/serial.c working/drivers/char/serial.c
--- base/drivers/char/serial.c Wed Aug 2 14:32:01 2000
+++ working/drivers/char/serial.c Wed Aug 2 14:27:02 2000
@@ -600,6 +600,14 @@
if (*status & UART_LSR_OE)
icount->overrun++;
+#if defined(CONFIG_SERIAL_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) && !defined(MODULE)
+ if (*status & UART_LSR_BI) {
+ if (info->line == sercons.index) {
+ break_pressed = jiffies|1;
+ goto ignore_char;
+ }
+ }
+#endif
/*
* Now check to see if character should be
* ignored, and mask off conditions which
@@ -616,15 +624,6 @@
#ifdef SERIAL_DEBUG_INTR
printk("handling break....");
#endif
-#if defined(CONFIG_SERIAL_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) && !defined(MODULE)
- if (info->line == sercons.index) {
- if (!break_pressed) {
- break_pressed = jiffies;
- goto ignore_char;
- }
- break_pressed = 0;
- }
-#endif
*tty->flip.flag_buf_ptr = TTY_BREAK;
if (info->flags & ASYNC_SAK)
do_SAK(tty);
@@ -648,8 +647,9 @@
}
#if defined(CONFIG_SERIAL_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) && !defined(MODULE)
if (break_pressed && info->line == sercons.index) {
- if (ch != 0 &&
- time_before(jiffies, break_pressed + HZ*5)) {
+ if (ch == 0)
+ goto ignore_char;
+ if (time_before(jiffies, break_pressed + HZ*5)) {
handle_sysrq(ch, regs, NULL, NULL);
break_pressed = 0;
goto ignore_char;
@@ -5458,9 +5458,17 @@
static inline void wait_for_xmitr(struct async_struct *info)
{
unsigned int tmout = 1000000;
+ unsigned int status;
- while (--tmout &&
- ((serial_in(info, UART_LSR) & BOTH_EMPTY) != BOTH_EMPTY));
+ do {
+ status = serial_in(info, UART_LSR);
+
+ if (status & UART_LSR_BI)
+ break_pressed = jiffies|1;
+
+ if (--tmout == 0)
+ break;
+ } while((status & BOTH_EMPTY) != BOTH_EMPTY);
}
diff -urN --exclude-from=/home/lfcia/quintela/work/kernel/exclude base/kernel/sysctl.c working/kernel/sysctl.c
--- base/kernel/sysctl.c Fri Jul 28 16:54:50 2000
+++ working/kernel/sysctl.c Wed Aug 2 14:24:51 2000
@@ -216,7 +216,7 @@
{KERN_SEM, "sem", &sem_ctls, 4*sizeof (int),
0644, NULL, &proc_dointvec},
#endif
-#ifdef CONFIG_MAGIC_SYSRQ
+#if defined(CONFIG_VT) && defined(CONFIG_MAGIC_SYSRQ)
{KERN_SYSRQ, "sysrq", &sysrq_enabled, sizeof (int),
0644, NULL, &proc_dointvec},
#endif
-- In theory, practice and theory are the same, but in practice they are different -- Larry McVoy- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Mon Aug 07 2000 - 21:00:11 EST