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/x86/kernel/acpi/boot.c | |
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/x86/kernel/acpi/boot.c')
-rw-r--r-- | arch/x86/kernel/acpi/boot.c | 70 |
1 files changed, 34 insertions, 36 deletions
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 |