aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/mpparse.c
diff options
context:
space:
mode:
authorJaswinder Singh Rajput <jaswinder@infradead.org>2009-01-04 11:26:44 -0500
committerIngo Molnar <mingo@elte.hu>2009-01-05 08:08:32 -0500
commite253b396b145311477b23c176e868e5af6f79174 (patch)
tree363b0ff0aed1407afa432d1dd7ba91fb9e0b80b2 /arch/x86/kernel/mpparse.c
parentb5ced7cdb018b8728ddcfb175c26f30cc185cf66 (diff)
x86: rename all fields of mpc_intsrc mpc_X to X
Impact: cleanup, solve 80 columns wrap problems It would be cleaner to rename all the mpc->mpc_X fields to mpc->X - that alone would give 4 characters per usage site. (we already know that it's an 'mpc' entity - no need to duplicate that in the field too) Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/mpparse.c')
-rw-r--r--arch/x86/kernel/mpparse.c79
1 files changed, 39 insertions, 40 deletions
diff --git a/arch/x86/kernel/mpparse.c b/arch/x86/kernel/mpparse.c
index a5c728be41cd..a804f107db8a 100644
--- a/arch/x86/kernel/mpparse.c
+++ b/arch/x86/kernel/mpparse.c
@@ -156,9 +156,8 @@ static 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",
159 m->mpc_irqtype, m->mpc_irqflag & 3, 159 m->irqtype, m->irqflag & 3, (m->irqflag >> 2) & 3, m->srcbus,
160 (m->mpc_irqflag >> 2) & 3, m->mpc_srcbus, 160 m->srcbusirq, m->dstapic, m->dstirq);
161 m->mpc_srcbusirq, m->mpc_dstapic, m->mpc_dstirq);
162} 161}
163 162
164static void __init print_mp_irq_info(struct mp_config_intsrc *mp_irq) 163static void __init print_mp_irq_info(struct mp_config_intsrc *mp_irq)
@@ -173,43 +172,43 @@ static void __init print_mp_irq_info(struct mp_config_intsrc *mp_irq)
173static void __init assign_to_mp_irq(struct mpc_intsrc *m, 172static void __init assign_to_mp_irq(struct mpc_intsrc *m,
174 struct mp_config_intsrc *mp_irq) 173 struct mp_config_intsrc *mp_irq)
175{ 174{
176 mp_irq->mp_dstapic = m->mpc_dstapic; 175 mp_irq->mp_dstapic = m->dstapic;
177 mp_irq->mp_type = m->mpc_type; 176 mp_irq->mp_type = m->type;
178 mp_irq->mp_irqtype = m->mpc_irqtype; 177 mp_irq->mp_irqtype = m->irqtype;
179 mp_irq->mp_irqflag = m->mpc_irqflag; 178 mp_irq->mp_irqflag = m->irqflag;
180 mp_irq->mp_srcbus = m->mpc_srcbus; 179 mp_irq->mp_srcbus = m->srcbus;
181 mp_irq->mp_srcbusirq = m->mpc_srcbusirq; 180 mp_irq->mp_srcbusirq = m->srcbusirq;
182 mp_irq->mp_dstirq = m->mpc_dstirq; 181 mp_irq->mp_dstirq = m->dstirq;
183} 182}
184 183
185static void __init assign_to_mpc_intsrc(struct mp_config_intsrc *mp_irq, 184static void __init assign_to_mpc_intsrc(struct mp_config_intsrc *mp_irq,
186 struct mpc_intsrc *m) 185 struct mpc_intsrc *m)
187{ 186{
188 m->mpc_dstapic = mp_irq->mp_dstapic; 187 m->dstapic = mp_irq->mp_dstapic;
189 m->mpc_type = mp_irq->mp_type; 188 m->type = mp_irq->mp_type;
190 m->mpc_irqtype = mp_irq->mp_irqtype; 189 m->irqtype = mp_irq->mp_irqtype;
191 m->mpc_irqflag = mp_irq->mp_irqflag; 190 m->irqflag = mp_irq->mp_irqflag;
192 m->mpc_srcbus = mp_irq->mp_srcbus; 191 m->srcbus = mp_irq->mp_srcbus;
193 m->mpc_srcbusirq = mp_irq->mp_srcbusirq; 192 m->srcbusirq = mp_irq->mp_srcbusirq;
194 m->mpc_dstirq = mp_irq->mp_dstirq; 193 m->dstirq = mp_irq->mp_dstirq;
195} 194}
196 195
197static int __init mp_irq_mpc_intsrc_cmp(struct mp_config_intsrc *mp_irq, 196static int __init mp_irq_mpc_intsrc_cmp(struct mp_config_intsrc *mp_irq,
198 struct mpc_intsrc *m) 197 struct mpc_intsrc *m)
199{ 198{
200 if (mp_irq->mp_dstapic != m->mpc_dstapic) 199 if (mp_irq->mp_dstapic != m->dstapic)
201 return 1; 200 return 1;
202 if (mp_irq->mp_type != m->mpc_type) 201 if (mp_irq->mp_type != m->type)
203 return 2; 202 return 2;
204 if (mp_irq->mp_irqtype != m->mpc_irqtype) 203 if (mp_irq->mp_irqtype != m->irqtype)
205 return 3; 204 return 3;
206 if (mp_irq->mp_irqflag != m->mpc_irqflag) 205 if (mp_irq->mp_irqflag != m->irqflag)
207 return 4; 206 return 4;
208 if (mp_irq->mp_srcbus != m->mpc_srcbus) 207 if (mp_irq->mp_srcbus != m->srcbus)
209 return 5; 208 return 5;
210 if (mp_irq->mp_srcbusirq != m->mpc_srcbusirq) 209 if (mp_irq->mp_srcbusirq != m->srcbusirq)
211 return 6; 210 return 6;
212 if (mp_irq->mp_dstirq != m->mpc_dstirq) 211 if (mp_irq->mp_dstirq != m->dstirq)
213 return 7; 212 return 7;
214 213
215 return 0; 214 return 0;
@@ -415,12 +414,12 @@ static void __init construct_default_ioirq_mptable(int mpc_default_type)
415 int i; 414 int i;
416 int ELCR_fallback = 0; 415 int ELCR_fallback = 0;
417 416
418 intsrc.mpc_type = MP_INTSRC; 417 intsrc.type = MP_INTSRC;
419 intsrc.mpc_irqflag = 0; /* conforming */ 418 intsrc.irqflag = 0; /* conforming */
420 intsrc.mpc_srcbus = 0; 419 intsrc.srcbus = 0;
421 intsrc.mpc_dstapic = mp_ioapics[0].mp_apicid; 420 intsrc.dstapic = mp_ioapics[0].mp_apicid;
422 421
423 intsrc.mpc_irqtype = mp_INT; 422 intsrc.irqtype = mp_INT;
424 423
425 /* 424 /*
426 * If true, we have an ISA/PCI system with no IRQ entries 425 * If true, we have an ISA/PCI system with no IRQ entries
@@ -463,19 +462,19 @@ static void __init construct_default_ioirq_mptable(int mpc_default_type)
463 * irqflag field (level sensitive, active high polarity). 462 * irqflag field (level sensitive, active high polarity).
464 */ 463 */
465 if (ELCR_trigger(i)) 464 if (ELCR_trigger(i))
466 intsrc.mpc_irqflag = 13; 465 intsrc.irqflag = 13;
467 else 466 else
468 intsrc.mpc_irqflag = 0; 467 intsrc.irqflag = 0;
469 } 468 }
470 469
471 intsrc.mpc_srcbusirq = i; 470 intsrc.srcbusirq = i;
472 intsrc.mpc_dstirq = i ? i : 2; /* IRQ0 to INTIN2 */ 471 intsrc.dstirq = i ? i : 2; /* IRQ0 to INTIN2 */
473 MP_intsrc_info(&intsrc); 472 MP_intsrc_info(&intsrc);
474 } 473 }
475 474
476 intsrc.mpc_irqtype = mp_ExtINT; 475 intsrc.irqtype = mp_ExtINT;
477 intsrc.mpc_srcbusirq = 0; 476 intsrc.srcbusirq = 0;
478 intsrc.mpc_dstirq = 0; /* 8259A to INTIN0 */ 477 intsrc.dstirq = 0; /* 8259A to INTIN0 */
479 MP_intsrc_info(&intsrc); 478 MP_intsrc_info(&intsrc);
480} 479}
481 480
@@ -801,10 +800,10 @@ static int __init get_MP_intsrc_index(struct mpc_intsrc *m)
801{ 800{
802 int i; 801 int i;
803 802
804 if (m->mpc_irqtype != mp_INT) 803 if (m->irqtype != mp_INT)
805 return 0; 804 return 0;
806 805
807 if (m->mpc_irqflag != 0x0f) 806 if (m->irqflag != 0x0f)
808 return 0; 807 return 0;
809 808
810 /* not legacy */ 809 /* not legacy */
@@ -816,9 +815,9 @@ static int __init get_MP_intsrc_index(struct mpc_intsrc *m)
816 if (mp_irqs[i].mp_irqflag != 0x0f) 815 if (mp_irqs[i].mp_irqflag != 0x0f)
817 continue; 816 continue;
818 817
819 if (mp_irqs[i].mp_srcbus != m->mpc_srcbus) 818 if (mp_irqs[i].mp_srcbus != m->srcbus)
820 continue; 819 continue;
821 if (mp_irqs[i].mp_srcbusirq != m->mpc_srcbusirq) 820 if (mp_irqs[i].mp_srcbusirq != m->srcbusirq)
822 continue; 821 continue;
823 if (irq_used[i]) { 822 if (irq_used[i]) {
824 /* already claimed */ 823 /* already claimed */