|
|
Linux » Books » Developer »
Linux Device Driver Programmer's Guide,Porting to SGI Altix Systems
(document number: 007-4520-007 / published: 2008-09-24)
table of contents | additional info | download find in page
Chapter 8. PCI-X Interrupt Mechanism
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.
Interrupt Request (IRQ) Management
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.
Driver Interrupt Registration
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.
|
Linux Device Driver Programmer's Guide,Porting to SGI Altix Systems
(document number: 007-4520-007 / published: 2008-09-24)
table of contents | additional info | download
Front Matter
New Features in This Guide
About This Guide
Chapter 1. Introduction
Chapter 2. Architecture
Chapter 3. PCI-X Device Attachment
Chapter 4. PCI System Initialization
Chapter 5. Finding Your PCI Device
Chapter 6. PCI/PCI-X Configuration Space
Chapter 7. PCI-X I/O and Memory Resources
Chapter 8. PCI-X Interrupt Mechanism
Chapter 9. PCI-X Direct Memory Access (DMA)
Chapter 10. Device Driver Memory Usage
Chapter 11. Time Management
Chapter 12. Building Linux Kernels and Modules
Appendix A. Memory Operation Ordering on SGI Altix Systems
Index
home/search |
what's new |
help
|
|
|