x86: remove duplicated get_model_name() calling
authorYinghai Lu <yhlu.kernel@gmail.com>
Sat, 6 Sep 2008 08:52:27 +0000 (01:52 -0700)
committerIngo Molnar <mingo@elte.hu>
Sat, 6 Sep 2008 12:09:12 +0000 (14:09 +0200)
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/kernel/cpu/amd.c
arch/x86/kernel/cpu/amd_64.c
arch/x86/kernel/cpu/centaur.c
arch/x86/kernel/cpu/common.c
arch/x86/kernel/cpu/cpu.h
arch/x86/kernel/cpu/cyrix.c
arch/x86/kernel/cpu/transmeta.c

index d64ea6097ca7267b39388388158dc1e6c1ea4c13..e0ba2c7c5a181dbfb6ec5400cd3e6827e6b95f39 100644 (file)
@@ -42,7 +42,6 @@ static void __cpuinit init_amd(struct cpuinfo_x86 *c)
 {
        u32 l, h;
        int mbytes = num_physpages >> (20-PAGE_SHIFT);
-       int r;
 
 #ifdef CONFIG_SMP
        unsigned long long value;
@@ -75,8 +74,6 @@ static void __cpuinit init_amd(struct cpuinfo_x86 *c)
         */
        clear_cpu_cap(c, 0*32+31);
 
-       r = get_model_name(c);
-
        switch (c->x86) {
        case 4:
                /*
index d1c721c0c49f4afa9a77cb0b9911d6bf523cf58e..c5fbf7477ead859d20c4f7115b1605f2e2e58613 100644 (file)
@@ -157,8 +157,7 @@ static void __cpuinit init_amd(struct cpuinfo_x86 *c)
        if (c->x86 >= 6)
                set_cpu_cap(c, X86_FEATURE_FXSAVE_LEAK);
 
-       level = get_model_name(c);
-       if (!level) {
+       if (!c->x86_model_id[0]) {
                switch (c->x86) {
                case 0xf:
                        /* Should distinguish Models here, but this is only
index e5f6d89521bf65ce53cc9b816539a4546440c11a..89bfdd9cacc69a363fc0d9f024dc45b97310bf9e 100644 (file)
@@ -289,7 +289,6 @@ static void __cpuinit init_c3(struct cpuinfo_x86 *c)
        if (c->x86_model >= 6 && c->x86_model < 9)
                set_cpu_cap(c, X86_FEATURE_3DNOW);
 
-       get_model_name(c);
        display_cacheinfo(c);
 }
 
index 286c89a991bdd61e12557044f92a8e130fd23091..a8b9b72424286d20696da3ec772dfc8750e4f97b 100644 (file)
@@ -252,13 +252,13 @@ static struct cpu_dev __cpuinitdata default_cpu = {
        .c_x86_vendor = X86_VENDOR_UNKNOWN,
 };
 
-int __cpuinit get_model_name(struct cpuinfo_x86 *c)
+static void __cpuinit get_model_name(struct cpuinfo_x86 *c)
 {
        unsigned int *v;
        char *p, *q;
 
        if (c->extended_cpuid_level < 0x80000004)
-               return 0;
+               return;
 
        v = (unsigned int *) c->x86_model_id;
        cpuid(0x80000002, &v[0], &v[1], &v[2], &v[3]);
@@ -277,8 +277,6 @@ int __cpuinit get_model_name(struct cpuinfo_x86 *c)
             while (q <= &c->x86_model_id[48])
                  *q++ = '\0';  /* Zero-pad the rest */
        }
-
-       return 1;
 }
 
 void __cpuinit display_cacheinfo(struct cpuinfo_x86 *c)
@@ -610,8 +608,7 @@ static void __cpuinit generic_identify(struct cpuinfo_x86 *c)
 #endif
        }
 
-       if (c->extended_cpuid_level >= 0x80000004)
-               get_model_name(c); /* Default name */
+       get_model_name(c); /* Default name */
 
        init_scattered_cpuid_features(c);
        detect_nopl(c);
index 3cc9d92afd8f5bc8fcc7613de0f75771056ca008..de4094a3921071b94b9b71a1bcd2d85158c6c957 100644 (file)
@@ -31,7 +31,6 @@ struct cpu_dev {
 
 extern struct cpu_dev *__x86_cpu_dev_start[], *__x86_cpu_dev_end[];
 
-extern int get_model_name(struct cpuinfo_x86 *c);
 extern void display_cacheinfo(struct cpuinfo_x86 *c);
 
 #endif
index 3f8c7283d8161c71f8b8da1adcb1011350ef5510..ffd0f5ed071a705e5f55e279ac12f0c2d0cf9419 100644 (file)
@@ -301,7 +301,6 @@ static void __cpuinit init_cyrix(struct cpuinfo_x86 *c)
                         */
                        if ((0x30 <= dir1 && dir1 <= 0x6f) || (0x80 <= dir1 && dir1 <= 0x8f))
                                geode_configure();
-                       get_model_name(c);  /* get CPU marketing name */
                        return;
                } else { /* MediaGX */
                        Cx86_cb[2] = (dir0_lsn & 1) ? '3' : '4';
index 7c46e6ecedcaad01329ab856e8b8dec0cc19d122..738e03244f9597c04ab708522f9f888d599aca8d 100644 (file)
@@ -12,7 +12,6 @@ static void __cpuinit init_transmeta(struct cpuinfo_x86 *c)
        unsigned int cpu_rev, cpu_freq = 0, cpu_flags, new_cpu_rev;
        char cpu_info[65];
 
-       get_model_name(c);      /* Same as AMD/Cyrix */
        display_cacheinfo(c);
 
        /* Print CMS and CPU revision */