diff options
| author | Jaswinder Singh Rajput <jaswinder@infradead.org> | 2009-01-04 11:26:44 -0500 |
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2009-01-05 08:08:32 -0500 |
| commit | e253b396b145311477b23c176e868e5af6f79174 (patch) | |
| tree | 363b0ff0aed1407afa432d1dd7ba91fb9e0b80b2 | |
| parent | b5ced7cdb018b8728ddcfb175c26f30cc185cf66 (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>
| -rw-r--r-- | arch/x86/include/asm/mpspec_def.h | 14 | ||||
| -rw-r--r-- | arch/x86/kernel/mpparse.c | 79 |
2 files changed, 46 insertions, 47 deletions
diff --git a/arch/x86/include/asm/mpspec_def.h b/arch/x86/include/asm/mpspec_def.h index c8bbb3212bd7..e24e1bc9c15e 100644 --- a/arch/x86/include/asm/mpspec_def.h +++ b/arch/x86/include/asm/mpspec_def.h | |||
| @@ -117,13 +117,13 @@ struct mpc_ioapic { | |||
| 117 | }; | 117 | }; |
| 118 | 118 | ||
| 119 | struct mpc_intsrc { | 119 | struct mpc_intsrc { |
| 120 | unsigned char mpc_type; | 120 | unsigned char type; |
| 121 | unsigned char mpc_irqtype; | 121 | unsigned char irqtype; |
| 122 | unsigned short mpc_irqflag; | 122 | unsigned short irqflag; |
| 123 | unsigned char mpc_srcbus; | 123 | unsigned char srcbus; |
| 124 | unsigned char mpc_srcbusirq; | 124 | unsigned char srcbusirq; |
| 125 | unsigned char mpc_dstapic; | 125 | unsigned char dstapic; |
| 126 | unsigned char mpc_dstirq; | 126 | unsigned char dstirq; |
| 127 | }; | 127 | }; |
| 128 | 128 | ||
| 129 | enum mp_irq_source_types { | 129 | enum mp_irq_source_types { |
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 | ||
| 164 | static void __init print_mp_irq_info(struct mp_config_intsrc *mp_irq) | 163 | static 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) | |||
| 173 | static void __init assign_to_mp_irq(struct mpc_intsrc *m, | 172 | static 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 | ||
| 185 | static void __init assign_to_mpc_intsrc(struct mp_config_intsrc *mp_irq, | 184 | static 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 | ||
| 197 | static int __init mp_irq_mpc_intsrc_cmp(struct mp_config_intsrc *mp_irq, | 196 | static 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 */ |
