diff options
-rw-r--r-- | arch/x86/kernel/acpi/boot.c | 50 |
1 files changed, 16 insertions, 34 deletions
diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c index 09682766d56a..392360c607dc 100644 --- a/arch/x86/kernel/acpi/boot.c +++ b/arch/x86/kernel/acpi/boot.c | |||
@@ -483,11 +483,6 @@ static void __init acpi_sci_ioapic_setup(u8 bus_irq, u16 polarity, u16 trigger, | |||
483 | if (acpi_sci_flags & ACPI_MADT_POLARITY_MASK) | 483 | if (acpi_sci_flags & ACPI_MADT_POLARITY_MASK) |
484 | polarity = acpi_sci_flags & ACPI_MADT_POLARITY_MASK; | 484 | polarity = acpi_sci_flags & ACPI_MADT_POLARITY_MASK; |
485 | 485 | ||
486 | /* | ||
487 | * mp_config_acpi_legacy_irqs() already setup IRQs < 16 | ||
488 | * If GSI is < 16, this will update its flags, | ||
489 | * else it will create a new mp_irqs[] entry. | ||
490 | */ | ||
491 | mp_override_legacy_irq(bus_irq, polarity, trigger, gsi); | 486 | mp_override_legacy_irq(bus_irq, polarity, trigger, gsi); |
492 | 487 | ||
493 | /* | 488 | /* |
@@ -686,14 +681,7 @@ void acpi_unregister_gsi(u32 gsi) | |||
686 | } | 681 | } |
687 | EXPORT_SYMBOL_GPL(acpi_unregister_gsi); | 682 | EXPORT_SYMBOL_GPL(acpi_unregister_gsi); |
688 | 683 | ||
689 | void __init acpi_set_irq_model_pic(void) | 684 | static void __init acpi_set_irq_model_ioapic(void) |
690 | { | ||
691 | acpi_irq_model = ACPI_IRQ_MODEL_PIC; | ||
692 | __acpi_register_gsi = acpi_register_gsi_pic; | ||
693 | acpi_ioapic = 0; | ||
694 | } | ||
695 | |||
696 | void __init acpi_set_irq_model_ioapic(void) | ||
697 | { | 685 | { |
698 | acpi_irq_model = ACPI_IRQ_MODEL_IOAPIC; | 686 | acpi_irq_model = ACPI_IRQ_MODEL_IOAPIC; |
699 | __acpi_register_gsi = acpi_register_gsi_ioapic; | 687 | __acpi_register_gsi = acpi_register_gsi_ioapic; |
@@ -932,9 +920,8 @@ static int __init early_acpi_parse_madt_lapic_addr_ovr(void) | |||
932 | * and (optionally) overriden by a LAPIC_ADDR_OVR entry (64-bit value). | 920 | * and (optionally) overriden by a LAPIC_ADDR_OVR entry (64-bit value). |
933 | */ | 921 | */ |
934 | 922 | ||
935 | count = | 923 | count = acpi_table_parse_madt(ACPI_MADT_TYPE_LOCAL_APIC_OVERRIDE, |
936 | acpi_table_parse_madt(ACPI_MADT_TYPE_LOCAL_APIC_OVERRIDE, | 924 | acpi_parse_lapic_addr_ovr, 0); |
937 | acpi_parse_lapic_addr_ovr, 0); | ||
938 | if (count < 0) { | 925 | if (count < 0) { |
939 | printk(KERN_ERR PREFIX | 926 | printk(KERN_ERR PREFIX |
940 | "Error parsing LAPIC address override entry\n"); | 927 | "Error parsing LAPIC address override entry\n"); |
@@ -959,9 +946,8 @@ static int __init acpi_parse_madt_lapic_entries(void) | |||
959 | * and (optionally) overriden by a LAPIC_ADDR_OVR entry (64-bit value). | 946 | * and (optionally) overriden by a LAPIC_ADDR_OVR entry (64-bit value). |
960 | */ | 947 | */ |
961 | 948 | ||
962 | count = | 949 | count = acpi_table_parse_madt(ACPI_MADT_TYPE_LOCAL_APIC_OVERRIDE, |
963 | acpi_table_parse_madt(ACPI_MADT_TYPE_LOCAL_APIC_OVERRIDE, | 950 | acpi_parse_lapic_addr_ovr, 0); |
964 | acpi_parse_lapic_addr_ovr, 0); | ||
965 | if (count < 0) { | 951 | if (count < 0) { |
966 | printk(KERN_ERR PREFIX | 952 | printk(KERN_ERR PREFIX |
967 | "Error parsing LAPIC address override entry\n"); | 953 | "Error parsing LAPIC address override entry\n"); |
@@ -989,11 +975,10 @@ static int __init acpi_parse_madt_lapic_entries(void) | |||
989 | return count; | 975 | return count; |
990 | } | 976 | } |
991 | 977 | ||
992 | x2count = | 978 | x2count = acpi_table_parse_madt(ACPI_MADT_TYPE_LOCAL_X2APIC_NMI, |
993 | acpi_table_parse_madt(ACPI_MADT_TYPE_LOCAL_X2APIC_NMI, | 979 | acpi_parse_x2apic_nmi, 0); |
994 | acpi_parse_x2apic_nmi, 0); | 980 | count = acpi_table_parse_madt(ACPI_MADT_TYPE_LOCAL_APIC_NMI, |
995 | count = | 981 | acpi_parse_lapic_nmi, 0); |
996 | acpi_table_parse_madt(ACPI_MADT_TYPE_LOCAL_APIC_NMI, acpi_parse_lapic_nmi, 0); | ||
997 | if (count < 0 || x2count < 0) { | 982 | if (count < 0 || x2count < 0) { |
998 | printk(KERN_ERR PREFIX "Error parsing LAPIC NMI entry\n"); | 983 | printk(KERN_ERR PREFIX "Error parsing LAPIC NMI entry\n"); |
999 | /* TBD: Cleanup to allow fallback to MPS */ | 984 | /* TBD: Cleanup to allow fallback to MPS */ |
@@ -1022,7 +1007,7 @@ static void __init mp_config_acpi_legacy_irqs(void) | |||
1022 | * Use the default configuration for the IRQs 0-15. Unless | 1007 | * Use the default configuration for the IRQs 0-15. Unless |
1023 | * overridden by (MADT) interrupt source override entries. | 1008 | * overridden by (MADT) interrupt source override entries. |
1024 | */ | 1009 | */ |
1025 | for (i = 0; i < 16; i++) { | 1010 | for (i = 0; i < NR_IRQS_LEGACY; i++) { |
1026 | int ioapic, pin; | 1011 | int ioapic, pin; |
1027 | unsigned int dstapic; | 1012 | unsigned int dstapic; |
1028 | int idx; | 1013 | int idx; |
@@ -1099,9 +1084,8 @@ static int __init acpi_parse_madt_ioapic_entries(void) | |||
1099 | return -ENODEV; | 1084 | return -ENODEV; |
1100 | } | 1085 | } |
1101 | 1086 | ||
1102 | count = | 1087 | count = acpi_table_parse_madt(ACPI_MADT_TYPE_IO_APIC, acpi_parse_ioapic, |
1103 | acpi_table_parse_madt(ACPI_MADT_TYPE_IO_APIC, acpi_parse_ioapic, | 1088 | MAX_IO_APICS); |
1104 | MAX_IO_APICS); | ||
1105 | if (!count) { | 1089 | if (!count) { |
1106 | printk(KERN_ERR PREFIX "No IOAPIC entries present\n"); | 1090 | printk(KERN_ERR PREFIX "No IOAPIC entries present\n"); |
1107 | return -ENODEV; | 1091 | return -ENODEV; |
@@ -1110,9 +1094,8 @@ static int __init acpi_parse_madt_ioapic_entries(void) | |||
1110 | return count; | 1094 | return count; |
1111 | } | 1095 | } |
1112 | 1096 | ||
1113 | count = | 1097 | count = acpi_table_parse_madt(ACPI_MADT_TYPE_INTERRUPT_OVERRIDE, |
1114 | acpi_table_parse_madt(ACPI_MADT_TYPE_INTERRUPT_OVERRIDE, acpi_parse_int_src_ovr, | 1098 | acpi_parse_int_src_ovr, nr_irqs); |
1115 | nr_irqs); | ||
1116 | if (count < 0) { | 1099 | if (count < 0) { |
1117 | printk(KERN_ERR PREFIX | 1100 | printk(KERN_ERR PREFIX |
1118 | "Error parsing interrupt source overrides entry\n"); | 1101 | "Error parsing interrupt source overrides entry\n"); |
@@ -1131,9 +1114,8 @@ static int __init acpi_parse_madt_ioapic_entries(void) | |||
1131 | /* Fill in identity legacy mappings where no override */ | 1114 | /* Fill in identity legacy mappings where no override */ |
1132 | mp_config_acpi_legacy_irqs(); | 1115 | mp_config_acpi_legacy_irqs(); |
1133 | 1116 | ||
1134 | count = | 1117 | count = acpi_table_parse_madt(ACPI_MADT_TYPE_NMI_SOURCE, |
1135 | acpi_table_parse_madt(ACPI_MADT_TYPE_NMI_SOURCE, acpi_parse_nmi_src, | 1118 | acpi_parse_nmi_src, nr_irqs); |
1136 | nr_irqs); | ||
1137 | if (count < 0) { | 1119 | if (count < 0) { |
1138 | printk(KERN_ERR PREFIX "Error parsing NMI SRC entry\n"); | 1120 | printk(KERN_ERR PREFIX "Error parsing NMI SRC entry\n"); |
1139 | /* TBD: Cleanup to allow fallback to MPS */ | 1121 | /* TBD: Cleanup to allow fallback to MPS */ |