diff options
author | Helge Deller <deller@parisc-linux.org> | 2006-01-10 20:47:54 -0500 |
---|---|---|
committer | Kyle McMartin <kyle@duet.int.mcmartin.ca> | 2006-01-10 21:51:39 -0500 |
commit | 4d64c9f58e618b1bdbc91cb071e6c8d90f43d620 (patch) | |
tree | cdfd90e3328934260227207cdcb2904218524a6c /drivers | |
parent | a01c8cb126cb5f5a592f01b08ff8859508c75ba1 (diff) |
[PARISC] Introduce DINO_LOCAL_IRQS and use it for gsc_find_local_irq
Fix dino by using DINO_LOCAL_IRQS as the limit for gsc_find_local_irq()
instead of the irq itself.
Signed-off-by: Helge Deller <deller@parisc-linux.org>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/parisc/dino.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/parisc/dino.c b/drivers/parisc/dino.c index 595d1987e997..45a1a494c1cc 100644 --- a/drivers/parisc/dino.c +++ b/drivers/parisc/dino.c | |||
@@ -124,6 +124,7 @@ | |||
124 | 124 | ||
125 | #define DINO_IRQS 11 /* bits 0-10 are architected */ | 125 | #define DINO_IRQS 11 /* bits 0-10 are architected */ |
126 | #define DINO_IRR_MASK 0x5ff /* only 10 bits are implemented */ | 126 | #define DINO_IRR_MASK 0x5ff /* only 10 bits are implemented */ |
127 | #define DINO_LOCAL_IRQS (DINO_IRQS+1) | ||
127 | 128 | ||
128 | #define DINO_MASK_IRQ(x) (1<<(x)) | 129 | #define DINO_MASK_IRQ(x) (1<<(x)) |
129 | 130 | ||
@@ -146,7 +147,7 @@ struct dino_device | |||
146 | unsigned long txn_addr; /* EIR addr to generate interrupt */ | 147 | unsigned long txn_addr; /* EIR addr to generate interrupt */ |
147 | u32 txn_data; /* EIR data assign to each dino */ | 148 | u32 txn_data; /* EIR data assign to each dino */ |
148 | u32 imr; /* IRQ's which are enabled */ | 149 | u32 imr; /* IRQ's which are enabled */ |
149 | int global_irq[12]; /* map IMR bit to global irq */ | 150 | int global_irq[DINO_LOCAL_IRQS]; /* map IMR bit to global irq */ |
150 | #ifdef DINO_DEBUG | 151 | #ifdef DINO_DEBUG |
151 | unsigned int dino_irr0; /* save most recent IRQ line stat */ | 152 | unsigned int dino_irr0; /* save most recent IRQ line stat */ |
152 | #endif | 153 | #endif |
@@ -297,7 +298,7 @@ struct pci_port_ops dino_port_ops = { | |||
297 | static void dino_disable_irq(unsigned int irq) | 298 | static void dino_disable_irq(unsigned int irq) |
298 | { | 299 | { |
299 | struct dino_device *dino_dev = irq_desc[irq].handler_data; | 300 | struct dino_device *dino_dev = irq_desc[irq].handler_data; |
300 | int local_irq = gsc_find_local_irq(irq, dino_dev->global_irq, irq); | 301 | int local_irq = gsc_find_local_irq(irq, dino_dev->global_irq, DINO_LOCAL_IRQS); |
301 | 302 | ||
302 | DBG(KERN_WARNING "%s(0x%p, %d)\n", __FUNCTION__, dino_dev, irq); | 303 | DBG(KERN_WARNING "%s(0x%p, %d)\n", __FUNCTION__, dino_dev, irq); |
303 | 304 | ||
@@ -309,7 +310,7 @@ static void dino_disable_irq(unsigned int irq) | |||
309 | static void dino_enable_irq(unsigned int irq) | 310 | static void dino_enable_irq(unsigned int irq) |
310 | { | 311 | { |
311 | struct dino_device *dino_dev = irq_desc[irq].handler_data; | 312 | struct dino_device *dino_dev = irq_desc[irq].handler_data; |
312 | int local_irq = gsc_find_local_irq(irq, dino_dev->global_irq, irq); | 313 | int local_irq = gsc_find_local_irq(irq, dino_dev->global_irq, DINO_LOCAL_IRQS); |
313 | u32 tmp; | 314 | u32 tmp; |
314 | 315 | ||
315 | DBG(KERN_WARNING "%s(0x%p, %d)\n", __FUNCTION__, dino_dev, irq); | 316 | DBG(KERN_WARNING "%s(0x%p, %d)\n", __FUNCTION__, dino_dev, irq); |