Commit c4563826 authored by Jaswinder Singh Rajput's avatar Jaswinder Singh Rajput Committed by Ingo Molnar

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: default avatarJaswinder Singh Rajput <jaswinderrajput@gmail.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent e253b396
...@@ -71,13 +71,13 @@ struct mpc_table { ...@@ -71,13 +71,13 @@ struct mpc_table {
#define CPU_FAMILY_MASK 0x0F00 #define CPU_FAMILY_MASK 0x0F00
struct mpc_cpu { struct mpc_cpu {
unsigned char mpc_type; unsigned char type;
unsigned char mpc_apicid; /* Local APIC number */ unsigned char apicid; /* Local APIC number */
unsigned char mpc_apicver; /* Its versions */ unsigned char apicver; /* Its versions */
unsigned char mpc_cpuflag; unsigned char cpuflag;
unsigned int mpc_cpufeature; unsigned int cpufeature;
unsigned int mpc_featureflag; /* CPUID feature value */ unsigned int featureflag; /* CPUID feature value */
unsigned int mpc_reserved[2]; unsigned int reserved[2];
}; };
struct mpc_bus { struct mpc_bus {
......
...@@ -54,7 +54,7 @@ static void __init MP_processor_info(struct mpc_cpu *m) ...@@ -54,7 +54,7 @@ static void __init MP_processor_info(struct mpc_cpu *m)
int apicid; int apicid;
char *bootup_cpu = ""; char *bootup_cpu = "";
if (!(m->mpc_cpuflag & CPU_ENABLED)) { if (!(m->cpuflag & CPU_ENABLED)) {
disabled_cpus++; disabled_cpus++;
return; return;
} }
...@@ -62,15 +62,15 @@ static void __init MP_processor_info(struct mpc_cpu *m) ...@@ -62,15 +62,15 @@ static void __init MP_processor_info(struct mpc_cpu *m)
if (x86_quirks->mpc_apic_id) if (x86_quirks->mpc_apic_id)
apicid = x86_quirks->mpc_apic_id(m); apicid = x86_quirks->mpc_apic_id(m);
else else
apicid = m->mpc_apicid; apicid = m->apicid;
if (m->mpc_cpuflag & CPU_BOOTPROCESSOR) { if (m->cpuflag & CPU_BOOTPROCESSOR) {
bootup_cpu = " (Bootup-CPU)"; bootup_cpu = " (Bootup-CPU)";
boot_cpu_physical_apicid = m->mpc_apicid; boot_cpu_physical_apicid = m->apicid;
} }
printk(KERN_INFO "Processor #%d%s\n", m->mpc_apicid, bootup_cpu); printk(KERN_INFO "Processor #%d%s\n", m->apicid, bootup_cpu);
generic_processor_info(apicid, m->mpc_apicver); generic_processor_info(apicid, m->apicver);
} }
#ifdef CONFIG_X86_IO_APIC #ifdef CONFIG_X86_IO_APIC
...@@ -542,17 +542,17 @@ static inline void __init construct_default_ISA_mptable(int mpc_default_type) ...@@ -542,17 +542,17 @@ static inline void __init construct_default_ISA_mptable(int mpc_default_type)
/* /*
* 2 CPUs, numbered 0 & 1. * 2 CPUs, numbered 0 & 1.
*/ */
processor.mpc_type = MP_PROCESSOR; processor.type = MP_PROCESSOR;
/* Either an integrated APIC or a discrete 82489DX. */ /* Either an integrated APIC or a discrete 82489DX. */
processor.mpc_apicver = mpc_default_type > 4 ? 0x10 : 0x01; processor.apicver = mpc_default_type > 4 ? 0x10 : 0x01;
processor.mpc_cpuflag = CPU_ENABLED; processor.cpuflag = CPU_ENABLED;
processor.mpc_cpufeature = (boot_cpu_data.x86 << 8) | processor.cpufeature = (boot_cpu_data.x86 << 8) |
(boot_cpu_data.x86_model << 4) | boot_cpu_data.x86_mask; (boot_cpu_data.x86_model << 4) | boot_cpu_data.x86_mask;
processor.mpc_featureflag = boot_cpu_data.x86_capability[0]; processor.featureflag = boot_cpu_data.x86_capability[0];
processor.mpc_reserved[0] = 0; processor.reserved[0] = 0;
processor.mpc_reserved[1] = 0; processor.reserved[1] = 0;
for (i = 0; i < 2; i++) { for (i = 0; i < 2; i++) {
processor.mpc_apicid = i; processor.apicid = i;
MP_processor_info(&processor); MP_processor_info(&processor);
} }
......
...@@ -120,13 +120,12 @@ static inline int generate_logical_apicid(int quad, int phys_apicid) ...@@ -120,13 +120,12 @@ static inline int generate_logical_apicid(int quad, int phys_apicid)
static int mpc_apic_id(struct mpc_cpu *m) static int mpc_apic_id(struct mpc_cpu *m)
{ {
int quad = translation_table[mpc_record]->trans_quad; int quad = translation_table[mpc_record]->trans_quad;
int logical_apicid = generate_logical_apicid(quad, m->mpc_apicid); int logical_apicid = generate_logical_apicid(quad, m->apicid);
printk(KERN_DEBUG "Processor #%d %u:%u APIC version %d (quad %d, apic %d)\n", printk(KERN_DEBUG "Processor #%d %u:%u APIC version %d (quad %d, apic %d)\n",
m->mpc_apicid, m->apicid, (m->cpufeature & CPU_FAMILY_MASK) >> 8,
(m->mpc_cpufeature & CPU_FAMILY_MASK) >> 8, (m->cpufeature & CPU_MODEL_MASK) >> 4,
(m->mpc_cpufeature & CPU_MODEL_MASK) >> 4, m->apicver, quad, logical_apicid);
m->mpc_apicver, quad, logical_apicid);
return logical_apicid; return logical_apicid;
} }
......
...@@ -181,28 +181,26 @@ static void __init MP_processor_info(struct mpc_cpu *m) ...@@ -181,28 +181,26 @@ static void __init MP_processor_info(struct mpc_cpu *m)
int ver, logical_apicid; int ver, logical_apicid;
physid_mask_t apic_cpus; physid_mask_t apic_cpus;
if (!(m->mpc_cpuflag & CPU_ENABLED)) if (!(m->cpuflag & CPU_ENABLED))
return; return;
logical_apicid = m->mpc_apicid; logical_apicid = m->apicid;
printk(KERN_INFO "%sCPU #%d %u:%u APIC version %d\n", printk(KERN_INFO "%sCPU #%d %u:%u APIC version %d\n",
m->mpc_cpuflag & CPU_BOOTPROCESSOR ? "Bootup " : "", m->cpuflag & CPU_BOOTPROCESSOR ? "Bootup " : "",
m->mpc_apicid, m->apicid, (m->cpufeature & CPU_FAMILY_MASK) >> 8,
(m->mpc_cpufeature & CPU_FAMILY_MASK) >> 8, (m->cpufeature & CPU_MODEL_MASK) >> 4, m->apicver);
(m->mpc_cpufeature & CPU_MODEL_MASK) >> 4,
m->mpc_apicver);
if (m->mpc_cpuflag & CPU_BOOTPROCESSOR) if (m->cpuflag & CPU_BOOTPROCESSOR)
boot_cpu_physical_apicid = m->mpc_apicid; boot_cpu_physical_apicid = m->apicid;
ver = m->mpc_apicver; ver = m->apicver;
if ((ver >= 0x14 && m->mpc_apicid >= 0xff) || m->mpc_apicid >= 0xf) { if ((ver >= 0x14 && m->apicid >= 0xff) || m->apicid >= 0xf) {
printk(KERN_ERR "Processor #%d INVALID. (Max ID: %d).\n", printk(KERN_ERR "Processor #%d INVALID. (Max ID: %d).\n",
m->mpc_apicid, MAX_APICS); m->apicid, MAX_APICS);
return; return;
} }
apic_cpus = apicid_to_cpu_present(m->mpc_apicid); apic_cpus = apicid_to_cpu_present(m->apicid);
physids_or(phys_cpu_present_map, phys_cpu_present_map, apic_cpus); physids_or(phys_cpu_present_map, phys_cpu_present_map, apic_cpus);
/* /*
* Validate version * Validate version
...@@ -210,10 +208,10 @@ static void __init MP_processor_info(struct mpc_cpu *m) ...@@ -210,10 +208,10 @@ static void __init MP_processor_info(struct mpc_cpu *m)
if (ver == 0x0) { if (ver == 0x0) {
printk(KERN_ERR "BIOS bug, APIC version is 0 for CPU#%d! " printk(KERN_ERR "BIOS bug, APIC version is 0 for CPU#%d! "
"fixing up to 0x10. (tell your hw vendor)\n", "fixing up to 0x10. (tell your hw vendor)\n",
m->mpc_apicid); m->apicid);
ver = 0x10; ver = 0x10;
} }
apic_version[m->mpc_apicid] = ver; apic_version[m->apicid] = ver;
} }
static int __init visws_find_smp_config(unsigned int reserve) static int __init visws_find_smp_config(unsigned int reserve)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment