]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
x86: rename all fields of mpc_cpu mpc_X to X
authorJaswinder Singh Rajput <jaswinder@infradead.org>
Sun, 4 Jan 2009 16:28:25 +0000 (21:58 +0530)
committerIngo Molnar <mingo@elte.hu>
Mon, 5 Jan 2009 13:08:33 +0000 (14:08 +0100)
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>
arch/x86/include/asm/mpspec_def.h
arch/x86/kernel/mpparse.c
arch/x86/kernel/numaq_32.c
arch/x86/kernel/visws_quirks.c

index e24e1bc9c15efe112b4669e4be80f10279492277..78057aaba2592e8e0f098db3cafdf87783499a91 100644 (file)
@@ -71,13 +71,13 @@ struct mpc_table {
 #define CPU_FAMILY_MASK                0x0F00
 
 struct mpc_cpu {
-       unsigned char mpc_type;
-       unsigned char mpc_apicid;       /* Local APIC number */
-       unsigned char mpc_apicver;      /* Its versions */
-       unsigned char mpc_cpuflag;
-       unsigned int mpc_cpufeature;
-       unsigned int mpc_featureflag;   /* CPUID feature value */
-       unsigned int mpc_reserved[2];
+       unsigned char type;
+       unsigned char apicid;           /* Local APIC number */
+       unsigned char apicver;          /* Its versions */
+       unsigned char cpuflag;
+       unsigned int cpufeature;
+       unsigned int featureflag;       /* CPUID feature value */
+       unsigned int reserved[2];
 };
 
 struct mpc_bus {
index a804f107db8a76035f03c026b292dcd3ffa53fae..a8b9ba9709fa71838031934bffed836675f91e86 100644 (file)
@@ -54,7 +54,7 @@ static void __init MP_processor_info(struct mpc_cpu *m)
        int apicid;
        char *bootup_cpu = "";
 
-       if (!(m->mpc_cpuflag & CPU_ENABLED)) {
+       if (!(m->cpuflag & CPU_ENABLED)) {
                disabled_cpus++;
                return;
        }
@@ -62,15 +62,15 @@ static void __init MP_processor_info(struct mpc_cpu *m)
        if (x86_quirks->mpc_apic_id)
                apicid = x86_quirks->mpc_apic_id(m);
        else
-               apicid = m->mpc_apicid;
+               apicid = m->apicid;
 
-       if (m->mpc_cpuflag & CPU_BOOTPROCESSOR) {
+       if (m->cpuflag & CPU_BOOTPROCESSOR) {
                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);
-       generic_processor_info(apicid, m->mpc_apicver);
+       printk(KERN_INFO "Processor #%d%s\n", m->apicid, bootup_cpu);
+       generic_processor_info(apicid, m->apicver);
 }
 
 #ifdef CONFIG_X86_IO_APIC
@@ -542,17 +542,17 @@ static inline void __init construct_default_ISA_mptable(int mpc_default_type)
        /*
         * 2 CPUs, numbered 0 & 1.
         */
-       processor.mpc_type = MP_PROCESSOR;
+       processor.type = MP_PROCESSOR;
        /* Either an integrated APIC or a discrete 82489DX. */
-       processor.mpc_apicver = mpc_default_type > 4 ? 0x10 : 0x01;
-       processor.mpc_cpuflag = CPU_ENABLED;
-       processor.mpc_cpufeature = (boot_cpu_data.x86 << 8) |
+       processor.apicver = mpc_default_type > 4 ? 0x10 : 0x01;
+       processor.cpuflag = CPU_ENABLED;
+       processor.cpufeature = (boot_cpu_data.x86 << 8) |
            (boot_cpu_data.x86_model << 4) | boot_cpu_data.x86_mask;
-       processor.mpc_featureflag = boot_cpu_data.x86_capability[0];
-       processor.mpc_reserved[0] = 0;
-       processor.mpc_reserved[1] = 0;
+       processor.featureflag = boot_cpu_data.x86_capability[0];
+       processor.reserved[0] = 0;
+       processor.reserved[1] = 0;
        for (i = 0; i < 2; i++) {
-               processor.mpc_apicid = i;
+               processor.apicid = i;
                MP_processor_info(&processor);
        }
 
index aa1e5a068551eccde536581e6a390a828dfb1c13..a53831c64c587a0b210a9e95110249af726e1831 100644 (file)
@@ -120,13 +120,12 @@ static inline int generate_logical_apicid(int quad, int phys_apicid)
 static int mpc_apic_id(struct mpc_cpu *m)
 {
        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",
-              m->mpc_apicid,
-              (m->mpc_cpufeature & CPU_FAMILY_MASK) >> 8,
-              (m->mpc_cpufeature & CPU_MODEL_MASK) >> 4,
-              m->mpc_apicver, quad, logical_apicid);
+              m->apicid, (m->cpufeature & CPU_FAMILY_MASK) >> 8,
+              (m->cpufeature & CPU_MODEL_MASK) >> 4,
+              m->apicver, quad, logical_apicid);
        return logical_apicid;
 }
 
index ca12afa6347509b6b72f584cf84a2ef7e7e598a4..d801d06af068ff1a3a752380827348f3f57e79e2 100644 (file)
@@ -181,28 +181,26 @@ static void __init MP_processor_info(struct mpc_cpu *m)
        int ver, logical_apicid;
        physid_mask_t apic_cpus;
 
-       if (!(m->mpc_cpuflag & CPU_ENABLED))
+       if (!(m->cpuflag & CPU_ENABLED))
                return;
 
-       logical_apicid = m->mpc_apicid;
+       logical_apicid = m->apicid;
        printk(KERN_INFO "%sCPU #%d %u:%u APIC version %d\n",
-              m->mpc_cpuflag & CPU_BOOTPROCESSOR ? "Bootup " : "",
-              m->mpc_apicid,
-              (m->mpc_cpufeature & CPU_FAMILY_MASK) >> 8,
-              (m->mpc_cpufeature & CPU_MODEL_MASK) >> 4,
-              m->mpc_apicver);
+              m->cpuflag & CPU_BOOTPROCESSOR ? "Bootup " : "",
+              m->apicid, (m->cpufeature & CPU_FAMILY_MASK) >> 8,
+              (m->cpufeature & CPU_MODEL_MASK) >> 4, m->apicver);
 
-       if (m->mpc_cpuflag & CPU_BOOTPROCESSOR)
-               boot_cpu_physical_apicid = m->mpc_apicid;
+       if (m->cpuflag & CPU_BOOTPROCESSOR)
+               boot_cpu_physical_apicid = m->apicid;
 
-       ver = m->mpc_apicver;
-       if ((ver >= 0x14 && m->mpc_apicid >= 0xff) || m->mpc_apicid >= 0xf) {
+       ver = m->apicver;
+       if ((ver >= 0x14 && m->apicid >= 0xff) || m->apicid >= 0xf) {
                printk(KERN_ERR "Processor #%d INVALID. (Max ID: %d).\n",
-                       m->mpc_apicid, MAX_APICS);
+                       m->apicid, MAX_APICS);
                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);
        /*
         * Validate version
@@ -210,10 +208,10 @@ static void __init MP_processor_info(struct mpc_cpu *m)
        if (ver == 0x0) {
                printk(KERN_ERR "BIOS bug, APIC version is 0 for CPU#%d! "
                        "fixing up to 0x10. (tell your hw vendor)\n",
-                       m->mpc_apicid);
+                       m->apicid);
                ver = 0x10;
        }
-       apic_version[m->mpc_apicid] = ver;
+       apic_version[m->apicid] = ver;
 }
 
 static int __init visws_find_smp_config(unsigned int reserve)