This chapter describes the interrupt mechanism for SGI Altix systems and provides information about interrupt architecture, interrupt requests (IRQs), and interrupt registration.
The interrupt architecture of SGI Altix systems might differ from other Itanium platforms. However, the interfaces presented to the device driver are the same. Linux interrupt support on SGI Altix systems is no different from support on any other Intel Itanium 2-based platforms.
Some aspects of interrupt configuration on the SGI Altix platform might differ from those on other Linux platforms. However, as for any Linux platforms, configuration is performed either in system BIOS or in Linux platform specific code. Both of these types of codes are transparent to Linux device drivers. Linux device drivers on SGI Altix systems install and register their interrupt handlers in exactly the same way as Linux device drivers on any other Linux platform. The interrupt flow is as follows:
The device pulls its configured interrupt pin (INTA, INTB, and so on).
The bridge uses the IRQ number to signal the SHub to interrupt the specified CPU.
The SHub delivers this interrupt with the IRQ number to the targeted CPU.
The targeted CPU delivers the interrupt to the driver that is registered with the IRQ number.
SGI Altix architecture can support more than 256 interrupt requests (IRQs). The 1-byte field in the PCI configuration register is not sufficient to map all of the possible IRQs that can exist. Therefore, a device driver that is retrieving the IRQ from the PCI configuration space for interrupt installation (registration) is not portable to any platforms that can support more than 256 IRQs. On SGI Altix systems, you must not use the contents of the IRQ from the PCI configuration space. The proper procedure to use is as follows:
Get the IRQ number from the pci_dev structure initialized by the Linux PCI infrastructure during boot.
Call the request_irq method with the IRQ obtained in step 1.
Following is an example code sequence:
static void
intr_handler(int irq, void *private_data, struct pt_regs *regs);
my_irq = pci_dev->irq;
request_irq(my_irq, intr_handler,
SA_INTERRUPT | SA_SHIRQ, "My Driver", private_data); |
For more information on interrupt handling, see Linux Device Drivers, chapter 9, “Interrupt Handling.”
| Caution: An interrupt is the only mechanism in which posted DMA data are flushed from the PCI-X bridge to target memory. |