aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/xen
diff options
context:
space:
mode:
authorStefano Stabellini <stefano.stabellini@eu.citrix.com>2011-05-25 07:33:23 -0400
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>2011-05-31 11:44:03 -0400
commite5ac0bda96c495321dbad9b57a4b1a93a5a72e7f (patch)
treec5fb04b58e9880c358716dc79ae80f7fa3e27003 /drivers/xen
parent55922c9d1b84b89cb946c777fddccb3247e7df2c (diff)
xen: use the trigger info we already have to choose the irq handler
Do not use pirq_needs_eoi to decide which irq handler to use because Xen always returns true if the guest does not support pirq_eoi_map. Use the trigger information we already have from MP-tables and ACPI. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Reported-by: Thomas Goetz <tom.goetz@virtualcomputer.com> Tested-by: Thomas Goetz <tom.goetz@virtualcomputer.com> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Diffstat (limited to 'drivers/xen')
-rw-r--r--drivers/xen/events.c18
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 */
630int xen_bind_pirq_gsi_to_irq(unsigned gsi, 633int 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