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>

authored by

Jaswinder Singh Rajput and committed by
Ingo Molnar
c4563826 e253b396

+38 -41
+7 -7
arch/x86/include/asm/mpspec_def.h
··· 71 #define CPU_FAMILY_MASK 0x0F00 72 73 struct mpc_cpu { 74 - unsigned char mpc_type; 75 - unsigned char mpc_apicid; /* Local APIC number */ 76 - unsigned char mpc_apicver; /* Its versions */ 77 - unsigned char mpc_cpuflag; 78 - unsigned int mpc_cpufeature; 79 - unsigned int mpc_featureflag; /* CPUID feature value */ 80 - unsigned int mpc_reserved[2]; 81 }; 82 83 struct mpc_bus {
··· 71 #define CPU_FAMILY_MASK 0x0F00 72 73 struct mpc_cpu { 74 + unsigned char type; 75 + unsigned char apicid; /* Local APIC number */ 76 + unsigned char apicver; /* Its versions */ 77 + unsigned char cpuflag; 78 + unsigned int cpufeature; 79 + unsigned int featureflag; /* CPUID feature value */ 80 + unsigned int reserved[2]; 81 }; 82 83 struct mpc_bus {
+14 -14
arch/x86/kernel/mpparse.c
··· 54 int apicid; 55 char *bootup_cpu = ""; 56 57 - if (!(m->mpc_cpuflag & CPU_ENABLED)) { 58 disabled_cpus++; 59 return; 60 } ··· 62 if (x86_quirks->mpc_apic_id) 63 apicid = x86_quirks->mpc_apic_id(m); 64 else 65 - apicid = m->mpc_apicid; 66 67 - if (m->mpc_cpuflag & CPU_BOOTPROCESSOR) { 68 bootup_cpu = " (Bootup-CPU)"; 69 - boot_cpu_physical_apicid = m->mpc_apicid; 70 } 71 72 - printk(KERN_INFO "Processor #%d%s\n", m->mpc_apicid, bootup_cpu); 73 - generic_processor_info(apicid, m->mpc_apicver); 74 } 75 76 #ifdef CONFIG_X86_IO_APIC ··· 542 /* 543 * 2 CPUs, numbered 0 & 1. 544 */ 545 - processor.mpc_type = MP_PROCESSOR; 546 /* Either an integrated APIC or a discrete 82489DX. */ 547 - processor.mpc_apicver = mpc_default_type > 4 ? 0x10 : 0x01; 548 - processor.mpc_cpuflag = CPU_ENABLED; 549 - processor.mpc_cpufeature = (boot_cpu_data.x86 << 8) | 550 (boot_cpu_data.x86_model << 4) | boot_cpu_data.x86_mask; 551 - processor.mpc_featureflag = boot_cpu_data.x86_capability[0]; 552 - processor.mpc_reserved[0] = 0; 553 - processor.mpc_reserved[1] = 0; 554 for (i = 0; i < 2; i++) { 555 - processor.mpc_apicid = i; 556 MP_processor_info(&processor); 557 } 558
··· 54 int apicid; 55 char *bootup_cpu = ""; 56 57 + if (!(m->cpuflag & CPU_ENABLED)) { 58 disabled_cpus++; 59 return; 60 } ··· 62 if (x86_quirks->mpc_apic_id) 63 apicid = x86_quirks->mpc_apic_id(m); 64 else 65 + apicid = m->apicid; 66 67 + if (m->cpuflag & CPU_BOOTPROCESSOR) { 68 bootup_cpu = " (Bootup-CPU)"; 69 + boot_cpu_physical_apicid = m->apicid; 70 } 71 72 + printk(KERN_INFO "Processor #%d%s\n", m->apicid, bootup_cpu); 73 + generic_processor_info(apicid, m->apicver); 74 } 75 76 #ifdef CONFIG_X86_IO_APIC ··· 542 /* 543 * 2 CPUs, numbered 0 & 1. 544 */ 545 + processor.type = MP_PROCESSOR; 546 /* Either an integrated APIC or a discrete 82489DX. */ 547 + processor.apicver = mpc_default_type > 4 ? 0x10 : 0x01; 548 + processor.cpuflag = CPU_ENABLED; 549 + processor.cpufeature = (boot_cpu_data.x86 << 8) | 550 (boot_cpu_data.x86_model << 4) | boot_cpu_data.x86_mask; 551 + processor.featureflag = boot_cpu_data.x86_capability[0]; 552 + processor.reserved[0] = 0; 553 + processor.reserved[1] = 0; 554 for (i = 0; i < 2; i++) { 555 + processor.apicid = i; 556 MP_processor_info(&processor); 557 } 558
+4 -5
arch/x86/kernel/numaq_32.c
··· 120 static int mpc_apic_id(struct mpc_cpu *m) 121 { 122 int quad = translation_table[mpc_record]->trans_quad; 123 - int logical_apicid = generate_logical_apicid(quad, m->mpc_apicid); 124 125 printk(KERN_DEBUG "Processor #%d %u:%u APIC version %d (quad %d, apic %d)\n", 126 - m->mpc_apicid, 127 - (m->mpc_cpufeature & CPU_FAMILY_MASK) >> 8, 128 - (m->mpc_cpufeature & CPU_MODEL_MASK) >> 4, 129 - m->mpc_apicver, quad, logical_apicid); 130 return logical_apicid; 131 } 132
··· 120 static int mpc_apic_id(struct mpc_cpu *m) 121 { 122 int quad = translation_table[mpc_record]->trans_quad; 123 + int logical_apicid = generate_logical_apicid(quad, m->apicid); 124 125 printk(KERN_DEBUG "Processor #%d %u:%u APIC version %d (quad %d, apic %d)\n", 126 + m->apicid, (m->cpufeature & CPU_FAMILY_MASK) >> 8, 127 + (m->cpufeature & CPU_MODEL_MASK) >> 4, 128 + m->apicver, quad, logical_apicid); 129 return logical_apicid; 130 } 131
+13 -15
arch/x86/kernel/visws_quirks.c
··· 181 int ver, logical_apicid; 182 physid_mask_t apic_cpus; 183 184 - if (!(m->mpc_cpuflag & CPU_ENABLED)) 185 return; 186 187 - logical_apicid = m->mpc_apicid; 188 printk(KERN_INFO "%sCPU #%d %u:%u APIC version %d\n", 189 - m->mpc_cpuflag & CPU_BOOTPROCESSOR ? "Bootup " : "", 190 - m->mpc_apicid, 191 - (m->mpc_cpufeature & CPU_FAMILY_MASK) >> 8, 192 - (m->mpc_cpufeature & CPU_MODEL_MASK) >> 4, 193 - m->mpc_apicver); 194 195 - if (m->mpc_cpuflag & CPU_BOOTPROCESSOR) 196 - boot_cpu_physical_apicid = m->mpc_apicid; 197 198 - ver = m->mpc_apicver; 199 - if ((ver >= 0x14 && m->mpc_apicid >= 0xff) || m->mpc_apicid >= 0xf) { 200 printk(KERN_ERR "Processor #%d INVALID. (Max ID: %d).\n", 201 - m->mpc_apicid, MAX_APICS); 202 return; 203 } 204 205 - apic_cpus = apicid_to_cpu_present(m->mpc_apicid); 206 physids_or(phys_cpu_present_map, phys_cpu_present_map, apic_cpus); 207 /* 208 * Validate version ··· 208 if (ver == 0x0) { 209 printk(KERN_ERR "BIOS bug, APIC version is 0 for CPU#%d! " 210 "fixing up to 0x10. (tell your hw vendor)\n", 211 - m->mpc_apicid); 212 ver = 0x10; 213 } 214 - apic_version[m->mpc_apicid] = ver; 215 } 216 217 static int __init visws_find_smp_config(unsigned int reserve)
··· 181 int ver, logical_apicid; 182 physid_mask_t apic_cpus; 183 184 + if (!(m->cpuflag & CPU_ENABLED)) 185 return; 186 187 + logical_apicid = m->apicid; 188 printk(KERN_INFO "%sCPU #%d %u:%u APIC version %d\n", 189 + m->cpuflag & CPU_BOOTPROCESSOR ? "Bootup " : "", 190 + m->apicid, (m->cpufeature & CPU_FAMILY_MASK) >> 8, 191 + (m->cpufeature & CPU_MODEL_MASK) >> 4, m->apicver); 192 193 + if (m->cpuflag & CPU_BOOTPROCESSOR) 194 + boot_cpu_physical_apicid = m->apicid; 195 196 + ver = m->apicver; 197 + if ((ver >= 0x14 && m->apicid >= 0xff) || m->apicid >= 0xf) { 198 printk(KERN_ERR "Processor #%d INVALID. (Max ID: %d).\n", 199 + m->apicid, MAX_APICS); 200 return; 201 } 202 203 + apic_cpus = apicid_to_cpu_present(m->apicid); 204 physids_or(phys_cpu_present_map, phys_cpu_present_map, apic_cpus); 205 /* 206 * Validate version ··· 210 if (ver == 0x0) { 211 printk(KERN_ERR "BIOS bug, APIC version is 0 for CPU#%d! " 212 "fixing up to 0x10. (tell your hw vendor)\n", 213 + m->apicid); 214 ver = 0x10; 215 } 216 + apic_version[m->apicid] = ver; 217 } 218 219 static int __init visws_find_smp_config(unsigned int reserve)