diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2010-03-30 04:07:05 -0400 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2010-05-04 16:34:34 -0400 |
commit | 9d2062b879495649bb525cf7979126da2e45d288 (patch) | |
tree | aaaac84cb7493a4553fa96b2a46b8a567185ea42 /arch | |
parent | 414d3448dbcb40807a1265ace64b2576ef919fbe (diff) |
x86, acpi/irq: Fix acpi_sci_ioapic_setup so it has both bus_irq and gsi
Currently acpi_sci_ioapic_setup calls mp_override_legacy_irq with
bus_irq == gsi, which is wrong if we are comming from an override
Instead pass the bus_irq into acpi_sci_ioapic_setup.
This fix was inspired by a similar fix from:
Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
LKML-Reference: <1269936436-7039-4-git-send-email-ebiederm@xmission.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/kernel/acpi/boot.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c index da718d67259..0a036dc6f9f 100644 --- a/arch/x86/kernel/acpi/boot.c +++ b/arch/x86/kernel/acpi/boot.c | |||
@@ -313,7 +313,7 @@ acpi_parse_ioapic(struct acpi_subtable_header * header, const unsigned long end) | |||
313 | /* | 313 | /* |
314 | * Parse Interrupt Source Override for the ACPI SCI | 314 | * Parse Interrupt Source Override for the ACPI SCI |
315 | */ | 315 | */ |
316 | static void __init acpi_sci_ioapic_setup(u32 gsi, u16 polarity, u16 trigger) | 316 | static void __init acpi_sci_ioapic_setup(u8 bus_irq, u16 polarity, u16 trigger, u32 gsi) |
317 | { | 317 | { |
318 | if (trigger == 0) /* compatible SCI trigger is level */ | 318 | if (trigger == 0) /* compatible SCI trigger is level */ |
319 | trigger = 3; | 319 | trigger = 3; |
@@ -333,7 +333,7 @@ static void __init acpi_sci_ioapic_setup(u32 gsi, u16 polarity, u16 trigger) | |||
333 | * If GSI is < 16, this will update its flags, | 333 | * If GSI is < 16, this will update its flags, |
334 | * else it will create a new mp_irqs[] entry. | 334 | * else it will create a new mp_irqs[] entry. |
335 | */ | 335 | */ |
336 | mp_override_legacy_irq(gsi, polarity, trigger, gsi); | 336 | mp_override_legacy_irq(bus_irq, polarity, trigger, gsi); |
337 | 337 | ||
338 | /* | 338 | /* |
339 | * stash over-ride to indicate we've been here | 339 | * stash over-ride to indicate we've been here |
@@ -357,9 +357,10 @@ acpi_parse_int_src_ovr(struct acpi_subtable_header * header, | |||
357 | acpi_table_print_madt_entry(header); | 357 | acpi_table_print_madt_entry(header); |
358 | 358 | ||
359 | if (intsrc->source_irq == acpi_gbl_FADT.sci_interrupt) { | 359 | if (intsrc->source_irq == acpi_gbl_FADT.sci_interrupt) { |
360 | acpi_sci_ioapic_setup(intsrc->global_irq, | 360 | acpi_sci_ioapic_setup(intsrc->source_irq, |
361 | intsrc->inti_flags & ACPI_MADT_POLARITY_MASK, | 361 | intsrc->inti_flags & ACPI_MADT_POLARITY_MASK, |
362 | (intsrc->inti_flags & ACPI_MADT_TRIGGER_MASK) >> 2); | 362 | (intsrc->inti_flags & ACPI_MADT_TRIGGER_MASK) >> 2, |
363 | intsrc->global_irq); | ||
363 | return 0; | 364 | return 0; |
364 | } | 365 | } |
365 | 366 | ||
@@ -1162,7 +1163,8 @@ static int __init acpi_parse_madt_ioapic_entries(void) | |||
1162 | * pretend we got one so we can set the SCI flags. | 1163 | * pretend we got one so we can set the SCI flags. |
1163 | */ | 1164 | */ |
1164 | if (!acpi_sci_override_gsi) | 1165 | if (!acpi_sci_override_gsi) |
1165 | acpi_sci_ioapic_setup(acpi_gbl_FADT.sci_interrupt, 0, 0); | 1166 | acpi_sci_ioapic_setup(acpi_gbl_FADT.sci_interrupt, 0, 0, |
1167 | acpi_gbl_FADT.sci_interrupt); | ||
1166 | 1168 | ||
1167 | /* Fill in identity legacy mappings where no override */ | 1169 | /* Fill in identity legacy mappings where no override */ |
1168 | mp_config_acpi_legacy_irqs(); | 1170 | mp_config_acpi_legacy_irqs(); |