diff options
author | Bjorn Helgaas <bjorn.helgaas@hp.com> | 2006-03-21 12:44:07 -0500 |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2006-03-22 17:36:55 -0500 |
commit | 9a4e5549b7cb5d0ef187184641d8defe8be875f5 (patch) | |
tree | b9ccd2893c9af479aaacdfe637eb0ffaae15f99b | |
parent | 2332c9ae7911618575241e0c843cd686968db8e3 (diff) |
[IA64] sn_check_intr: use ia64_get_irr()
Use the recently-added ia64_get_irr() rather than duplicating the code.
Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Acked-by: Jes Sorensen <jes@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
-rw-r--r-- | arch/ia64/sn/kernel/irq.c | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/arch/ia64/sn/kernel/irq.c b/arch/ia64/sn/kernel/irq.c index c373113d073a..c265e02f5036 100644 --- a/arch/ia64/sn/kernel/irq.c +++ b/arch/ia64/sn/kernel/irq.c | |||
@@ -350,9 +350,6 @@ static void force_interrupt(int irq) | |||
350 | static void sn_check_intr(int irq, struct sn_irq_info *sn_irq_info) | 350 | static void sn_check_intr(int irq, struct sn_irq_info *sn_irq_info) |
351 | { | 351 | { |
352 | u64 regval; | 352 | u64 regval; |
353 | int irr_reg_num; | ||
354 | int irr_bit; | ||
355 | u64 irr_reg; | ||
356 | struct pcidev_info *pcidev_info; | 353 | struct pcidev_info *pcidev_info; |
357 | struct pcibus_info *pcibus_info; | 354 | struct pcibus_info *pcibus_info; |
358 | 355 | ||
@@ -373,23 +370,7 @@ static void sn_check_intr(int irq, struct sn_irq_info *sn_irq_info) | |||
373 | pdi_pcibus_info; | 370 | pdi_pcibus_info; |
374 | regval = pcireg_intr_status_get(pcibus_info); | 371 | regval = pcireg_intr_status_get(pcibus_info); |
375 | 372 | ||
376 | irr_reg_num = irq_to_vector(irq) / 64; | 373 | if (!ia64_get_irr(irq_to_vector(irq))) { |
377 | irr_bit = irq_to_vector(irq) % 64; | ||
378 | switch (irr_reg_num) { | ||
379 | case 0: | ||
380 | irr_reg = ia64_getreg(_IA64_REG_CR_IRR0); | ||
381 | break; | ||
382 | case 1: | ||
383 | irr_reg = ia64_getreg(_IA64_REG_CR_IRR1); | ||
384 | break; | ||
385 | case 2: | ||
386 | irr_reg = ia64_getreg(_IA64_REG_CR_IRR2); | ||
387 | break; | ||
388 | case 3: | ||
389 | irr_reg = ia64_getreg(_IA64_REG_CR_IRR3); | ||
390 | break; | ||
391 | } | ||
392 | if (!test_bit(irr_bit, &irr_reg)) { | ||
393 | if (!test_bit(irq, pda->sn_in_service_ivecs)) { | 374 | if (!test_bit(irq, pda->sn_in_service_ivecs)) { |
394 | regval &= 0xff; | 375 | regval &= 0xff; |
395 | if (sn_irq_info->irq_int_bit & regval & | 376 | if (sn_irq_info->irq_int_bit & regval & |