In article <[EMAIL PROTECTED]>,
Gerald Haese <[EMAIL PROTECTED]> wrote:
>
>My SMP machine crashes after an "Unknown interrupt" occured.
>After that one CPU hangs and later the system crashes completely :-(
>Other people also have this problem ...
>
>The "Unknown interrupt" message comes from "head.S". How can I get
>the number of the interrupt?
>
>Could someone make a patch, please? I've no knowledges in programming
>x86 assembler - sorry :-(
I don't guarantee that this works at all (I may have done something
stupid), but it should be "close enough" to working that it should be
tweakable..
Linus
-----
diff -u --recursive v2.2.0-pre8/linux/arch/i386/kernel/irq.c
linux/arch/i386/kernel/irq.c
--- v2.2.0-pre8/linux/arch/i386/kernel/irq.c Thu Dec 31 10:28:59 1998
+++ linux/arch/i386/kernel/irq.c Tue Jan 19 17:52:41 1999
@@ -955,6 +955,42 @@
return irq_found;
}
+/*
+ * Silly, horrible hack
+ */
+static char uglybuffer[10*256];
+
+__asm__("\n" __ALIGN_STR"\n"
+ "common_unexpected:\n\t"
+ SAVE_ALL
+ "pushl $ret_from_intr\n\t"
+ "jmp strange_interrupt");
+
+void strange_interrupt(int irqnum)
+{
+ printk("Unexpected interrupt %d\n", irqnum & 255);
+ for (;;);
+}
+
+extern int common_unexpected;
+__initfunc(void init_unexpected_irq(void))
+{
+ int i;
+ for (i = 0; i < 256; i++) {
+ char *code = uglybuffer + 10*i;
+ unsigned long jumpto = (unsigned long) &common_unexpected;
+
+ jumpto -= (unsigned long)(code+10);
+ code[0] = 0x68; /* pushl */
+ *(int *)(code+1) = i - 512;
+ code[5] = 0xe9; /* jmp */
+ *(int *)(code+6) = jumpto;
+
+ set_intr_gate(i,code);
+ }
+}
+
+
__initfunc(void init_IRQ(void))
{
int i;
diff -u --recursive v2.2.0-pre8/linux/arch/i386/kernel/traps.c
linux/arch/i386/kernel/traps.c
--- v2.2.0-pre8/linux/arch/i386/kernel/traps.c Mon Dec 28 15:00:52 1998
+++ linux/arch/i386/kernel/traps.c Tue Jan 19 17:52:05 1999
@@ -571,7 +571,8 @@
void __init trap_init(void)
{
- int i;
+ /* Initially up all of the IDT to jump to unexpected */
+ init_unexpected_irq();
if (readl(0x0FFFD9) == 'E' + ('I'<<8) + ('S'<<16) + ('A'<<24))
EISA_bus = 1;
@@ -594,8 +595,6 @@
set_trap_gate(15,&spurious_interrupt_bug);
set_trap_gate(16,&coprocessor_error);
set_trap_gate(17,&alignment_check);
- for (i=18;i<48;i++)
- set_trap_gate(i,&reserved);
set_system_gate(0x80,&system_call);
/* set up GDT task & ldt entries */
-
Linux SMP list: FIRST see FAQ at http://www.irisa.fr/prive/mentre/smp-faq/
To Unsubscribe: send "unsubscribe linux-smp" to [EMAIL PROTECTED]