diff options
Diffstat (limited to 'drivers/xen/events.c')
-rw-r--r-- | drivers/xen/events.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/xen/events.c b/drivers/xen/events.c index 3ff822b48145..30df85d8fca8 100644 --- a/drivers/xen/events.c +++ b/drivers/xen/events.c | |||
@@ -395,9 +395,9 @@ static void unmask_evtchn(int port) | |||
395 | static void xen_irq_init(unsigned irq) | 395 | static void xen_irq_init(unsigned irq) |
396 | { | 396 | { |
397 | struct irq_info *info; | 397 | struct irq_info *info; |
398 | #ifdef CONFIG_SMP | ||
398 | struct irq_desc *desc = irq_to_desc(irq); | 399 | struct irq_desc *desc = irq_to_desc(irq); |
399 | 400 | ||
400 | #ifdef CONFIG_SMP | ||
401 | /* By default all event channels notify CPU#0. */ | 401 | /* By default all event channels notify CPU#0. */ |
402 | cpumask_copy(desc->irq_data.affinity, cpumask_of(0)); | 402 | cpumask_copy(desc->irq_data.affinity, cpumask_of(0)); |
403 | #endif | 403 | #endif |
@@ -626,6 +626,9 @@ int xen_allocate_pirq_gsi(unsigned gsi) | |||
626 | * | 626 | * |
627 | * Note: We don't assign an event channel until the irq actually started | 627 | * Note: We don't assign an event channel until the irq actually started |
628 | * up. Return an existing irq if we've already got one for the gsi. | 628 | * up. Return an existing irq if we've already got one for the gsi. |
629 | * | ||
630 | * Shareable implies level triggered, not shareable implies edge | ||
631 | * triggered here. | ||
629 | */ | 632 | */ |
630 | int xen_bind_pirq_gsi_to_irq(unsigned gsi, | 633 | int xen_bind_pirq_gsi_to_irq(unsigned gsi, |
631 | unsigned pirq, int shareable, char *name) | 634 | unsigned pirq, int shareable, char *name) |
@@ -664,16 +667,13 @@ int xen_bind_pirq_gsi_to_irq(unsigned gsi, | |||
664 | 667 | ||
665 | pirq_query_unmask(irq); | 668 | pirq_query_unmask(irq); |
666 | /* We try to use the handler with the appropriate semantic for the | 669 | /* We try to use the handler with the appropriate semantic for the |
667 | * type of interrupt: if the interrupt doesn't need an eoi | 670 | * type of interrupt: if the interrupt is an edge triggered |
668 | * (pirq_needs_eoi returns false), we treat it like an edge | 671 | * interrupt we use handle_edge_irq. |
669 | * triggered interrupt so we use handle_edge_irq. | ||
670 | * As a matter of fact this only happens when the corresponding | ||
671 | * physical interrupt is edge triggered or an msi. | ||
672 | * | 672 | * |
673 | * On the other hand if the interrupt needs an eoi (pirq_needs_eoi | 673 | * On the other hand if the interrupt is level triggered we use |
674 | * returns true) we treat it like a level triggered interrupt so we | 674 | * handle_fasteoi_irq like the native code does for this kind of |
675 | * use handle_fasteoi_irq like the native code does for this kind of | ||
676 | * interrupts. | 675 | * interrupts. |
676 | * | ||
677 | * Depending on the Xen version, pirq_needs_eoi might return true | 677 | * Depending on the Xen version, pirq_needs_eoi might return true |
678 | * not only for level triggered interrupts but for edge triggered | 678 | * not only for level triggered interrupts but for edge triggered |
679 | * interrupts too. In any case Xen always honors the eoi mechanism, | 679 | * interrupts too. In any case Xen always honors the eoi mechanism, |
@@ -681,7 +681,7 @@ int xen_bind_pirq_gsi_to_irq(unsigned gsi, | |||
681 | * hasn't received an eoi yet. Therefore using the fasteoi handler | 681 | * hasn't received an eoi yet. Therefore using the fasteoi handler |
682 | * is the right choice either way. | 682 | * is the right choice either way. |
683 | */ | 683 | */ |
684 | if (pirq_needs_eoi(irq)) | 684 | if (shareable) |
685 | irq_set_chip_and_handler_name(irq, &xen_pirq_chip, | 685 | irq_set_chip_and_handler_name(irq, &xen_pirq_chip, |
686 | handle_fasteoi_irq, name); | 686 | handle_fasteoi_irq, name); |
687 | else | 687 | else |