aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/mpparse.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kernel/mpparse.c')
-rw-r--r--arch/x86/kernel/mpparse.c37
1 files changed, 17 insertions, 20 deletions
diff --git a/arch/x86/kernel/mpparse.c b/arch/x86/kernel/mpparse.c
index 7ec4b0da9851..6b75d3143586 100644
--- a/arch/x86/kernel/mpparse.c
+++ b/arch/x86/kernel/mpparse.c
@@ -152,7 +152,7 @@ static void __init MP_ioapic_info(struct mpc_ioapic *m)
152 nr_ioapics++; 152 nr_ioapics++;
153} 153}
154 154
155static void print_MP_intsrc_info(struct mpc_config_intsrc *m) 155static void print_MP_intsrc_info(struct mpc_intsrc *m)
156{ 156{
157 apic_printk(APIC_VERBOSE, "Int: type %d, pol %d, trig %d, bus %02x," 157 apic_printk(APIC_VERBOSE, "Int: type %d, pol %d, trig %d, bus %02x,"
158 " IRQ %02x, APIC ID %x, APIC INT %02x\n", 158 " IRQ %02x, APIC ID %x, APIC INT %02x\n",
@@ -170,7 +170,7 @@ static void __init print_mp_irq_info(struct mp_config_intsrc *mp_irq)
170 mp_irq->mp_srcbusirq, mp_irq->mp_dstapic, mp_irq->mp_dstirq); 170 mp_irq->mp_srcbusirq, mp_irq->mp_dstapic, mp_irq->mp_dstirq);
171} 171}
172 172
173static void __init assign_to_mp_irq(struct mpc_config_intsrc *m, 173static void __init assign_to_mp_irq(struct mpc_intsrc *m,
174 struct mp_config_intsrc *mp_irq) 174 struct mp_config_intsrc *mp_irq)
175{ 175{
176 mp_irq->mp_dstapic = m->mpc_dstapic; 176 mp_irq->mp_dstapic = m->mpc_dstapic;
@@ -183,7 +183,7 @@ static void __init assign_to_mp_irq(struct mpc_config_intsrc *m,
183} 183}
184 184
185static void __init assign_to_mpc_intsrc(struct mp_config_intsrc *mp_irq, 185static void __init assign_to_mpc_intsrc(struct mp_config_intsrc *mp_irq,
186 struct mpc_config_intsrc *m) 186 struct mpc_intsrc *m)
187{ 187{
188 m->mpc_dstapic = mp_irq->mp_dstapic; 188 m->mpc_dstapic = mp_irq->mp_dstapic;
189 m->mpc_type = mp_irq->mp_type; 189 m->mpc_type = mp_irq->mp_type;
@@ -195,7 +195,7 @@ static void __init assign_to_mpc_intsrc(struct mp_config_intsrc *mp_irq,
195} 195}
196 196
197static int __init mp_irq_mpc_intsrc_cmp(struct mp_config_intsrc *mp_irq, 197static int __init mp_irq_mpc_intsrc_cmp(struct mp_config_intsrc *mp_irq,
198 struct mpc_config_intsrc *m) 198 struct mpc_intsrc *m)
199{ 199{
200 if (mp_irq->mp_dstapic != m->mpc_dstapic) 200 if (mp_irq->mp_dstapic != m->mpc_dstapic)
201 return 1; 201 return 1;
@@ -215,7 +215,7 @@ static int __init mp_irq_mpc_intsrc_cmp(struct mp_config_intsrc *mp_irq,
215 return 0; 215 return 0;
216} 216}
217 217
218static void __init MP_intsrc_info(struct mpc_config_intsrc *m) 218static void __init MP_intsrc_info(struct mpc_intsrc *m)
219{ 219{
220 int i; 220 int i;
221 221
@@ -358,13 +358,12 @@ static int __init smp_read_mpc(struct mpc_table *mpc, unsigned early)
358 case MP_INTSRC: 358 case MP_INTSRC:
359 { 359 {
360#ifdef CONFIG_X86_IO_APIC 360#ifdef CONFIG_X86_IO_APIC
361 struct mpc_config_intsrc *m = 361 struct mpc_intsrc *m = (struct mpc_intsrc *)mpt;
362 (struct mpc_config_intsrc *)mpt;
363 362
364 MP_intsrc_info(m); 363 MP_intsrc_info(m);
365#endif 364#endif
366 mpt += sizeof(struct mpc_config_intsrc); 365 mpt += sizeof(struct mpc_intsrc);
367 count += sizeof(struct mpc_config_intsrc); 366 count += sizeof(struct mpc_intsrc);
368 break; 367 break;
369 } 368 }
370 case MP_LINTSRC: 369 case MP_LINTSRC:
@@ -413,7 +412,7 @@ static int __init ELCR_trigger(unsigned int irq)
413 412
414static void __init construct_default_ioirq_mptable(int mpc_default_type) 413static void __init construct_default_ioirq_mptable(int mpc_default_type)
415{ 414{
416 struct mpc_config_intsrc intsrc; 415 struct mpc_intsrc intsrc;
417 int i; 416 int i;
418 int ELCR_fallback = 0; 417 int ELCR_fallback = 0;
419 418
@@ -799,7 +798,7 @@ void __init find_smp_config(void)
799#ifdef CONFIG_X86_IO_APIC 798#ifdef CONFIG_X86_IO_APIC
800static u8 __initdata irq_used[MAX_IRQ_SOURCES]; 799static u8 __initdata irq_used[MAX_IRQ_SOURCES];
801 800
802static int __init get_MP_intsrc_index(struct mpc_config_intsrc *m) 801static int __init get_MP_intsrc_index(struct mpc_intsrc *m)
803{ 802{
804 int i; 803 int i;
805 804
@@ -836,7 +835,7 @@ static int __init get_MP_intsrc_index(struct mpc_config_intsrc *m)
836 835
837#define SPARE_SLOT_NUM 20 836#define SPARE_SLOT_NUM 20
838 837
839static struct mpc_config_intsrc __initdata *m_spare[SPARE_SLOT_NUM]; 838static struct mpc_intsrc __initdata *m_spare[SPARE_SLOT_NUM];
840#endif 839#endif
841 840
842static int __init replace_intsrc_all(struct mpc_table *mpc, 841static int __init replace_intsrc_all(struct mpc_table *mpc,
@@ -877,8 +876,7 @@ static int __init replace_intsrc_all(struct mpc_table *mpc,
877 case MP_INTSRC: 876 case MP_INTSRC:
878 { 877 {
879#ifdef CONFIG_X86_IO_APIC 878#ifdef CONFIG_X86_IO_APIC
880 struct mpc_config_intsrc *m = 879 struct mpc_intsrc *m = (struct mpc_intsrc *)mpt;
881 (struct mpc_config_intsrc *)mpt;
882 880
883 printk(KERN_INFO "OLD "); 881 printk(KERN_INFO "OLD ");
884 print_MP_intsrc_info(m); 882 print_MP_intsrc_info(m);
@@ -899,8 +897,8 @@ static int __init replace_intsrc_all(struct mpc_table *mpc,
899 nr_m_spare++; 897 nr_m_spare++;
900 } 898 }
901#endif 899#endif
902 mpt += sizeof(struct mpc_config_intsrc); 900 mpt += sizeof(struct mpc_intsrc);
903 count += sizeof(struct mpc_config_intsrc); 901 count += sizeof(struct mpc_intsrc);
904 break; 902 break;
905 } 903 }
906 case MP_LINTSRC: 904 case MP_LINTSRC:
@@ -938,9 +936,8 @@ static int __init replace_intsrc_all(struct mpc_table *mpc,
938 assign_to_mpc_intsrc(&mp_irqs[i], m_spare[nr_m_spare]); 936 assign_to_mpc_intsrc(&mp_irqs[i], m_spare[nr_m_spare]);
939 m_spare[nr_m_spare] = NULL; 937 m_spare[nr_m_spare] = NULL;
940 } else { 938 } else {
941 struct mpc_config_intsrc *m = 939 struct mpc_intsrc *m = (struct mpc_intsrc *)mpt;
942 (struct mpc_config_intsrc *)mpt; 940 count += sizeof(struct mpc_intsrc);
943 count += sizeof(struct mpc_config_intsrc);
944 if (!mpc_new_phys) { 941 if (!mpc_new_phys) {
945 printk(KERN_INFO "No spare slots, try to append...take your risk, new mpc_length %x\n", count); 942 printk(KERN_INFO "No spare slots, try to append...take your risk, new mpc_length %x\n", count);
946 } else { 943 } else {
@@ -953,7 +950,7 @@ static int __init replace_intsrc_all(struct mpc_table *mpc,
953 } 950 }
954 assign_to_mpc_intsrc(&mp_irqs[i], m); 951 assign_to_mpc_intsrc(&mp_irqs[i], m);
955 mpc->mpc_length = count; 952 mpc->mpc_length = count;
956 mpt += sizeof(struct mpc_config_intsrc); 953 mpt += sizeof(struct mpc_intsrc);
957 } 954 }
958 print_mp_irq_info(&mp_irqs[i]); 955 print_mp_irq_info(&mp_irqs[i]);
959 } 956 }