From ce74aa4d2696c14645ac631f3df80cc741952236 Mon Sep 17 00:00:00 2001 From: Russ Anderson Date: Fri, 3 Aug 2007 14:32:37 -0500 Subject: [PATCH] --- yaml --- r: 64112 b: refs/heads/master c: a1287476e86568374ed6aadbb4123d9eff6f7b09 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/ia64/kernel/mca.c | 34 +++++++++++++++++++--------------- 2 files changed, 20 insertions(+), 16 deletions(-) diff --git a/[refs] b/[refs] index e86f0298dc96..3f840d4048d7 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 0b0517a475c2fd601d01acb4a585644eda9c9395 +refs/heads/master: a1287476e86568374ed6aadbb4123d9eff6f7b09 diff --git a/trunk/arch/ia64/kernel/mca.c b/trunk/arch/ia64/kernel/mca.c index ff28620cb992..63b73f3d4c9f 100644 --- a/trunk/arch/ia64/kernel/mca.c +++ b/trunk/arch/ia64/kernel/mca.c @@ -2018,22 +2018,26 @@ ia64_mca_late_init(void) if (cpe_vector >= 0) { /* If platform supports CPEI, enable the irq. */ - cpe_poll_enabled = 0; - for (irq = 0; irq < NR_IRQS; ++irq) - if (irq_to_vector(irq) == cpe_vector) { - desc = irq_desc + irq; - desc->status |= IRQ_PER_CPU; - setup_irq(irq, &mca_cpe_irqaction); - ia64_cpe_irq = irq; - } - ia64_mca_register_cpev(cpe_vector); - IA64_MCA_DEBUG("%s: CPEI/P setup and enabled.\n", __FUNCTION__); - } else { - /* If platform doesn't support CPEI, get the timer going. */ - if (cpe_poll_enabled) { - ia64_mca_cpe_poll(0UL); - IA64_MCA_DEBUG("%s: CPEP setup and enabled.\n", __FUNCTION__); + irq = local_vector_to_irq(cpe_vector); + if (irq > 0) { + cpe_poll_enabled = 0; + desc = irq_desc + irq; + desc->status |= IRQ_PER_CPU; + setup_irq(irq, &mca_cpe_irqaction); + ia64_cpe_irq = irq; + ia64_mca_register_cpev(cpe_vector); + IA64_MCA_DEBUG("%s: CPEI/P setup and enabled.\n", + __FUNCTION__); + return 0; } + printk(KERN_ERR "%s: Failed to find irq for CPE " + "interrupt handler, vector %d\n", + __FUNCTION__, cpe_vector); + } + /* If platform doesn't support CPEI, get the timer going. */ + if (cpe_poll_enabled) { + ia64_mca_cpe_poll(0UL); + IA64_MCA_DEBUG("%s: CPEP setup and enabled.\n", __FUNCTION__); } } #endif