[IA64] Check if irq is sharable
authorYasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
Tue, 17 Jul 2007 12:22:14 +0000 (21:22 +0900)
committerTony Luck <tony.luck@intel.com>
Tue, 17 Jul 2007 16:51:16 +0000 (09:51 -0700)
Need to check if irq is sharable amoung handlers when searching
sharable IOSAPIC irq.

Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
arch/ia64/kernel/iosapic.c

index bcf91dceaf5d2d29485cced1dc5e4fbc2f1313b1..cffb443a557c614b250fa8f986eebb14daa94609 100644 (file)
@@ -502,8 +502,9 @@ static int iosapic_find_sharable_irq(unsigned long trigger, unsigned long pol)
        for (i = 0; i <= NR_IRQS; i++) {
                info = &iosapic_intr_info[i];
                if (info->trigger == trigger && info->polarity == pol &&
-                   (info->dmode == IOSAPIC_FIXED || info->dmode ==
-                    IOSAPIC_LOWEST_PRIORITY)) {
+                   (info->dmode == IOSAPIC_FIXED ||
+                    info->dmode == IOSAPIC_LOWEST_PRIORITY) &&
+                   can_request_irq(i, IRQF_SHARED)) {
                        if (min_count == -1 || info->count < min_count) {
                                irq = i;
                                min_count = info->count;