diff options
author | Jaswinder Singh Rajput <jaswinderrajput@gmail.com> | 2009-01-12 07:17:22 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-01-14 05:58:35 -0500 |
commit | c2c21745ecba23c74690a124bcd371f83bd71e45 (patch) | |
tree | 7332d81935e67ae3175e92137b8b04fabac693f2 /arch | |
parent | b5ba7e6d1e7e2ac808afd21be1e56dc34caf20e6 (diff) |
x86: replacing mp_config_intsrc with mpc_intsrc
Impact: cleanup, solve 80 columns wrap problems
Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/include/asm/io_apic.h | 16 | ||||
-rw-r--r-- | arch/x86/kernel/acpi/boot.c | 70 | ||||
-rw-r--r-- | arch/x86/kernel/io_apic.c | 64 | ||||
-rw-r--r-- | arch/x86/kernel/mpparse.c | 68 |
4 files changed, 101 insertions, 117 deletions
diff --git a/arch/x86/include/asm/io_apic.h b/arch/x86/include/asm/io_apic.h index 5a56ae9b505a..08ec793aa043 100644 --- a/arch/x86/include/asm/io_apic.h +++ b/arch/x86/include/asm/io_apic.h | |||
@@ -114,22 +114,8 @@ struct IR_IO_APIC_route_entry { | |||
114 | extern int nr_ioapics; | 114 | extern int nr_ioapics; |
115 | extern int nr_ioapic_registers[MAX_IO_APICS]; | 115 | extern int nr_ioapic_registers[MAX_IO_APICS]; |
116 | 116 | ||
117 | /* | ||
118 | * MP-BIOS irq configuration table structures: | ||
119 | */ | ||
120 | |||
121 | #define MP_MAX_IOAPIC_PIN 127 | 117 | #define MP_MAX_IOAPIC_PIN 127 |
122 | 118 | ||
123 | struct mp_config_intsrc { | ||
124 | unsigned int mp_dstapic; | ||
125 | unsigned char mp_type; | ||
126 | unsigned char mp_irqtype; | ||
127 | unsigned short mp_irqflag; | ||
128 | unsigned char mp_srcbus; | ||
129 | unsigned char mp_srcbusirq; | ||
130 | unsigned char mp_dstirq; | ||
131 | }; | ||
132 | |||
133 | /* I/O APIC entries */ | 119 | /* I/O APIC entries */ |
134 | extern struct mpc_ioapic mp_ioapics[MAX_IO_APICS]; | 120 | extern struct mpc_ioapic mp_ioapics[MAX_IO_APICS]; |
135 | 121 | ||
@@ -137,7 +123,7 @@ extern struct mpc_ioapic mp_ioapics[MAX_IO_APICS]; | |||
137 | extern int mp_irq_entries; | 123 | extern int mp_irq_entries; |
138 | 124 | ||
139 | /* MP IRQ source entries */ | 125 | /* MP IRQ source entries */ |
140 | extern struct mp_config_intsrc mp_irqs[MAX_IRQ_SOURCES]; | 126 | extern struct mpc_intsrc mp_irqs[MAX_IRQ_SOURCES]; |
141 | 127 | ||
142 | /* non-0 if default (table-less) MP configuration */ | 128 | /* non-0 if default (table-less) MP configuration */ |
143 | extern int mpc_default_type; | 129 | extern int mpc_default_type; |
diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c index 2b27019e64f8..4cb5964f1499 100644 --- a/arch/x86/kernel/acpi/boot.c +++ b/arch/x86/kernel/acpi/boot.c | |||
@@ -973,19 +973,19 @@ void __init mp_register_ioapic(int id, u32 address, u32 gsi_base) | |||
973 | nr_ioapics++; | 973 | nr_ioapics++; |
974 | } | 974 | } |
975 | 975 | ||
976 | static void assign_to_mp_irq(struct mp_config_intsrc *m, | 976 | static void assign_to_mp_irq(struct mpc_intsrc *m, |
977 | struct mp_config_intsrc *mp_irq) | 977 | struct mpc_intsrc *mp_irq) |
978 | { | 978 | { |
979 | memcpy(mp_irq, m, sizeof(struct mp_config_intsrc)); | 979 | memcpy(mp_irq, m, sizeof(struct mpc_intsrc)); |
980 | } | 980 | } |
981 | 981 | ||
982 | static int mp_irq_cmp(struct mp_config_intsrc *mp_irq, | 982 | static int mp_irq_cmp(struct mpc_intsrc *mp_irq, |
983 | struct mp_config_intsrc *m) | 983 | struct mpc_intsrc *m) |
984 | { | 984 | { |
985 | return memcmp(mp_irq, m, sizeof(struct mp_config_intsrc)); | 985 | return memcmp(mp_irq, m, sizeof(struct mpc_intsrc)); |
986 | } | 986 | } |
987 | 987 | ||
988 | static void save_mp_irq(struct mp_config_intsrc *m) | 988 | static void save_mp_irq(struct mpc_intsrc *m) |
989 | { | 989 | { |
990 | int i; | 990 | int i; |
991 | 991 | ||
@@ -1003,7 +1003,7 @@ void __init mp_override_legacy_irq(u8 bus_irq, u8 polarity, u8 trigger, u32 gsi) | |||
1003 | { | 1003 | { |
1004 | int ioapic; | 1004 | int ioapic; |
1005 | int pin; | 1005 | int pin; |
1006 | struct mp_config_intsrc mp_irq; | 1006 | struct mpc_intsrc mp_irq; |
1007 | 1007 | ||
1008 | /* | 1008 | /* |
1009 | * Convert 'gsi' to 'ioapic.pin'. | 1009 | * Convert 'gsi' to 'ioapic.pin'. |
@@ -1021,13 +1021,13 @@ void __init mp_override_legacy_irq(u8 bus_irq, u8 polarity, u8 trigger, u32 gsi) | |||
1021 | if ((bus_irq == 0) && (trigger == 3)) | 1021 | if ((bus_irq == 0) && (trigger == 3)) |
1022 | trigger = 1; | 1022 | trigger = 1; |
1023 | 1023 | ||
1024 | mp_irq.mp_type = MP_INTSRC; | 1024 | mp_irq.type = MP_INTSRC; |
1025 | mp_irq.mp_irqtype = mp_INT; | 1025 | mp_irq.irqtype = mp_INT; |
1026 | mp_irq.mp_irqflag = (trigger << 2) | polarity; | 1026 | mp_irq.irqflag = (trigger << 2) | polarity; |
1027 | mp_irq.mp_srcbus = MP_ISA_BUS; | 1027 | mp_irq.srcbus = MP_ISA_BUS; |
1028 | mp_irq.mp_srcbusirq = bus_irq; /* IRQ */ | 1028 | mp_irq.srcbusirq = bus_irq; /* IRQ */ |
1029 | mp_irq.mp_dstapic = mp_ioapics[ioapic].apicid; /* APIC ID */ | 1029 | mp_irq.dstapic = mp_ioapics[ioapic].apicid; /* APIC ID */ |
1030 | mp_irq.mp_dstirq = pin; /* INTIN# */ | 1030 | mp_irq.dstirq = pin; /* INTIN# */ |
1031 | 1031 | ||
1032 | save_mp_irq(&mp_irq); | 1032 | save_mp_irq(&mp_irq); |
1033 | } | 1033 | } |
@@ -1037,7 +1037,7 @@ void __init mp_config_acpi_legacy_irqs(void) | |||
1037 | int i; | 1037 | int i; |
1038 | int ioapic; | 1038 | int ioapic; |
1039 | unsigned int dstapic; | 1039 | unsigned int dstapic; |
1040 | struct mp_config_intsrc mp_irq; | 1040 | struct mpc_intsrc mp_irq; |
1041 | 1041 | ||
1042 | #if defined (CONFIG_MCA) || defined (CONFIG_EISA) | 1042 | #if defined (CONFIG_MCA) || defined (CONFIG_EISA) |
1043 | /* | 1043 | /* |
@@ -1072,16 +1072,14 @@ void __init mp_config_acpi_legacy_irqs(void) | |||
1072 | int idx; | 1072 | int idx; |
1073 | 1073 | ||
1074 | for (idx = 0; idx < mp_irq_entries; idx++) { | 1074 | for (idx = 0; idx < mp_irq_entries; idx++) { |
1075 | struct mp_config_intsrc *irq = mp_irqs + idx; | 1075 | struct mpc_intsrc *irq = mp_irqs + idx; |
1076 | 1076 | ||
1077 | /* Do we already have a mapping for this ISA IRQ? */ | 1077 | /* Do we already have a mapping for this ISA IRQ? */ |
1078 | if (irq->mp_srcbus == MP_ISA_BUS | 1078 | if (irq->srcbus == MP_ISA_BUS && irq->srcbusirq == i) |
1079 | && irq->mp_srcbusirq == i) | ||
1080 | break; | 1079 | break; |
1081 | 1080 | ||
1082 | /* Do we already have a mapping for this IOAPIC pin */ | 1081 | /* Do we already have a mapping for this IOAPIC pin */ |
1083 | if (irq->mp_dstapic == dstapic && | 1082 | if (irq->dstapic == dstapic && irq->dstirq == i) |
1084 | irq->mp_dstirq == i) | ||
1085 | break; | 1083 | break; |
1086 | } | 1084 | } |
1087 | 1085 | ||
@@ -1090,13 +1088,13 @@ void __init mp_config_acpi_legacy_irqs(void) | |||
1090 | continue; /* IRQ already used */ | 1088 | continue; /* IRQ already used */ |
1091 | } | 1089 | } |
1092 | 1090 | ||
1093 | mp_irq.mp_type = MP_INTSRC; | 1091 | mp_irq.type = MP_INTSRC; |
1094 | mp_irq.mp_irqflag = 0; /* Conforming */ | 1092 | mp_irq.irqflag = 0; /* Conforming */ |
1095 | mp_irq.mp_srcbus = MP_ISA_BUS; | 1093 | mp_irq.srcbus = MP_ISA_BUS; |
1096 | mp_irq.mp_dstapic = dstapic; | 1094 | mp_irq.dstapic = dstapic; |
1097 | mp_irq.mp_irqtype = mp_INT; | 1095 | mp_irq.irqtype = mp_INT; |
1098 | mp_irq.mp_srcbusirq = i; /* Identity mapped */ | 1096 | mp_irq.srcbusirq = i; /* Identity mapped */ |
1099 | mp_irq.mp_dstirq = i; | 1097 | mp_irq.dstirq = i; |
1100 | 1098 | ||
1101 | save_mp_irq(&mp_irq); | 1099 | save_mp_irq(&mp_irq); |
1102 | } | 1100 | } |
@@ -1207,22 +1205,22 @@ int mp_config_acpi_gsi(unsigned char number, unsigned int devfn, u8 pin, | |||
1207 | u32 gsi, int triggering, int polarity) | 1205 | u32 gsi, int triggering, int polarity) |
1208 | { | 1206 | { |
1209 | #ifdef CONFIG_X86_MPPARSE | 1207 | #ifdef CONFIG_X86_MPPARSE |
1210 | struct mp_config_intsrc mp_irq; | 1208 | struct mpc_intsrc mp_irq; |
1211 | int ioapic; | 1209 | int ioapic; |
1212 | 1210 | ||
1213 | if (!acpi_ioapic) | 1211 | if (!acpi_ioapic) |
1214 | return 0; | 1212 | return 0; |
1215 | 1213 | ||
1216 | /* print the entry should happen on mptable identically */ | 1214 | /* print the entry should happen on mptable identically */ |
1217 | mp_irq.mp_type = MP_INTSRC; | 1215 | mp_irq.type = MP_INTSRC; |
1218 | mp_irq.mp_irqtype = mp_INT; | 1216 | mp_irq.irqtype = mp_INT; |
1219 | mp_irq.mp_irqflag = (triggering == ACPI_EDGE_SENSITIVE ? 4 : 0x0c) | | 1217 | mp_irq.irqflag = (triggering == ACPI_EDGE_SENSITIVE ? 4 : 0x0c) | |
1220 | (polarity == ACPI_ACTIVE_HIGH ? 1 : 3); | 1218 | (polarity == ACPI_ACTIVE_HIGH ? 1 : 3); |
1221 | mp_irq.mp_srcbus = number; | 1219 | mp_irq.srcbus = number; |
1222 | mp_irq.mp_srcbusirq = (((devfn >> 3) & 0x1f) << 2) | ((pin - 1) & 3); | 1220 | mp_irq.srcbusirq = (((devfn >> 3) & 0x1f) << 2) | ((pin - 1) & 3); |
1223 | ioapic = mp_find_ioapic(gsi); | 1221 | ioapic = mp_find_ioapic(gsi); |
1224 | mp_irq.mp_dstapic = mp_ioapic_routing[ioapic].apic_id; | 1222 | mp_irq.dstapic = mp_ioapic_routing[ioapic].apic_id; |
1225 | mp_irq.mp_dstirq = gsi - mp_ioapic_routing[ioapic].gsi_base; | 1223 | mp_irq.dstirq = gsi - mp_ioapic_routing[ioapic].gsi_base; |
1226 | 1224 | ||
1227 | save_mp_irq(&mp_irq); | 1225 | save_mp_irq(&mp_irq); |
1228 | #endif | 1226 | #endif |
diff --git a/arch/x86/kernel/io_apic.c b/arch/x86/kernel/io_apic.c index 6c51ecdfbf49..79b8c0c72d34 100644 --- a/arch/x86/kernel/io_apic.c +++ b/arch/x86/kernel/io_apic.c | |||
@@ -87,7 +87,7 @@ struct mpc_ioapic mp_ioapics[MAX_IO_APICS]; | |||
87 | int nr_ioapics; | 87 | int nr_ioapics; |
88 | 88 | ||
89 | /* MP IRQ source entries */ | 89 | /* MP IRQ source entries */ |
90 | struct mp_config_intsrc mp_irqs[MAX_IRQ_SOURCES]; | 90 | struct mpc_intsrc mp_irqs[MAX_IRQ_SOURCES]; |
91 | 91 | ||
92 | /* # of MP IRQ source entries */ | 92 | /* # of MP IRQ source entries */ |
93 | int mp_irq_entries; | 93 | int mp_irq_entries; |
@@ -945,10 +945,10 @@ static int find_irq_entry(int apic, int pin, int type) | |||
945 | int i; | 945 | int i; |
946 | 946 | ||
947 | for (i = 0; i < mp_irq_entries; i++) | 947 | for (i = 0; i < mp_irq_entries; i++) |
948 | if (mp_irqs[i].mp_irqtype == type && | 948 | if (mp_irqs[i].irqtype == type && |
949 | (mp_irqs[i].mp_dstapic == mp_ioapics[apic].apicid || | 949 | (mp_irqs[i].dstapic == mp_ioapics[apic].apicid || |
950 | mp_irqs[i].mp_dstapic == MP_APIC_ALL) && | 950 | mp_irqs[i].dstapic == MP_APIC_ALL) && |
951 | mp_irqs[i].mp_dstirq == pin) | 951 | mp_irqs[i].dstirq == pin) |
952 | return i; | 952 | return i; |
953 | 953 | ||
954 | return -1; | 954 | return -1; |
@@ -962,13 +962,13 @@ static int __init find_isa_irq_pin(int irq, int type) | |||
962 | int i; | 962 | int i; |
963 | 963 | ||
964 | for (i = 0; i < mp_irq_entries; i++) { | 964 | for (i = 0; i < mp_irq_entries; i++) { |
965 | int lbus = mp_irqs[i].mp_srcbus; | 965 | int lbus = mp_irqs[i].srcbus; |
966 | 966 | ||
967 | if (test_bit(lbus, mp_bus_not_pci) && | 967 | if (test_bit(lbus, mp_bus_not_pci) && |
968 | (mp_irqs[i].mp_irqtype == type) && | 968 | (mp_irqs[i].irqtype == type) && |
969 | (mp_irqs[i].mp_srcbusirq == irq)) | 969 | (mp_irqs[i].srcbusirq == irq)) |
970 | 970 | ||
971 | return mp_irqs[i].mp_dstirq; | 971 | return mp_irqs[i].dstirq; |
972 | } | 972 | } |
973 | return -1; | 973 | return -1; |
974 | } | 974 | } |
@@ -978,17 +978,17 @@ static int __init find_isa_irq_apic(int irq, int type) | |||
978 | int i; | 978 | int i; |
979 | 979 | ||
980 | for (i = 0; i < mp_irq_entries; i++) { | 980 | for (i = 0; i < mp_irq_entries; i++) { |
981 | int lbus = mp_irqs[i].mp_srcbus; | 981 | int lbus = mp_irqs[i].srcbus; |
982 | 982 | ||
983 | if (test_bit(lbus, mp_bus_not_pci) && | 983 | if (test_bit(lbus, mp_bus_not_pci) && |
984 | (mp_irqs[i].mp_irqtype == type) && | 984 | (mp_irqs[i].irqtype == type) && |
985 | (mp_irqs[i].mp_srcbusirq == irq)) | 985 | (mp_irqs[i].srcbusirq == irq)) |
986 | break; | 986 | break; |
987 | } | 987 | } |
988 | if (i < mp_irq_entries) { | 988 | if (i < mp_irq_entries) { |
989 | int apic; | 989 | int apic; |
990 | for(apic = 0; apic < nr_ioapics; apic++) { | 990 | for(apic = 0; apic < nr_ioapics; apic++) { |
991 | if (mp_ioapics[apic].apicid == mp_irqs[i].mp_dstapic) | 991 | if (mp_ioapics[apic].apicid == mp_irqs[i].dstapic) |
992 | return apic; | 992 | return apic; |
993 | } | 993 | } |
994 | } | 994 | } |
@@ -1013,23 +1013,23 @@ int IO_APIC_get_PCI_irq_vector(int bus, int slot, int pin) | |||
1013 | return -1; | 1013 | return -1; |
1014 | } | 1014 | } |
1015 | for (i = 0; i < mp_irq_entries; i++) { | 1015 | for (i = 0; i < mp_irq_entries; i++) { |
1016 | int lbus = mp_irqs[i].mp_srcbus; | 1016 | int lbus = mp_irqs[i].srcbus; |
1017 | 1017 | ||
1018 | for (apic = 0; apic < nr_ioapics; apic++) | 1018 | for (apic = 0; apic < nr_ioapics; apic++) |
1019 | if (mp_ioapics[apic].apicid == mp_irqs[i].mp_dstapic || | 1019 | if (mp_ioapics[apic].apicid == mp_irqs[i].dstapic || |
1020 | mp_irqs[i].mp_dstapic == MP_APIC_ALL) | 1020 | mp_irqs[i].dstapic == MP_APIC_ALL) |
1021 | break; | 1021 | break; |
1022 | 1022 | ||
1023 | if (!test_bit(lbus, mp_bus_not_pci) && | 1023 | if (!test_bit(lbus, mp_bus_not_pci) && |
1024 | !mp_irqs[i].mp_irqtype && | 1024 | !mp_irqs[i].irqtype && |
1025 | (bus == lbus) && | 1025 | (bus == lbus) && |
1026 | (slot == ((mp_irqs[i].mp_srcbusirq >> 2) & 0x1f))) { | 1026 | (slot == ((mp_irqs[i].srcbusirq >> 2) & 0x1f))) { |
1027 | int irq = pin_2_irq(i,apic,mp_irqs[i].mp_dstirq); | 1027 | int irq = pin_2_irq(i, apic, mp_irqs[i].dstirq); |
1028 | 1028 | ||
1029 | if (!(apic || IO_APIC_IRQ(irq))) | 1029 | if (!(apic || IO_APIC_IRQ(irq))) |
1030 | continue; | 1030 | continue; |
1031 | 1031 | ||
1032 | if (pin == (mp_irqs[i].mp_srcbusirq & 3)) | 1032 | if (pin == (mp_irqs[i].srcbusirq & 3)) |
1033 | return irq; | 1033 | return irq; |
1034 | /* | 1034 | /* |
1035 | * Use the first all-but-pin matching entry as a | 1035 | * Use the first all-but-pin matching entry as a |
@@ -1072,7 +1072,7 @@ static int EISA_ELCR(unsigned int irq) | |||
1072 | * EISA conforming in the MP table, that means its trigger type must | 1072 | * EISA conforming in the MP table, that means its trigger type must |
1073 | * be read in from the ELCR */ | 1073 | * be read in from the ELCR */ |
1074 | 1074 | ||
1075 | #define default_EISA_trigger(idx) (EISA_ELCR(mp_irqs[idx].mp_srcbusirq)) | 1075 | #define default_EISA_trigger(idx) (EISA_ELCR(mp_irqs[idx].srcbusirq)) |
1076 | #define default_EISA_polarity(idx) default_ISA_polarity(idx) | 1076 | #define default_EISA_polarity(idx) default_ISA_polarity(idx) |
1077 | 1077 | ||
1078 | /* PCI interrupts are always polarity one level triggered, | 1078 | /* PCI interrupts are always polarity one level triggered, |
@@ -1089,13 +1089,13 @@ static int EISA_ELCR(unsigned int irq) | |||
1089 | 1089 | ||
1090 | static int MPBIOS_polarity(int idx) | 1090 | static int MPBIOS_polarity(int idx) |
1091 | { | 1091 | { |
1092 | int bus = mp_irqs[idx].mp_srcbus; | 1092 | int bus = mp_irqs[idx].srcbus; |
1093 | int polarity; | 1093 | int polarity; |
1094 | 1094 | ||
1095 | /* | 1095 | /* |
1096 | * Determine IRQ line polarity (high active or low active): | 1096 | * Determine IRQ line polarity (high active or low active): |
1097 | */ | 1097 | */ |
1098 | switch (mp_irqs[idx].mp_irqflag & 3) | 1098 | switch (mp_irqs[idx].irqflag & 3) |
1099 | { | 1099 | { |
1100 | case 0: /* conforms, ie. bus-type dependent polarity */ | 1100 | case 0: /* conforms, ie. bus-type dependent polarity */ |
1101 | if (test_bit(bus, mp_bus_not_pci)) | 1101 | if (test_bit(bus, mp_bus_not_pci)) |
@@ -1131,13 +1131,13 @@ static int MPBIOS_polarity(int idx) | |||
1131 | 1131 | ||
1132 | static int MPBIOS_trigger(int idx) | 1132 | static int MPBIOS_trigger(int idx) |
1133 | { | 1133 | { |
1134 | int bus = mp_irqs[idx].mp_srcbus; | 1134 | int bus = mp_irqs[idx].srcbus; |
1135 | int trigger; | 1135 | int trigger; |
1136 | 1136 | ||
1137 | /* | 1137 | /* |
1138 | * Determine IRQ trigger mode (edge or level sensitive): | 1138 | * Determine IRQ trigger mode (edge or level sensitive): |
1139 | */ | 1139 | */ |
1140 | switch ((mp_irqs[idx].mp_irqflag>>2) & 3) | 1140 | switch ((mp_irqs[idx].irqflag>>2) & 3) |
1141 | { | 1141 | { |
1142 | case 0: /* conforms, ie. bus-type dependent */ | 1142 | case 0: /* conforms, ie. bus-type dependent */ |
1143 | if (test_bit(bus, mp_bus_not_pci)) | 1143 | if (test_bit(bus, mp_bus_not_pci)) |
@@ -1215,16 +1215,16 @@ int (*ioapic_renumber_irq)(int ioapic, int irq); | |||
1215 | static int pin_2_irq(int idx, int apic, int pin) | 1215 | static int pin_2_irq(int idx, int apic, int pin) |
1216 | { | 1216 | { |
1217 | int irq, i; | 1217 | int irq, i; |
1218 | int bus = mp_irqs[idx].mp_srcbus; | 1218 | int bus = mp_irqs[idx].srcbus; |
1219 | 1219 | ||
1220 | /* | 1220 | /* |
1221 | * Debugging check, we are in big trouble if this message pops up! | 1221 | * Debugging check, we are in big trouble if this message pops up! |
1222 | */ | 1222 | */ |
1223 | if (mp_irqs[idx].mp_dstirq != pin) | 1223 | if (mp_irqs[idx].dstirq != pin) |
1224 | printk(KERN_ERR "broken BIOS or MPTABLE parser, ayiee!!\n"); | 1224 | printk(KERN_ERR "broken BIOS or MPTABLE parser, ayiee!!\n"); |
1225 | 1225 | ||
1226 | if (test_bit(bus, mp_bus_not_pci)) { | 1226 | if (test_bit(bus, mp_bus_not_pci)) { |
1227 | irq = mp_irqs[idx].mp_srcbusirq; | 1227 | irq = mp_irqs[idx].srcbusirq; |
1228 | } else { | 1228 | } else { |
1229 | /* | 1229 | /* |
1230 | * PCI IRQs are mapped in order | 1230 | * PCI IRQs are mapped in order |
@@ -2164,8 +2164,8 @@ static void __init setup_ioapic_ids_from_mpc(void) | |||
2164 | */ | 2164 | */ |
2165 | if (old_id != mp_ioapics[apic].apicid) | 2165 | if (old_id != mp_ioapics[apic].apicid) |
2166 | for (i = 0; i < mp_irq_entries; i++) | 2166 | for (i = 0; i < mp_irq_entries; i++) |
2167 | if (mp_irqs[i].mp_dstapic == old_id) | 2167 | if (mp_irqs[i].dstapic == old_id) |
2168 | mp_irqs[i].mp_dstapic | 2168 | mp_irqs[i].dstapic |
2169 | = mp_ioapics[apic].apicid; | 2169 | = mp_ioapics[apic].apicid; |
2170 | 2170 | ||
2171 | /* | 2171 | /* |
@@ -3983,8 +3983,8 @@ int acpi_get_override_irq(int bus_irq, int *trigger, int *polarity) | |||
3983 | return -1; | 3983 | return -1; |
3984 | 3984 | ||
3985 | for (i = 0; i < mp_irq_entries; i++) | 3985 | for (i = 0; i < mp_irq_entries; i++) |
3986 | if (mp_irqs[i].mp_irqtype == mp_INT && | 3986 | if (mp_irqs[i].irqtype == mp_INT && |
3987 | mp_irqs[i].mp_srcbusirq == bus_irq) | 3987 | mp_irqs[i].srcbusirq == bus_irq) |
3988 | break; | 3988 | break; |
3989 | if (i >= mp_irq_entries) | 3989 | if (i >= mp_irq_entries) |
3990 | return -1; | 3990 | return -1; |
diff --git a/arch/x86/kernel/mpparse.c b/arch/x86/kernel/mpparse.c index a86a65537433..ad36377dc935 100644 --- a/arch/x86/kernel/mpparse.c +++ b/arch/x86/kernel/mpparse.c | |||
@@ -159,55 +159,55 @@ static void print_MP_intsrc_info(struct mpc_intsrc *m) | |||
159 | m->srcbusirq, m->dstapic, m->dstirq); | 159 | m->srcbusirq, m->dstapic, m->dstirq); |
160 | } | 160 | } |
161 | 161 | ||
162 | static void __init print_mp_irq_info(struct mp_config_intsrc *mp_irq) | 162 | static void __init print_mp_irq_info(struct mpc_intsrc *mp_irq) |
163 | { | 163 | { |
164 | apic_printk(APIC_VERBOSE, "Int: type %d, pol %d, trig %d, bus %02x," | 164 | apic_printk(APIC_VERBOSE, "Int: type %d, pol %d, trig %d, bus %02x," |
165 | " IRQ %02x, APIC ID %x, APIC INT %02x\n", | 165 | " IRQ %02x, APIC ID %x, APIC INT %02x\n", |
166 | mp_irq->mp_irqtype, mp_irq->mp_irqflag & 3, | 166 | mp_irq->irqtype, mp_irq->irqflag & 3, |
167 | (mp_irq->mp_irqflag >> 2) & 3, mp_irq->mp_srcbus, | 167 | (mp_irq->irqflag >> 2) & 3, mp_irq->srcbus, |
168 | mp_irq->mp_srcbusirq, mp_irq->mp_dstapic, mp_irq->mp_dstirq); | 168 | mp_irq->srcbusirq, mp_irq->dstapic, mp_irq->dstirq); |
169 | } | 169 | } |
170 | 170 | ||
171 | static void __init assign_to_mp_irq(struct mpc_intsrc *m, | 171 | static void __init assign_to_mp_irq(struct mpc_intsrc *m, |
172 | struct mp_config_intsrc *mp_irq) | 172 | struct mpc_intsrc *mp_irq) |
173 | { | 173 | { |
174 | mp_irq->mp_dstapic = m->dstapic; | 174 | mp_irq->dstapic = m->dstapic; |
175 | mp_irq->mp_type = m->type; | 175 | mp_irq->type = m->type; |
176 | mp_irq->mp_irqtype = m->irqtype; | 176 | mp_irq->irqtype = m->irqtype; |
177 | mp_irq->mp_irqflag = m->irqflag; | 177 | mp_irq->irqflag = m->irqflag; |
178 | mp_irq->mp_srcbus = m->srcbus; | 178 | mp_irq->srcbus = m->srcbus; |
179 | mp_irq->mp_srcbusirq = m->srcbusirq; | 179 | mp_irq->srcbusirq = m->srcbusirq; |
180 | mp_irq->mp_dstirq = m->dstirq; | 180 | mp_irq->dstirq = m->dstirq; |
181 | } | 181 | } |
182 | 182 | ||
183 | static void __init assign_to_mpc_intsrc(struct mp_config_intsrc *mp_irq, | 183 | static void __init assign_to_mpc_intsrc(struct mpc_intsrc *mp_irq, |
184 | struct mpc_intsrc *m) | 184 | struct mpc_intsrc *m) |
185 | { | 185 | { |
186 | m->dstapic = mp_irq->mp_dstapic; | 186 | m->dstapic = mp_irq->dstapic; |
187 | m->type = mp_irq->mp_type; | 187 | m->type = mp_irq->type; |
188 | m->irqtype = mp_irq->mp_irqtype; | 188 | m->irqtype = mp_irq->irqtype; |
189 | m->irqflag = mp_irq->mp_irqflag; | 189 | m->irqflag = mp_irq->irqflag; |
190 | m->srcbus = mp_irq->mp_srcbus; | 190 | m->srcbus = mp_irq->srcbus; |
191 | m->srcbusirq = mp_irq->mp_srcbusirq; | 191 | m->srcbusirq = mp_irq->srcbusirq; |
192 | m->dstirq = mp_irq->mp_dstirq; | 192 | m->dstirq = mp_irq->dstirq; |
193 | } | 193 | } |
194 | 194 | ||
195 | static int __init mp_irq_mpc_intsrc_cmp(struct mp_config_intsrc *mp_irq, | 195 | static int __init mp_irq_mpc_intsrc_cmp(struct mpc_intsrc *mp_irq, |
196 | struct mpc_intsrc *m) | 196 | struct mpc_intsrc *m) |
197 | { | 197 | { |
198 | if (mp_irq->mp_dstapic != m->dstapic) | 198 | if (mp_irq->dstapic != m->dstapic) |
199 | return 1; | 199 | return 1; |
200 | if (mp_irq->mp_type != m->type) | 200 | if (mp_irq->type != m->type) |
201 | return 2; | 201 | return 2; |
202 | if (mp_irq->mp_irqtype != m->irqtype) | 202 | if (mp_irq->irqtype != m->irqtype) |
203 | return 3; | 203 | return 3; |
204 | if (mp_irq->mp_irqflag != m->irqflag) | 204 | if (mp_irq->irqflag != m->irqflag) |
205 | return 4; | 205 | return 4; |
206 | if (mp_irq->mp_srcbus != m->srcbus) | 206 | if (mp_irq->srcbus != m->srcbus) |
207 | return 5; | 207 | return 5; |
208 | if (mp_irq->mp_srcbusirq != m->srcbusirq) | 208 | if (mp_irq->srcbusirq != m->srcbusirq) |
209 | return 6; | 209 | return 6; |
210 | if (mp_irq->mp_dstirq != m->dstirq) | 210 | if (mp_irq->dstirq != m->dstirq) |
211 | return 7; | 211 | return 7; |
212 | 212 | ||
213 | return 0; | 213 | return 0; |
@@ -808,15 +808,15 @@ static int __init get_MP_intsrc_index(struct mpc_intsrc *m) | |||
808 | /* not legacy */ | 808 | /* not legacy */ |
809 | 809 | ||
810 | for (i = 0; i < mp_irq_entries; i++) { | 810 | for (i = 0; i < mp_irq_entries; i++) { |
811 | if (mp_irqs[i].mp_irqtype != mp_INT) | 811 | if (mp_irqs[i].irqtype != mp_INT) |
812 | continue; | 812 | continue; |
813 | 813 | ||
814 | if (mp_irqs[i].mp_irqflag != 0x0f) | 814 | if (mp_irqs[i].irqflag != 0x0f) |
815 | continue; | 815 | continue; |
816 | 816 | ||
817 | if (mp_irqs[i].mp_srcbus != m->srcbus) | 817 | if (mp_irqs[i].srcbus != m->srcbus) |
818 | continue; | 818 | continue; |
819 | if (mp_irqs[i].mp_srcbusirq != m->srcbusirq) | 819 | if (mp_irqs[i].srcbusirq != m->srcbusirq) |
820 | continue; | 820 | continue; |
821 | if (irq_used[i]) { | 821 | if (irq_used[i]) { |
822 | /* already claimed */ | 822 | /* already claimed */ |
@@ -921,10 +921,10 @@ static int __init replace_intsrc_all(struct mpc_table *mpc, | |||
921 | if (irq_used[i]) | 921 | if (irq_used[i]) |
922 | continue; | 922 | continue; |
923 | 923 | ||
924 | if (mp_irqs[i].mp_irqtype != mp_INT) | 924 | if (mp_irqs[i].irqtype != mp_INT) |
925 | continue; | 925 | continue; |
926 | 926 | ||
927 | if (mp_irqs[i].mp_irqflag != 0x0f) | 927 | if (mp_irqs[i].irqflag != 0x0f) |
928 | continue; | 928 | continue; |
929 | 929 | ||
930 | if (nr_m_spare > 0) { | 930 | if (nr_m_spare > 0) { |