aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc64/kernel/pci_psycho.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2006-06-20 04:22:35 -0400
committerDavid S. Miller <davem@davemloft.net>2006-06-20 04:22:35 -0400
commit8047e247c899f80c33a23ad7e9e250224f0d26a5 (patch)
tree253a7ba3c902730928214df5c2b5630d7875cc11 /arch/sparc64/kernel/pci_psycho.c
parent37cdcd9e82108f9b899f1631f66ade2e45738a6e (diff)
[SPARC64]: Virtualize IRQ numbers.
Inspired by PowerPC XICS interrupt support code. All IRQs are virtualized in order to keep NR_IRQS from needing to be too large. Interrupts on sparc64 are arbitrary 11-bit values, but we don't need to define NR_IRQS to 2048 if we virtualize the IRQs. As PCI and SBUS controller drivers build device IRQs, we divy out virtual IRQ numbers incrementally starting at 1. Zero is a special virtual IRQ used for the timer interrupt. So device drivers all see virtual IRQs, and all the normal interfaces such as request_irq(), enable_irq(), etc. translate that into a real IRQ number in order to configure the IRQ. At this point knowledge of the struct ino_bucket is almost entirely contained within arch/sparc64/kernel/irq.c There are a few small bits in the PCI controller drivers that need to be swept away before we can remove ino_bucket's definition out of asm-sparc64/irq.h and privately into kernel/irq.c Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64/kernel/pci_psycho.c')
-rw-r--r--arch/sparc64/kernel/pci_psycho.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/arch/sparc64/kernel/pci_psycho.c b/arch/sparc64/kernel/pci_psycho.c
index 5743e1316a93..f2d1097f541d 100644
--- a/arch/sparc64/kernel/pci_psycho.c
+++ b/arch/sparc64/kernel/pci_psycho.c
@@ -280,7 +280,6 @@ static unsigned int psycho_irq_build(struct pci_pbm_info *pbm,
280 struct pci_dev *pdev, 280 struct pci_dev *pdev,
281 unsigned int ino) 281 unsigned int ino)
282{ 282{
283 struct ino_bucket *bucket;
284 unsigned long imap, iclr; 283 unsigned long imap, iclr;
285 unsigned long imap_off, iclr_off; 284 unsigned long imap_off, iclr_off;
286 int inofixup = 0; 285 int inofixup = 0;
@@ -309,10 +308,7 @@ static unsigned int psycho_irq_build(struct pci_pbm_info *pbm,
309 if ((ino & 0x20) == 0) 308 if ((ino & 0x20) == 0)
310 inofixup = ino & 0x03; 309 inofixup = ino & 0x03;
311 310
312 bucket = __bucket(build_irq(inofixup, iclr, imap)); 311 return build_irq(inofixup, iclr, imap, IBF_PCI);
313 bucket->flags |= IBF_PCI;
314
315 return __irq(bucket);
316} 312}
317 313
318/* PSYCHO error handling support. */ 314/* PSYCHO error handling support. */