aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorJaswinder Singh Rajput <jaswinderrajput@gmail.com>2009-01-12 07:16:17 -0500
committerIngo Molnar <mingo@elte.hu>2009-01-14 05:58:27 -0500
commitb5ba7e6d1e7e2ac808afd21be1e56dc34caf20e6 (patch)
treec9c0b8fcf2cb12a639b63c3060028d89d3a265ca /arch
parent3b9dc9f2f123286aaade54c45fef6723d587c664 (diff)
x86: replacing mp_config_ioapic with mpc_ioapic
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.h10
-rw-r--r--arch/x86/kernel/acpi/boot.c28
-rw-r--r--arch/x86/kernel/io_apic.c60
-rw-r--r--arch/x86/kernel/mpparse.c12
4 files changed, 50 insertions, 60 deletions
diff --git a/arch/x86/include/asm/io_apic.h b/arch/x86/include/asm/io_apic.h
index 7a1f44ac1f17..5a56ae9b505a 100644
--- a/arch/x86/include/asm/io_apic.h
+++ b/arch/x86/include/asm/io_apic.h
@@ -120,14 +120,6 @@ extern int nr_ioapic_registers[MAX_IO_APICS];
120 120
121#define MP_MAX_IOAPIC_PIN 127 121#define MP_MAX_IOAPIC_PIN 127
122 122
123struct mp_config_ioapic {
124 unsigned long mp_apicaddr;
125 unsigned int mp_apicid;
126 unsigned char mp_type;
127 unsigned char mp_apicver;
128 unsigned char mp_flags;
129};
130
131struct mp_config_intsrc { 123struct mp_config_intsrc {
132 unsigned int mp_dstapic; 124 unsigned int mp_dstapic;
133 unsigned char mp_type; 125 unsigned char mp_type;
@@ -139,7 +131,7 @@ struct mp_config_intsrc {
139}; 131};
140 132
141/* I/O APIC entries */ 133/* I/O APIC entries */
142extern struct mp_config_ioapic mp_ioapics[MAX_IO_APICS]; 134extern struct mpc_ioapic mp_ioapics[MAX_IO_APICS];
143 135
144/* # of MP IRQ source entries */ 136/* # of MP IRQ source entries */
145extern int mp_irq_entries; 137extern int mp_irq_entries;
diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c
index d37593c2f438..2b27019e64f8 100644
--- a/arch/x86/kernel/acpi/boot.c
+++ b/arch/x86/kernel/acpi/boot.c
@@ -912,8 +912,8 @@ static u8 __init uniq_ioapic_id(u8 id)
912 DECLARE_BITMAP(used, 256); 912 DECLARE_BITMAP(used, 256);
913 bitmap_zero(used, 256); 913 bitmap_zero(used, 256);
914 for (i = 0; i < nr_ioapics; i++) { 914 for (i = 0; i < nr_ioapics; i++) {
915 struct mp_config_ioapic *ia = &mp_ioapics[i]; 915 struct mpc_ioapic *ia = &mp_ioapics[i];
916 __set_bit(ia->mp_apicid, used); 916 __set_bit(ia->apicid, used);
917 } 917 }
918 if (!test_bit(id, used)) 918 if (!test_bit(id, used))
919 return id; 919 return id;
@@ -945,29 +945,29 @@ void __init mp_register_ioapic(int id, u32 address, u32 gsi_base)
945 945
946 idx = nr_ioapics; 946 idx = nr_ioapics;
947 947
948 mp_ioapics[idx].mp_type = MP_IOAPIC; 948 mp_ioapics[idx].type = MP_IOAPIC;
949 mp_ioapics[idx].mp_flags = MPC_APIC_USABLE; 949 mp_ioapics[idx].flags = MPC_APIC_USABLE;
950 mp_ioapics[idx].mp_apicaddr = address; 950 mp_ioapics[idx].apicaddr = address;
951 951
952 set_fixmap_nocache(FIX_IO_APIC_BASE_0 + idx, address); 952 set_fixmap_nocache(FIX_IO_APIC_BASE_0 + idx, address);
953 mp_ioapics[idx].mp_apicid = uniq_ioapic_id(id); 953 mp_ioapics[idx].apicid = uniq_ioapic_id(id);
954#ifdef CONFIG_X86_32 954#ifdef CONFIG_X86_32
955 mp_ioapics[idx].mp_apicver = io_apic_get_version(idx); 955 mp_ioapics[idx].apicver = io_apic_get_version(idx);
956#else 956#else
957 mp_ioapics[idx].mp_apicver = 0; 957 mp_ioapics[idx].apicver = 0;
958#endif 958#endif
959 /* 959 /*
960 * Build basic GSI lookup table to facilitate gsi->io_apic lookups 960 * Build basic GSI lookup table to facilitate gsi->io_apic lookups
961 * and to prevent reprogramming of IOAPIC pins (PCI GSIs). 961 * and to prevent reprogramming of IOAPIC pins (PCI GSIs).
962 */ 962 */
963 mp_ioapic_routing[idx].apic_id = mp_ioapics[idx].mp_apicid; 963 mp_ioapic_routing[idx].apic_id = mp_ioapics[idx].apicid;
964 mp_ioapic_routing[idx].gsi_base = gsi_base; 964 mp_ioapic_routing[idx].gsi_base = gsi_base;
965 mp_ioapic_routing[idx].gsi_end = gsi_base + 965 mp_ioapic_routing[idx].gsi_end = gsi_base +
966 io_apic_get_redir_entries(idx); 966 io_apic_get_redir_entries(idx);
967 967
968 printk(KERN_INFO "IOAPIC[%d]: apic_id %d, version %d, address 0x%lx, " 968 printk(KERN_INFO "IOAPIC[%d]: apic_id %d, version %d, address 0x%x, "
969 "GSI %d-%d\n", idx, mp_ioapics[idx].mp_apicid, 969 "GSI %d-%d\n", idx, mp_ioapics[idx].apicid,
970 mp_ioapics[idx].mp_apicver, mp_ioapics[idx].mp_apicaddr, 970 mp_ioapics[idx].apicver, mp_ioapics[idx].apicaddr,
971 mp_ioapic_routing[idx].gsi_base, mp_ioapic_routing[idx].gsi_end); 971 mp_ioapic_routing[idx].gsi_base, mp_ioapic_routing[idx].gsi_end);
972 972
973 nr_ioapics++; 973 nr_ioapics++;
@@ -1026,7 +1026,7 @@ void __init mp_override_legacy_irq(u8 bus_irq, u8 polarity, u8 trigger, u32 gsi)
1026 mp_irq.mp_irqflag = (trigger << 2) | polarity; 1026 mp_irq.mp_irqflag = (trigger << 2) | polarity;
1027 mp_irq.mp_srcbus = MP_ISA_BUS; 1027 mp_irq.mp_srcbus = MP_ISA_BUS;
1028 mp_irq.mp_srcbusirq = bus_irq; /* IRQ */ 1028 mp_irq.mp_srcbusirq = bus_irq; /* IRQ */
1029 mp_irq.mp_dstapic = mp_ioapics[ioapic].mp_apicid; /* APIC ID */ 1029 mp_irq.mp_dstapic = mp_ioapics[ioapic].apicid; /* APIC ID */
1030 mp_irq.mp_dstirq = pin; /* INTIN# */ 1030 mp_irq.mp_dstirq = pin; /* INTIN# */
1031 1031
1032 save_mp_irq(&mp_irq); 1032 save_mp_irq(&mp_irq);
@@ -1062,7 +1062,7 @@ void __init mp_config_acpi_legacy_irqs(void)
1062 ioapic = mp_find_ioapic(0); 1062 ioapic = mp_find_ioapic(0);
1063 if (ioapic < 0) 1063 if (ioapic < 0)
1064 return; 1064 return;
1065 dstapic = mp_ioapics[ioapic].mp_apicid; 1065 dstapic = mp_ioapics[ioapic].apicid;
1066 1066
1067 /* 1067 /*
1068 * Use the default configuration for the IRQs 0-15. Unless 1068 * Use the default configuration for the IRQs 0-15. Unless
diff --git a/arch/x86/kernel/io_apic.c b/arch/x86/kernel/io_apic.c
index 109c91db2026..6c51ecdfbf49 100644
--- a/arch/x86/kernel/io_apic.c
+++ b/arch/x86/kernel/io_apic.c
@@ -83,7 +83,7 @@ static DEFINE_SPINLOCK(vector_lock);
83int nr_ioapic_registers[MAX_IO_APICS]; 83int nr_ioapic_registers[MAX_IO_APICS];
84 84
85/* I/O APIC entries */ 85/* I/O APIC entries */
86struct mp_config_ioapic mp_ioapics[MAX_IO_APICS]; 86struct mpc_ioapic mp_ioapics[MAX_IO_APICS];
87int nr_ioapics; 87int nr_ioapics;
88 88
89/* MP IRQ source entries */ 89/* MP IRQ source entries */
@@ -387,7 +387,7 @@ struct io_apic {
387static __attribute_const__ struct io_apic __iomem *io_apic_base(int idx) 387static __attribute_const__ struct io_apic __iomem *io_apic_base(int idx)
388{ 388{
389 return (void __iomem *) __fix_to_virt(FIX_IO_APIC_BASE_0 + idx) 389 return (void __iomem *) __fix_to_virt(FIX_IO_APIC_BASE_0 + idx)
390 + (mp_ioapics[idx].mp_apicaddr & ~PAGE_MASK); 390 + (mp_ioapics[idx].apicaddr & ~PAGE_MASK);
391} 391}
392 392
393static inline unsigned int io_apic_read(unsigned int apic, unsigned int reg) 393static inline unsigned int io_apic_read(unsigned int apic, unsigned int reg)
@@ -946,7 +946,7 @@ static int find_irq_entry(int apic, int pin, int type)
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].mp_irqtype == type &&
949 (mp_irqs[i].mp_dstapic == mp_ioapics[apic].mp_apicid || 949 (mp_irqs[i].mp_dstapic == mp_ioapics[apic].apicid ||
950 mp_irqs[i].mp_dstapic == MP_APIC_ALL) && 950 mp_irqs[i].mp_dstapic == MP_APIC_ALL) &&
951 mp_irqs[i].mp_dstirq == pin) 951 mp_irqs[i].mp_dstirq == pin)
952 return i; 952 return i;
@@ -988,7 +988,7 @@ static int __init find_isa_irq_apic(int irq, int type)
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].mp_apicid == mp_irqs[i].mp_dstapic) 991 if (mp_ioapics[apic].apicid == mp_irqs[i].mp_dstapic)
992 return apic; 992 return apic;
993 } 993 }
994 } 994 }
@@ -1016,7 +1016,7 @@ int IO_APIC_get_PCI_irq_vector(int bus, int slot, int pin)
1016 int lbus = mp_irqs[i].mp_srcbus; 1016 int lbus = mp_irqs[i].mp_srcbus;
1017 1017
1018 for (apic = 0; apic < nr_ioapics; apic++) 1018 for (apic = 0; apic < nr_ioapics; apic++)
1019 if (mp_ioapics[apic].mp_apicid == mp_irqs[i].mp_dstapic || 1019 if (mp_ioapics[apic].apicid == mp_irqs[i].mp_dstapic ||
1020 mp_irqs[i].mp_dstapic == MP_APIC_ALL) 1020 mp_irqs[i].mp_dstapic == MP_APIC_ALL)
1021 break; 1021 break;
1022 1022
@@ -1567,14 +1567,14 @@ static void setup_IO_APIC_irq(int apic, int pin, unsigned int irq, struct irq_de
1567 apic_printk(APIC_VERBOSE,KERN_DEBUG 1567 apic_printk(APIC_VERBOSE,KERN_DEBUG
1568 "IOAPIC[%d]: Set routing entry (%d-%d -> 0x%x -> " 1568 "IOAPIC[%d]: Set routing entry (%d-%d -> 0x%x -> "
1569 "IRQ %d Mode:%i Active:%i)\n", 1569 "IRQ %d Mode:%i Active:%i)\n",
1570 apic, mp_ioapics[apic].mp_apicid, pin, cfg->vector, 1570 apic, mp_ioapics[apic].apicid, pin, cfg->vector,
1571 irq, trigger, polarity); 1571 irq, trigger, polarity);
1572 1572
1573 1573
1574 if (setup_ioapic_entry(mp_ioapics[apic].mp_apicid, irq, &entry, 1574 if (setup_ioapic_entry(mp_ioapics[apic].apicid, irq, &entry,
1575 dest, trigger, polarity, cfg->vector)) { 1575 dest, trigger, polarity, cfg->vector)) {
1576 printk("Failed to setup ioapic entry for ioapic %d, pin %d\n", 1576 printk("Failed to setup ioapic entry for ioapic %d, pin %d\n",
1577 mp_ioapics[apic].mp_apicid, pin); 1577 mp_ioapics[apic].apicid, pin);
1578 __clear_irq_vector(irq, cfg); 1578 __clear_irq_vector(irq, cfg);
1579 return; 1579 return;
1580 } 1580 }
@@ -1605,12 +1605,10 @@ static void __init setup_IO_APIC_irqs(void)
1605 notcon = 1; 1605 notcon = 1;
1606 apic_printk(APIC_VERBOSE, 1606 apic_printk(APIC_VERBOSE,
1607 KERN_DEBUG " %d-%d", 1607 KERN_DEBUG " %d-%d",
1608 mp_ioapics[apic].mp_apicid, 1608 mp_ioapics[apic].apicid, pin);
1609 pin);
1610 } else 1609 } else
1611 apic_printk(APIC_VERBOSE, " %d-%d", 1610 apic_printk(APIC_VERBOSE, " %d-%d",
1612 mp_ioapics[apic].mp_apicid, 1611 mp_ioapics[apic].apicid, pin);
1613 pin);
1614 continue; 1612 continue;
1615 } 1613 }
1616 if (notcon) { 1614 if (notcon) {
@@ -1700,7 +1698,7 @@ __apicdebuginit(void) print_IO_APIC(void)
1700 printk(KERN_DEBUG "number of MP IRQ sources: %d.\n", mp_irq_entries); 1698 printk(KERN_DEBUG "number of MP IRQ sources: %d.\n", mp_irq_entries);
1701 for (i = 0; i < nr_ioapics; i++) 1699 for (i = 0; i < nr_ioapics; i++)
1702 printk(KERN_DEBUG "number of IO-APIC #%d registers: %d.\n", 1700 printk(KERN_DEBUG "number of IO-APIC #%d registers: %d.\n",
1703 mp_ioapics[i].mp_apicid, nr_ioapic_registers[i]); 1701 mp_ioapics[i].apicid, nr_ioapic_registers[i]);
1704 1702
1705 /* 1703 /*
1706 * We are a bit conservative about what we expect. We have to 1704 * We are a bit conservative about what we expect. We have to
@@ -1720,7 +1718,7 @@ __apicdebuginit(void) print_IO_APIC(void)
1720 spin_unlock_irqrestore(&ioapic_lock, flags); 1718 spin_unlock_irqrestore(&ioapic_lock, flags);
1721 1719
1722 printk("\n"); 1720 printk("\n");
1723 printk(KERN_DEBUG "IO APIC #%d......\n", mp_ioapics[apic].mp_apicid); 1721 printk(KERN_DEBUG "IO APIC #%d......\n", mp_ioapics[apic].apicid);
1724 printk(KERN_DEBUG ".... register #00: %08X\n", reg_00.raw); 1722 printk(KERN_DEBUG ".... register #00: %08X\n", reg_00.raw);
1725 printk(KERN_DEBUG "....... : physical APIC id: %02X\n", reg_00.bits.ID); 1723 printk(KERN_DEBUG "....... : physical APIC id: %02X\n", reg_00.bits.ID);
1726 printk(KERN_DEBUG "....... : Delivery Type: %X\n", reg_00.bits.delivery_type); 1724 printk(KERN_DEBUG "....... : Delivery Type: %X\n", reg_00.bits.delivery_type);
@@ -2122,14 +2120,14 @@ static void __init setup_ioapic_ids_from_mpc(void)
2122 reg_00.raw = io_apic_read(apic, 0); 2120 reg_00.raw = io_apic_read(apic, 0);
2123 spin_unlock_irqrestore(&ioapic_lock, flags); 2121 spin_unlock_irqrestore(&ioapic_lock, flags);
2124 2122
2125 old_id = mp_ioapics[apic].mp_apicid; 2123 old_id = mp_ioapics[apic].apicid;
2126 2124
2127 if (mp_ioapics[apic].mp_apicid >= get_physical_broadcast()) { 2125 if (mp_ioapics[apic].apicid >= get_physical_broadcast()) {
2128 printk(KERN_ERR "BIOS bug, IO-APIC#%d ID is %d in the MPC table!...\n", 2126 printk(KERN_ERR "BIOS bug, IO-APIC#%d ID is %d in the MPC table!...\n",
2129 apic, mp_ioapics[apic].mp_apicid); 2127 apic, mp_ioapics[apic].apicid);
2130 printk(KERN_ERR "... fixing up to %d. (tell your hw vendor)\n", 2128 printk(KERN_ERR "... fixing up to %d. (tell your hw vendor)\n",
2131 reg_00.bits.ID); 2129 reg_00.bits.ID);
2132 mp_ioapics[apic].mp_apicid = reg_00.bits.ID; 2130 mp_ioapics[apic].apicid = reg_00.bits.ID;
2133 } 2131 }
2134 2132
2135 /* 2133 /*
@@ -2138,9 +2136,9 @@ static void __init setup_ioapic_ids_from_mpc(void)
2138 * 'stuck on smp_invalidate_needed IPI wait' messages. 2136 * 'stuck on smp_invalidate_needed IPI wait' messages.
2139 */ 2137 */
2140 if (check_apicid_used(phys_id_present_map, 2138 if (check_apicid_used(phys_id_present_map,
2141 mp_ioapics[apic].mp_apicid)) { 2139 mp_ioapics[apic].apicid)) {
2142 printk(KERN_ERR "BIOS bug, IO-APIC#%d ID %d is already used!...\n", 2140 printk(KERN_ERR "BIOS bug, IO-APIC#%d ID %d is already used!...\n",
2143 apic, mp_ioapics[apic].mp_apicid); 2141 apic, mp_ioapics[apic].apicid);
2144 for (i = 0; i < get_physical_broadcast(); i++) 2142 for (i = 0; i < get_physical_broadcast(); i++)
2145 if (!physid_isset(i, phys_id_present_map)) 2143 if (!physid_isset(i, phys_id_present_map))
2146 break; 2144 break;
@@ -2149,13 +2147,13 @@ static void __init setup_ioapic_ids_from_mpc(void)
2149 printk(KERN_ERR "... fixing up to %d. (tell your hw vendor)\n", 2147 printk(KERN_ERR "... fixing up to %d. (tell your hw vendor)\n",
2150 i); 2148 i);
2151 physid_set(i, phys_id_present_map); 2149 physid_set(i, phys_id_present_map);
2152 mp_ioapics[apic].mp_apicid = i; 2150 mp_ioapics[apic].apicid = i;
2153 } else { 2151 } else {
2154 physid_mask_t tmp; 2152 physid_mask_t tmp;
2155 tmp = apicid_to_cpu_present(mp_ioapics[apic].mp_apicid); 2153 tmp = apicid_to_cpu_present(mp_ioapics[apic].apicid);
2156 apic_printk(APIC_VERBOSE, "Setting %d in the " 2154 apic_printk(APIC_VERBOSE, "Setting %d in the "
2157 "phys_id_present_map\n", 2155 "phys_id_present_map\n",
2158 mp_ioapics[apic].mp_apicid); 2156 mp_ioapics[apic].apicid);
2159 physids_or(phys_id_present_map, phys_id_present_map, tmp); 2157 physids_or(phys_id_present_map, phys_id_present_map, tmp);
2160 } 2158 }
2161 2159
@@ -2164,11 +2162,11 @@ static void __init setup_ioapic_ids_from_mpc(void)
2164 * We need to adjust the IRQ routing table 2162 * We need to adjust the IRQ routing table
2165 * if the ID changed. 2163 * if the ID changed.
2166 */ 2164 */
2167 if (old_id != mp_ioapics[apic].mp_apicid) 2165 if (old_id != mp_ioapics[apic].apicid)
2168 for (i = 0; i < mp_irq_entries; i++) 2166 for (i = 0; i < mp_irq_entries; i++)
2169 if (mp_irqs[i].mp_dstapic == old_id) 2167 if (mp_irqs[i].mp_dstapic == old_id)
2170 mp_irqs[i].mp_dstapic 2168 mp_irqs[i].mp_dstapic
2171 = mp_ioapics[apic].mp_apicid; 2169 = mp_ioapics[apic].apicid;
2172 2170
2173 /* 2171 /*
2174 * Read the right value from the MPC table and 2172 * Read the right value from the MPC table and
@@ -2176,9 +2174,9 @@ static void __init setup_ioapic_ids_from_mpc(void)
2176 */ 2174 */
2177 apic_printk(APIC_VERBOSE, KERN_INFO 2175 apic_printk(APIC_VERBOSE, KERN_INFO
2178 "...changing IO-APIC physical APIC ID to %d ...", 2176 "...changing IO-APIC physical APIC ID to %d ...",
2179 mp_ioapics[apic].mp_apicid); 2177 mp_ioapics[apic].apicid);
2180 2178
2181 reg_00.bits.ID = mp_ioapics[apic].mp_apicid; 2179 reg_00.bits.ID = mp_ioapics[apic].apicid;
2182 spin_lock_irqsave(&ioapic_lock, flags); 2180 spin_lock_irqsave(&ioapic_lock, flags);
2183 io_apic_write(apic, 0, reg_00.raw); 2181 io_apic_write(apic, 0, reg_00.raw);
2184 spin_unlock_irqrestore(&ioapic_lock, flags); 2182 spin_unlock_irqrestore(&ioapic_lock, flags);
@@ -2189,7 +2187,7 @@ static void __init setup_ioapic_ids_from_mpc(void)
2189 spin_lock_irqsave(&ioapic_lock, flags); 2187 spin_lock_irqsave(&ioapic_lock, flags);
2190 reg_00.raw = io_apic_read(apic, 0); 2188 reg_00.raw = io_apic_read(apic, 0);
2191 spin_unlock_irqrestore(&ioapic_lock, flags); 2189 spin_unlock_irqrestore(&ioapic_lock, flags);
2192 if (reg_00.bits.ID != mp_ioapics[apic].mp_apicid) 2190 if (reg_00.bits.ID != mp_ioapics[apic].apicid)
2193 printk("could not set ID!\n"); 2191 printk("could not set ID!\n");
2194 else 2192 else
2195 apic_printk(APIC_VERBOSE, " ok.\n"); 2193 apic_printk(APIC_VERBOSE, " ok.\n");
@@ -3118,8 +3116,8 @@ static int ioapic_resume(struct sys_device *dev)
3118 3116
3119 spin_lock_irqsave(&ioapic_lock, flags); 3117 spin_lock_irqsave(&ioapic_lock, flags);
3120 reg_00.raw = io_apic_read(dev->id, 0); 3118 reg_00.raw = io_apic_read(dev->id, 0);
3121 if (reg_00.bits.ID != mp_ioapics[dev->id].mp_apicid) { 3119 if (reg_00.bits.ID != mp_ioapics[dev->id].apicid) {
3122 reg_00.bits.ID = mp_ioapics[dev->id].mp_apicid; 3120 reg_00.bits.ID = mp_ioapics[dev->id].apicid;
3123 io_apic_write(dev->id, 0, reg_00.raw); 3121 io_apic_write(dev->id, 0, reg_00.raw);
3124 } 3122 }
3125 spin_unlock_irqrestore(&ioapic_lock, flags); 3123 spin_unlock_irqrestore(&ioapic_lock, flags);
@@ -4101,7 +4099,7 @@ void __init ioapic_init_mappings(void)
4101 ioapic_res = ioapic_setup_resources(); 4099 ioapic_res = ioapic_setup_resources();
4102 for (i = 0; i < nr_ioapics; i++) { 4100 for (i = 0; i < nr_ioapics; i++) {
4103 if (smp_found_config) { 4101 if (smp_found_config) {
4104 ioapic_phys = mp_ioapics[i].mp_apicaddr; 4102 ioapic_phys = mp_ioapics[i].apicaddr;
4105#ifdef CONFIG_X86_32 4103#ifdef CONFIG_X86_32
4106 if (!ioapic_phys) { 4104 if (!ioapic_phys) {
4107 printk(KERN_ERR 4105 printk(KERN_ERR
diff --git a/arch/x86/kernel/mpparse.c b/arch/x86/kernel/mpparse.c
index 8385d4e7e15d..a86a65537433 100644
--- a/arch/x86/kernel/mpparse.c
+++ b/arch/x86/kernel/mpparse.c
@@ -143,11 +143,11 @@ static void __init MP_ioapic_info(struct mpc_ioapic *m)
143 if (bad_ioapic(m->apicaddr)) 143 if (bad_ioapic(m->apicaddr))
144 return; 144 return;
145 145
146 mp_ioapics[nr_ioapics].mp_apicaddr = m->apicaddr; 146 mp_ioapics[nr_ioapics].apicaddr = m->apicaddr;
147 mp_ioapics[nr_ioapics].mp_apicid = m->apicid; 147 mp_ioapics[nr_ioapics].apicid = m->apicid;
148 mp_ioapics[nr_ioapics].mp_type = m->type; 148 mp_ioapics[nr_ioapics].type = m->type;
149 mp_ioapics[nr_ioapics].mp_apicver = m->apicver; 149 mp_ioapics[nr_ioapics].apicver = m->apicver;
150 mp_ioapics[nr_ioapics].mp_flags = m->flags; 150 mp_ioapics[nr_ioapics].flags = m->flags;
151 nr_ioapics++; 151 nr_ioapics++;
152} 152}
153 153
@@ -416,7 +416,7 @@ static void __init construct_default_ioirq_mptable(int mpc_default_type)
416 intsrc.type = MP_INTSRC; 416 intsrc.type = MP_INTSRC;
417 intsrc.irqflag = 0; /* conforming */ 417 intsrc.irqflag = 0; /* conforming */
418 intsrc.srcbus = 0; 418 intsrc.srcbus = 0;
419 intsrc.dstapic = mp_ioapics[0].mp_apicid; 419 intsrc.dstapic = mp_ioapics[0].apicid;
420 420
421 intsrc.irqtype = mp_INT; 421 intsrc.irqtype = mp_INT;
422 422