diff options
-rw-r--r-- | arch/x86/kernel/devicetree.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/arch/x86/kernel/devicetree.c b/arch/x86/kernel/devicetree.c index ee26feca93d9..f33bb436b8f4 100644 --- a/arch/x86/kernel/devicetree.c +++ b/arch/x86/kernel/devicetree.c | |||
@@ -201,10 +201,8 @@ static int ioapic_xlate(struct irq_domain *domain, | |||
201 | const u32 *intspec, u32 intsize, | 201 | const u32 *intspec, u32 intsize, |
202 | irq_hw_number_t *out_hwirq, u32 *out_type) | 202 | irq_hw_number_t *out_hwirq, u32 *out_type) |
203 | { | 203 | { |
204 | struct io_apic_irq_attr attr; | ||
205 | struct of_ioapic_type *it; | 204 | struct of_ioapic_type *it; |
206 | u32 line, idx; | 205 | u32 line, idx, gsi; |
207 | int rc; | ||
208 | 206 | ||
209 | if (WARN_ON(intsize < 2)) | 207 | if (WARN_ON(intsize < 2)) |
210 | return -EINVAL; | 208 | return -EINVAL; |
@@ -217,12 +215,9 @@ static int ioapic_xlate(struct irq_domain *domain, | |||
217 | it = &of_ioapic_type[intspec[1]]; | 215 | it = &of_ioapic_type[intspec[1]]; |
218 | 216 | ||
219 | idx = (u32)(long)domain->host_data; | 217 | idx = (u32)(long)domain->host_data; |
220 | set_io_apic_irq_attr(&attr, idx, line, it->trigger, it->polarity); | 218 | gsi = mp_pin_to_gsi(idx, line); |
221 | 219 | if (mp_set_gsi_attr(gsi, it->trigger, it->polarity, cpu_to_node(0))) | |
222 | rc = io_apic_setup_irq_pin_once(irq_find_mapping(domain, line), | 220 | return -EBUSY; |
223 | cpu_to_node(0), &attr); | ||
224 | if (rc) | ||
225 | return rc; | ||
226 | 221 | ||
227 | *out_hwirq = line; | 222 | *out_hwirq = line; |
228 | *out_type = it->out_type; | 223 | *out_type = it->out_type; |
@@ -230,6 +225,7 @@ static int ioapic_xlate(struct irq_domain *domain, | |||
230 | } | 225 | } |
231 | 226 | ||
232 | const struct irq_domain_ops ioapic_irq_domain_ops = { | 227 | const struct irq_domain_ops ioapic_irq_domain_ops = { |
228 | .map = mp_irqdomain_map, | ||
233 | .xlate = ioapic_xlate, | 229 | .xlate = ioapic_xlate, |
234 | }; | 230 | }; |
235 | 231 | ||