Why does serial.c not allow you to share the serial console port interrupt?

From: Stephens Tim-MGI1634
Date: Wed Mar 31 2004 - 16:46:56 EST


I'm trying to understand why the serial.c driver does not allow the sharing of the serial console interrupt. There are several places on the net the mention you cannot share the console interrupt, however there is no explaination why. I assume it has something to do with OOPS reporting. Please advise.

I'm trying to enable the second serial port on a MIPS based embedded system. Both serial ports (16550 type) are attached to the same MIPS interrupt. The console is attached to ttyS0, which shares the MIPS interrupt with ttyS1.

The code in question is:

* The interrupt of the serial console port
* can't be shared.
if (sercons.flags & CON_CONSDEV) {
for(i = 0; i < NR_PORTS; i++)
if (i != sercons.index &&
rs_table[i].irq == rs_table[sercons.index].irq)
rs_table[i].irq = 0;

If I change the #ifdef to #if 0 both the console and ttyS1 seem to work ok.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/