Hardware manual

Interrupt sharing, Kernels 2.2+
Sharing of IRQs is where two devices use the same IRQ. As a general rule, this wasn't allowed for the ISA
bus. The PCI bus may share IRQs but one can't share the same IRQ between the ISA and the PCI bus. Most
multi-port boards may share IRQs. Sharing is not as efficient since every time a shared interrupt is given a
check must be made to determine where it came from. Thus if it's feasible, it's nicer to allocate every device
its own interrupt.
Prior to kernel 2.2, serial IRQs could not be shared with each other except for most multiport boards. Starting
with kernel 2.2 serial IRQs may be sometimes shared between serial ports. In order for sharing to work in 2.2
the kernel must have been compiled with CONFIG_SERIAL_SHARE_IRQ, and the serial port hardware must
support sharing (so that if two serial cards put different voltages on the same interrupt wire, only the voltage
that means "this is an interrupt" will prevail). Since the PCI bus specs permit sharing, any PCI card should
allow sharing.
What IRQs to choose?
The serial hardware often has only a limited number of IRQs. Also you don't want IRQ conflicts. So there
may not be much of a choice. Your PC may normally come with ttyS0 and ttyS2 at IRQ 4, and ttyS1
and ttyS3 at IRQ 3. Looking at /proc/interrupts will show which IRQs are being used by programs
currently running. You likely don't want to use one of these. Before IRQ 5 was used for sound cards, it was
often used for a serial port.
Here is how Greg (original author of Serial-HOWTO) set his up in /etc/rc.d/rc.serial. rc.serial is a file (shell
script) which runs at start-up (it may have a different name or location). For versions of "setserial" after 2.15
it's not always done this way anymore but this example does show the choice of IRQs.
/sbin/setserial /dev/ttyS0 irq 3 # my serial mouse
/sbin/setserial /dev/ttyS1 irq 4 # my Wyse dumb terminal
/sbin/setserial /dev/ttyS2 irq 5 # my Zoom modem
/sbin/setserial /dev/ttyS3 irq 9 # my USR modem
Standard IRQ assignments:
IRQ 0 Timer channel 0 (May mean "no interrupt". See below.)
IRQ 1 Keyboard
IRQ 2 Cascade for controller 2
IRQ 3 Serial port 2
IRQ 4 Serial port 1
IRQ 5 Parallel port 2, Sound card
IRQ 6 Floppy diskette
IRQ 7 Parallel port 1
IRQ 8 Real-time clock
IRQ 9 Redirected to IRQ2
IRQ 10 not assigned
IRQ 11 not assigned
IRQ 12 not assigned
IRQ 13 Math co-processor
IRQ 14 Hard disk controller 1
IRQ 15 Hard disk controller 2
There is really no Right Thing to do when choosing interrupts. Try to find one that isn't being used by the
motherboard, or any other boards. 2, 3, 4, 5, 7, 10, 11, 12 or 15 are possible choices. Note that IRQ 2 is the
same as IRQ 9. You can call it either 2 or 9, the serial driver is very understanding. If you have a very old
Serial HOWTO
Interrupt sharing, Kernels 2.2+ 34