diff options
author | Alexey Starikovskiy <astarikovskiy@suse.de> | 2008-05-14 11:03:17 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2008-05-25 04:55:13 -0400 |
commit | 2fddb6e28e903a3ab1704cc5aac01be5a59dc05b (patch) | |
tree | 4b24d694fe60ac0be3978b9fb238fe0150328af7 /arch/x86/kernel/acpi | |
parent | ec2cd0a22e2715f776a934e01c4f8ea098324fe1 (diff) |
x86: make config_irqsrc not MPspec specific
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/acpi')
-rw-r--r-- | arch/x86/kernel/acpi/boot.c | 43 |
1 files changed, 21 insertions, 22 deletions
diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c index a26dd91faf0f..276ec058f683 100644 --- a/arch/x86/kernel/acpi/boot.c +++ b/arch/x86/kernel/acpi/boot.c | |||
@@ -969,14 +969,14 @@ void __init mp_override_legacy_irq(u8 bus_irq, u8 polarity, u8 trigger, u32 gsi) | |||
969 | if ((bus_irq == 0) && (trigger == 3)) | 969 | if ((bus_irq == 0) && (trigger == 3)) |
970 | trigger = 1; | 970 | trigger = 1; |
971 | 971 | ||
972 | mp_irqs[mp_irq_entries].mpc_type = MP_INTSRC; | 972 | mp_irqs[mp_irq_entries].mp_type = MP_INTSRC; |
973 | mp_irqs[mp_irq_entries].mpc_irqtype = mp_INT; | 973 | mp_irqs[mp_irq_entries].mp_irqtype = mp_INT; |
974 | mp_irqs[mp_irq_entries].mpc_irqflag = (trigger << 2) | polarity; | 974 | mp_irqs[mp_irq_entries].mp_irqflag = (trigger << 2) | polarity; |
975 | mp_irqs[mp_irq_entries].mpc_srcbus = MP_ISA_BUS; | 975 | mp_irqs[mp_irq_entries].mp_srcbus = MP_ISA_BUS; |
976 | mp_irqs[mp_irq_entries].mpc_srcbusirq = bus_irq; /* IRQ */ | 976 | mp_irqs[mp_irq_entries].mp_srcbusirq = bus_irq; /* IRQ */ |
977 | mp_irqs[mp_irq_entries].mpc_dstapic = | 977 | mp_irqs[mp_irq_entries].mp_dstapic = |
978 | mp_ioapics[ioapic].mp_apicid; /* APIC ID */ | 978 | mp_ioapics[ioapic].mp_apicid; /* APIC ID */ |
979 | mp_irqs[mp_irq_entries].mpc_dstirq = pin; /* INTIN# */ | 979 | mp_irqs[mp_irq_entries].mp_dstirq = pin; /* INTIN# */ |
980 | 980 | ||
981 | if (++mp_irq_entries == MAX_IRQ_SOURCES) | 981 | if (++mp_irq_entries == MAX_IRQ_SOURCES) |
982 | panic("Max # of irq sources exceeded!!\n"); | 982 | panic("Max # of irq sources exceeded!!\n"); |
@@ -1012,12 +1012,11 @@ void __init mp_config_acpi_legacy_irqs(void) | |||
1012 | if (ioapic < 0) | 1012 | if (ioapic < 0) |
1013 | return; | 1013 | return; |
1014 | 1014 | ||
1015 | mp_irqs[mp_irq_entries].mpc_type = MP_INTSRC; | 1015 | mp_irqs[mp_irq_entries].mp_type = MP_INTSRC; |
1016 | mp_irqs[mp_irq_entries].mpc_irqflag = 0; /* Conforming */ | 1016 | mp_irqs[mp_irq_entries].mp_irqflag = 0; /* Conforming */ |
1017 | mp_irqs[mp_irq_entries].mpc_srcbus = MP_ISA_BUS; | 1017 | mp_irqs[mp_irq_entries].mp_srcbus = MP_ISA_BUS; |
1018 | #ifdef CONFIG_X86_IO_APIC | 1018 | mp_irqs[mp_irq_entries].mp_dstapic = mp_ioapics[ioapic].mp_apicid; |
1019 | mp_irqs[mp_irq_entries].mpc_dstapic = mp_ioapics[ioapic].mp_apicid; | 1019 | |
1020 | #endif | ||
1021 | /* | 1020 | /* |
1022 | * Use the default configuration for the IRQs 0-15. Unless | 1021 | * Use the default configuration for the IRQs 0-15. Unless |
1023 | * overridden by (MADT) interrupt source override entries. | 1022 | * overridden by (MADT) interrupt source override entries. |
@@ -1026,17 +1025,17 @@ void __init mp_config_acpi_legacy_irqs(void) | |||
1026 | int idx; | 1025 | int idx; |
1027 | 1026 | ||
1028 | for (idx = 0; idx < mp_irq_entries; idx++) { | 1027 | for (idx = 0; idx < mp_irq_entries; idx++) { |
1029 | struct mpc_config_intsrc *irq = mp_irqs + idx; | 1028 | struct mp_config_intsrc *irq = mp_irqs + idx; |
1030 | 1029 | ||
1031 | /* Do we already have a mapping for this ISA IRQ? */ | 1030 | /* Do we already have a mapping for this ISA IRQ? */ |
1032 | if (irq->mpc_srcbus == MP_ISA_BUS | 1031 | if (irq->mp_srcbus == MP_ISA_BUS |
1033 | && irq->mpc_srcbusirq == i) | 1032 | && irq->mp_srcbusirq == i) |
1034 | break; | 1033 | break; |
1035 | 1034 | ||
1036 | /* Do we already have a mapping for this IOAPIC pin */ | 1035 | /* Do we already have a mapping for this IOAPIC pin */ |
1037 | if ((irq->mpc_dstapic == | 1036 | if ((irq->mp_dstapic == |
1038 | mp_irqs[mp_irq_entries].mpc_dstapic) && | 1037 | mp_irqs[mp_irq_entries].mp_dstapic) && |
1039 | (irq->mpc_dstirq == i)) | 1038 | (irq->mp_dstirq == i)) |
1040 | break; | 1039 | break; |
1041 | } | 1040 | } |
1042 | 1041 | ||
@@ -1045,9 +1044,9 @@ void __init mp_config_acpi_legacy_irqs(void) | |||
1045 | continue; /* IRQ already used */ | 1044 | continue; /* IRQ already used */ |
1046 | } | 1045 | } |
1047 | 1046 | ||
1048 | mp_irqs[mp_irq_entries].mpc_irqtype = mp_INT; | 1047 | mp_irqs[mp_irq_entries].mp_irqtype = mp_INT; |
1049 | mp_irqs[mp_irq_entries].mpc_srcbusirq = i; /* Identity mapped */ | 1048 | mp_irqs[mp_irq_entries].mp_srcbusirq = i; /* Identity mapped */ |
1050 | mp_irqs[mp_irq_entries].mpc_dstirq = i; | 1049 | mp_irqs[mp_irq_entries].mp_dstirq = i; |
1051 | 1050 | ||
1052 | if (++mp_irq_entries == MAX_IRQ_SOURCES) | 1051 | if (++mp_irq_entries == MAX_IRQ_SOURCES) |
1053 | panic("Max # of irq sources exceeded!!\n"); | 1052 | panic("Max # of irq sources exceeded!!\n"); |