aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86
diff options
context:
space:
mode:
authorJaswinder Singh Rajput <jaswinder@infradead.org>2009-01-04 11:28:25 -0500
committerIngo Molnar <mingo@elte.hu>2009-01-05 08:08:33 -0500
commitc4563826b72b0d12500260093179a660e79bf412 (patch)
treeec5042aa58a0321fce52d1f69659da17db365929 /arch/x86
parente253b396b145311477b23c176e868e5af6f79174 (diff)
x86: rename all fields of mpc_cpu 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')
-rw-r--r--arch/x86/include/asm/mpspec_def.h14
-rw-r--r--arch/x86/kernel/mpparse.c28
-rw-r--r--arch/x86/kernel/numaq_32.c9
-rw-r--r--arch/x86/kernel/visws_quirks.c28
4 files changed, 38 insertions, 41 deletions
diff --git a/arch/x86/include/asm/mpspec_def.h b/arch/x86/include/asm/mpspec_def.h
index e24e1bc9c15e..78057aaba259 100644
--- a/arch/x86/include/asm/mpspec_def.h
+++ b/arch/x86/include/asm/mpspec_def.h
@@ -71,13 +71,13 @@ struct mpc_table {
71#define CPU_FAMILY_MASK 0x0F00 71#define CPU_FAMILY_MASK 0x0F00
72 72
73struct mpc_cpu { 73struct mpc_cpu {
74 unsigned char mpc_type; 74 unsigned char type;
75 unsigned char mpc_apicid; /* Local APIC number */ 75 unsigned char apicid; /* Local APIC number */
76 unsigned char mpc_apicver; /* Its versions */ 76 unsigned char apicver; /* Its versions */
77 unsigned char mpc_cpuflag; 77 unsigned char cpuflag;
78 unsigned int mpc_cpufeature; 78 unsigned int cpufeature;
79 unsigned int mpc_featureflag; /* CPUID feature value */ 79 unsigned int featureflag; /* CPUID feature value */
80 unsigned int mpc_reserved[2]; 80 unsigned int reserved[2];
81}; 81};
82 82
83struct mpc_bus { 83struct mpc_bus {
diff --git a/arch/x86/kernel/mpparse.c b/arch/x86/kernel/mpparse.c
index a804f107db8a..a8b9ba9709fa 100644
--- a/arch/x86/kernel/mpparse.c
+++ b/arch/x86/kernel/mpparse.c
@@ -54,7 +54,7 @@ static void __init MP_processor_info(struct mpc_cpu *m)
54 int apicid; 54 int apicid;
55 char *bootup_cpu = ""; 55 char *bootup_cpu = "";
56 56
57 if (!(m->mpc_cpuflag & CPU_ENABLED)) { 57 if (!(m->cpuflag & CPU_ENABLED)) {
58 disabled_cpus++; 58 disabled_cpus++;
59 return; 59 return;
60 } 60 }
@@ -62,15 +62,15 @@ static void __init MP_processor_info(struct mpc_cpu *m)
62 if (x86_quirks->mpc_apic_id) 62 if (x86_quirks->mpc_apic_id)
63 apicid = x86_quirks->mpc_apic_id(m); 63 apicid = x86_quirks->mpc_apic_id(m);
64 else 64 else
65 apicid = m->mpc_apicid; 65 apicid = m->apicid;
66 66
67 if (m->mpc_cpuflag & CPU_BOOTPROCESSOR) { 67 if (m->cpuflag & CPU_BOOTPROCESSOR) {
68 bootup_cpu = " (Bootup-CPU)"; 68 bootup_cpu = " (Bootup-CPU)";
69 boot_cpu_physical_apicid = m->mpc_apicid; 69 boot_cpu_physical_apicid = m->apicid;
70 } 70 }
71 71
72 printk(KERN_INFO "Processor #%d%s\n", m->mpc_apicid, bootup_cpu); 72 printk(KERN_INFO "Processor #%d%s\n", m->apicid, bootup_cpu);
73 generic_processor_info(apicid, m->mpc_apicver); 73 generic_processor_info(apicid, m->apicver);
74} 74}
75 75
76#ifdef CONFIG_X86_IO_APIC 76#ifdef CONFIG_X86_IO_APIC
@@ -542,17 +542,17 @@ static inline void __init construct_default_ISA_mptable(int mpc_default_type)
542 /* 542 /*
543 * 2 CPUs, numbered 0 & 1. 543 * 2 CPUs, numbered 0 & 1.
544 */ 544 */
545 processor.mpc_type = MP_PROCESSOR; 545 processor.type = MP_PROCESSOR;
546 /* Either an integrated APIC or a discrete 82489DX. */ 546 /* Either an integrated APIC or a discrete 82489DX. */
547 processor.mpc_apicver = mpc_default_type > 4 ? 0x10 : 0x01; 547 processor.apicver = mpc_default_type > 4 ? 0x10 : 0x01;
548 processor.mpc_cpuflag = CPU_ENABLED; 548 processor.cpuflag = CPU_ENABLED;
549 processor.mpc_cpufeature = (boot_cpu_data.x86 << 8) | 549 processor.cpufeature = (boot_cpu_data.x86 << 8) |
550 (boot_cpu_data.x86_model << 4) | boot_cpu_data.x86_mask; 550 (boot_cpu_data.x86_model << 4) | boot_cpu_data.x86_mask;
551 processor.mpc_featureflag = boot_cpu_data.x86_capability[0]; 551 processor.featureflag = boot_cpu_data.x86_capability[0];
552 processor.mpc_reserved[0] = 0; 552 processor.reserved[0] = 0;
553 processor.mpc_reserved[1] = 0; 553 processor.reserved[1] = 0;
554 for (i = 0; i < 2; i++) { 554 for (i = 0; i < 2; i++) {
555 processor.mpc_apicid = i; 555 processor.apicid = i;
556 MP_processor_info(&processor); 556 MP_processor_info(&processor);
557 } 557 }
558 558
diff --git a/arch/x86/kernel/numaq_32.c b/arch/x86/kernel/numaq_32.c
index aa1e5a068551..a53831c64c58 100644
--- a/arch/x86/kernel/numaq_32.c
+++ b/arch/x86/kernel/numaq_32.c
@@ -120,13 +120,12 @@ static inline int generate_logical_apicid(int quad, int phys_apicid)
120static int mpc_apic_id(struct mpc_cpu *m) 120static int mpc_apic_id(struct mpc_cpu *m)
121{ 121{
122 int quad = translation_table[mpc_record]->trans_quad; 122 int quad = translation_table[mpc_record]->trans_quad;
123 int logical_apicid = generate_logical_apicid(quad, m->mpc_apicid); 123 int logical_apicid = generate_logical_apicid(quad, m->apicid);
124 124
125 printk(KERN_DEBUG "Processor #%d %u:%u APIC version %d (quad %d, apic %d)\n", 125 printk(KERN_DEBUG "Processor #%d %u:%u APIC version %d (quad %d, apic %d)\n",
126 m->mpc_apicid, 126 m->apicid, (m->cpufeature & CPU_FAMILY_MASK) >> 8,
127 (m->mpc_cpufeature & CPU_FAMILY_MASK) >> 8, 127 (m->cpufeature & CPU_MODEL_MASK) >> 4,
128 (m->mpc_cpufeature & CPU_MODEL_MASK) >> 4, 128 m->apicver, quad, logical_apicid);
129 m->mpc_apicver, quad, logical_apicid);
130 return logical_apicid; 129 return logical_apicid;
131} 130}
132 131
diff --git a/arch/x86/kernel/visws_quirks.c b/arch/x86/kernel/visws_quirks.c
index ca12afa63475..d801d06af068 100644
--- a/arch/x86/kernel/visws_quirks.c
+++ b/arch/x86/kernel/visws_quirks.c
@@ -181,28 +181,26 @@ static void __init MP_processor_info(struct mpc_cpu *m)
181 int ver, logical_apicid; 181 int ver, logical_apicid;
182 physid_mask_t apic_cpus; 182 physid_mask_t apic_cpus;
183 183
184 if (!(m->mpc_cpuflag & CPU_ENABLED)) 184 if (!(m->cpuflag & CPU_ENABLED))
185 return; 185 return;
186 186
187 logical_apicid = m->mpc_apicid; 187 logical_apicid = m->apicid;
188 printk(KERN_INFO "%sCPU #%d %u:%u APIC version %d\n", 188 printk(KERN_INFO "%sCPU #%d %u:%u APIC version %d\n",
189 m->mpc_cpuflag & CPU_BOOTPROCESSOR ? "Bootup " : "", 189 m->cpuflag & CPU_BOOTPROCESSOR ? "Bootup " : "",
190 m->mpc_apicid, 190 m->apicid, (m->cpufeature & CPU_FAMILY_MASK) >> 8,
191 (m->mpc_cpufeature & CPU_FAMILY_MASK) >> 8, 191 (m->cpufeature & CPU_MODEL_MASK) >> 4, m->apicver);
192 (m->mpc_cpufeature & CPU_MODEL_MASK) >> 4,
193 m->mpc_apicver);
194 192
195 if (m->mpc_cpuflag & CPU_BOOTPROCESSOR) 193 if (m->cpuflag & CPU_BOOTPROCESSOR)
196 boot_cpu_physical_apicid = m->mpc_apicid; 194 boot_cpu_physical_apicid = m->apicid;
197 195
198 ver = m->mpc_apicver; 196 ver = m->apicver;
199 if ((ver >= 0x14 && m->mpc_apicid >= 0xff) || m->mpc_apicid >= 0xf) { 197 if ((ver >= 0x14 && m->apicid >= 0xff) || m->apicid >= 0xf) {
200 printk(KERN_ERR "Processor #%d INVALID. (Max ID: %d).\n", 198 printk(KERN_ERR "Processor #%d INVALID. (Max ID: %d).\n",
201 m->mpc_apicid, MAX_APICS); 199 m->apicid, MAX_APICS);
202 return; 200 return;
203 } 201 }
204 202
205 apic_cpus = apicid_to_cpu_present(m->mpc_apicid); 203 apic_cpus = apicid_to_cpu_present(m->apicid);
206 physids_or(phys_cpu_present_map, phys_cpu_present_map, apic_cpus); 204 physids_or(phys_cpu_present_map, phys_cpu_present_map, apic_cpus);
207 /* 205 /*
208 * Validate version 206 * Validate version
@@ -210,10 +208,10 @@ static void __init MP_processor_info(struct mpc_cpu *m)
210 if (ver == 0x0) { 208 if (ver == 0x0) {
211 printk(KERN_ERR "BIOS bug, APIC version is 0 for CPU#%d! " 209 printk(KERN_ERR "BIOS bug, APIC version is 0 for CPU#%d! "
212 "fixing up to 0x10. (tell your hw vendor)\n", 210 "fixing up to 0x10. (tell your hw vendor)\n",
213 m->mpc_apicid); 211 m->apicid);
214 ver = 0x10; 212 ver = 0x10;
215 } 213 }
216 apic_version[m->mpc_apicid] = ver; 214 apic_version[m->apicid] = ver;
217} 215}
218 216
219static int __init visws_find_smp_config(unsigned int reserve) 217static int __init visws_find_smp_config(unsigned int reserve)