From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <8ce2eb49c40409f5ff7fd225af155b31@hamnavoe.demon.co.uk> To: 9fans@cse.psu.edu Subject: Re: [9fans] Weird error. From: Richard Miller In-Reply-To: <200301192134.h0JLYew14284@augusta.math.psu.edu> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Date: Mon, 20 Jan 2003 11:20:09 +0000 Topicbox-Message-UUID: 4421d83e-eacb-11e9-9e20-41e7f4b1d025 > Sun Jan 19 12:45:36: mpintrenable: multiple botch irq3, tbdf 5000000, lo 00000979, n 00000979 It's a benign error message resulting from the interaction of three mostly harmless bugs: 1. intdisable() on x86 MP architecture doesn't actually disable interrupts. The comment says: * For now, none of this will work with the APIC code, 2. i8250disable() marks the UART disabled after calling intdisable(), without checking whether the disable succeeded. So the next time the UART device is opened the interrupt is enabled again. 3. mpintrenablex() doesn't distinguish correctly between enabling a device twice and enabling multiple devices (or multifunction devices) which share an interrupt. I think 2. would be the easiest to fix, for example as follows: /sys/src/9/pc/fns.h:61 c fns.h:61 < void intrdisable(int, void (*)(Ureg *, void *), void*, int, char*); --- > int intrdisable(int, void (*)(Ureg *, void *), void*, int, char*); /sys/src/9/pc/trap.c:67 c trap.c:67 < void --- > int /sys/src/9/pc/trap.c:79 c trap.c:79 < return; --- > return -1; /sys/src/9/pc/trap.c:95 a trap.c:96 > return 0; /sys/src/9/pc/uarti8250.c:530,531 c uarti8250.c:530,531 < intrdisable(ctlr->irq, i8250interrupt, uart, ctlr->tbdf, uart->name); < ctlr->iena = 0; --- > if(intrdisable(ctlr->irq, i8250interrupt, uart, ctlr->tbdf, uart->name) == 0) > ctlr->iena = 0;