diff options
-rw-r--r-- | drivers/xen/events.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/xen/events.c b/drivers/xen/events.c index 3ff822b48145..553da68bd510 100644 --- a/drivers/xen/events.c +++ b/drivers/xen/events.c | |||
@@ -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 |