diff options
author | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2011-07-06 10:48:22 -0400 |
---|---|---|
committer | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2011-07-11 13:19:28 -0400 |
commit | 30bd35edfd5c82147bdcf0540c6bd3cf92d101f8 (patch) | |
tree | 79796537057298a13cf7861c096f77f833fcc605 | |
parent | d92edd814e3c9d9105de55b14c8958b1f8f20269 (diff) |
xen/pci: In xen_register_pirq bind the GSI to the IRQ after the hypercall.
Not before .. also that code segment starts looking like the HVM one.
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
-rw-r--r-- | arch/x86/pci/xen.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/arch/x86/pci/xen.c b/arch/x86/pci/xen.c index 7ee39cc38a2..6b7d849905c 100644 --- a/arch/x86/pci/xen.c +++ b/arch/x86/pci/xen.c | |||
@@ -112,26 +112,10 @@ static int xen_register_pirq(u32 gsi, int gsi_override, int triggering) | |||
112 | if (!xen_pv_domain()) | 112 | if (!xen_pv_domain()) |
113 | return -1; | 113 | return -1; |
114 | 114 | ||
115 | if (triggering == ACPI_EDGE_SENSITIVE) { | ||
116 | shareable = 0; | ||
117 | name = "ioapic-edge"; | ||
118 | } else { | ||
119 | shareable = 1; | ||
120 | name = "ioapic-level"; | ||
121 | } | ||
122 | pirq = xen_allocate_pirq_gsi(gsi); | 115 | pirq = xen_allocate_pirq_gsi(gsi); |
123 | if (pirq < 0) | 116 | if (pirq < 0) |
124 | goto out; | 117 | goto out; |
125 | 118 | ||
126 | if (gsi_override >= 0) | ||
127 | irq = xen_bind_pirq_gsi_to_irq(gsi_override, pirq, shareable, name); | ||
128 | else | ||
129 | irq = xen_bind_pirq_gsi_to_irq(gsi, pirq, shareable, name); | ||
130 | if (irq < 0) | ||
131 | goto out; | ||
132 | |||
133 | printk(KERN_DEBUG "xen: --> pirq=%d -> irq=%d (gsi=%d)\n", pirq, irq, gsi); | ||
134 | |||
135 | map_irq.domid = DOMID_SELF; | 119 | map_irq.domid = DOMID_SELF; |
136 | map_irq.type = MAP_PIRQ_TYPE_GSI; | 120 | map_irq.type = MAP_PIRQ_TYPE_GSI; |
137 | map_irq.index = gsi; | 121 | map_irq.index = gsi; |
@@ -143,6 +127,22 @@ static int xen_register_pirq(u32 gsi, int gsi_override, int triggering) | |||
143 | return -1; | 127 | return -1; |
144 | } | 128 | } |
145 | 129 | ||
130 | if (triggering == ACPI_EDGE_SENSITIVE) { | ||
131 | shareable = 0; | ||
132 | name = "ioapic-edge"; | ||
133 | } else { | ||
134 | shareable = 1; | ||
135 | name = "ioapic-level"; | ||
136 | } | ||
137 | |||
138 | if (gsi_override >= 0) | ||
139 | gsi = gsi_override; | ||
140 | |||
141 | irq = xen_bind_pirq_gsi_to_irq(gsi, pirq, shareable, name); | ||
142 | if (irq < 0) | ||
143 | goto out; | ||
144 | |||
145 | printk(KERN_DEBUG "xen: --> pirq=%d -> irq=%d (gsi=%d)\n", pirq, irq, gsi); | ||
146 | out: | 146 | out: |
147 | return irq; | 147 | return irq; |
148 | } | 148 | } |