Index: linux-2.6.15.3-kgdb/kernel/kgdb.c =================================================================== --- linux-2.6.15.3-kgdb.orig/kernel/kgdb.c +++ linux-2.6.15.3-kgdb/kernel/kgdb.c @@ -740,7 +740,7 @@ static void kgdb_wait(struct pt_regs *re unsigned long flags; int processor; - local_irq_save(flags); + local_irq_save_hw(flags); processor = smp_processor_id(); kgdb_info[processor].debuggerinfo = regs; kgdb_info[processor].task = current; @@ -770,7 +770,7 @@ static void kgdb_wait(struct pt_regs *re /* Signal the master processor that we are done */ atomic_set(&procindebug[processor], 0); spin_unlock(&slavecpulocks[processor]); - local_irq_restore(flags); + local_irq_restore_hw(flags); } #endif @@ -1033,7 +1033,7 @@ int kgdb_handle_exception(int ex_vector, * Interrupts will be restored by the 'trap return' code, except when * single stepping. */ - local_irq_save(flags); + local_irq_save_hw(flags); /* Hold debugger_active */ procid = smp_processor_id(); @@ -1056,7 +1056,7 @@ int kgdb_handle_exception(int ex_vector, if (atomic_read(&cpu_doing_single_step) != -1 && atomic_read(&cpu_doing_single_step) != procid) { atomic_set(&debugger_active, 0); - local_irq_restore(flags); + local_irq_restore_hw(flags); goto acquirelock; } @@ -1556,7 +1556,7 @@ int kgdb_handle_exception(int ex_vector, kgdb_restore: /* Free debugger_active */ atomic_set(&debugger_active, 0); - local_irq_restore(flags); + local_irq_restore_hw(flags); return error; } @@ -1925,9 +1925,9 @@ static int kgdb_notify_reboot(struct not if (!kgdb_connected || atomic_read(&debugger_active) != 0) return 0; if ((code == SYS_RESTART) || (code == SYS_HALT) || (code == SYS_POWER_OFF)){ - local_irq_save(flags); + local_irq_save_hw(flags); put_packet("X00"); - local_irq_restore(flags); + local_irq_restore_hw(flags); } return NOTIFY_DONE; } @@ -1942,9 +1942,9 @@ void kgdb_console_write(struct console * if (!kgdb_connected || atomic_read(&debugger_active) != 0) return; - local_irq_save(flags); + local_irq_save_hw(flags); kgdb_msg_write(s, count); - local_irq_restore(flags); + local_irq_restore_hw(flags); } static struct console kgdbcons = { Index: linux-2.6.15.3-kgdb/drivers/serial/8250_kgdb.c =================================================================== --- linux-2.6.15.3-kgdb.orig/drivers/serial/8250_kgdb.c +++ linux-2.6.15.3-kgdb/drivers/serial/8250_kgdb.c @@ -301,6 +301,10 @@ static void __init kgdb8250_late_init(vo "GDB-stub", current_port) < 0) printk(KERN_ERR "KGDB failed to request the serial IRQ (%d)\n", current_port->irq); +#ifdef CONFIG_IPIPE + ipipe_control_irq(current_port->irq, 0, + IPIPE_HANDLE_MASK|IPIPE_STICKY_MASK|IPIPE_SYSTEM_MASK); +#endif /* CONFIG_IPIPE */ } static __init int kgdb_init_io(void) Index: linux-2.6.15.3-kgdb/lib/Kconfig.debug =================================================================== --- linux-2.6.15.3-kgdb.orig/lib/Kconfig.debug +++ linux-2.6.15.3-kgdb/lib/Kconfig.debug @@ -250,7 +250,7 @@ choice config KGDB_ONLY_MODULES bool "KGDB: Use only kernel modules for I/O" - depends on MODULES + depends on MODULES && !IPIPE help Use only kernel modules to configure KGDB I/O after the kernel is booted. @@ -295,7 +295,7 @@ config KGDB_SIBYTE endchoice config KGDBOE - tristate "KGDB: On ethernet" if !KGDBOE_NOMODULE + tristate "KGDB: On ethernet" if !KGDBOE_NOMODULE && !IPIPE depends on m && KGDB select NETPOLL select NETPOLL_TRAP