Commit 68bbc172cd1b0ee01814304b8a7bef8922d5fdca

Authored by Magnus Damm
Committed by Andi Kleen
1 parent 6ad9165811

[PATCH] i386: remove redundant generic_identify() calls when identifying cpus

cpu_dev->c_identify is only called from arch/i386/common.c:identify_cpu(), and
this after generic_identify() already has been called. There is no need to call
this function twice and hook it in c_identify - but I may be wrong, please
double check before applying.

This patch also removes generic_identify() from cpu.h to avoid unnecessary
future nesting.

Signed-off-by: Magnus Damm <magnus@valinux.co.jp>
Signed-off-by: Andi Kleen <ak@suse.de>

Showing 7 changed files with 1 additions and 9 deletions Side-by-side Diff

arch/i386/kernel/cpu/amd.c
... ... @@ -275,7 +275,6 @@
275 275 },
276 276 },
277 277 .c_init = init_amd,
278   - .c_identify = generic_identify,
279 278 .c_size_cache = amd_size_cache,
280 279 };
281 280  
arch/i386/kernel/cpu/common.c
... ... @@ -265,7 +265,7 @@
265 265 }
266 266 }
267 267  
268   -void __cpuinit generic_identify(struct cpuinfo_x86 * c)
  268 +static void __cpuinit generic_identify(struct cpuinfo_x86 * c)
269 269 {
270 270 u32 tfms, xlvl;
271 271 int ebx;
arch/i386/kernel/cpu/cpu.h
... ... @@ -24,7 +24,5 @@
24 24 extern int get_model_name(struct cpuinfo_x86 *c);
25 25 extern void display_cacheinfo(struct cpuinfo_x86 *c);
26 26  
27   -extern void generic_identify(struct cpuinfo_x86 * c);
28   -
29 27 extern void early_intel_workaround(struct cpuinfo_x86 *c);
arch/i386/kernel/cpu/cyrix.c
... ... @@ -427,7 +427,6 @@
427 427 local_irq_restore(flags);
428 428 }
429 429 }
430   - generic_identify(c);
431 430 }
432 431  
433 432 static struct cpu_dev cyrix_cpu_dev __initdata = {
... ... @@ -457,7 +456,6 @@
457 456 .c_vendor = "NSC",
458 457 .c_ident = { "Geode by NSC" },
459 458 .c_init = init_nsc,
460   - .c_identify = generic_identify,
461 459 };
462 460  
463 461 int __init nsc_init_cpu(void)
arch/i386/kernel/cpu/intel.c
... ... @@ -263,7 +263,6 @@
263 263 },
264 264 },
265 265 .c_init = init_intel,
266   - .c_identify = generic_identify,
267 266 .c_size_cache = intel_size_cache,
268 267 };
269 268  
arch/i386/kernel/cpu/nexgen.c
... ... @@ -38,7 +38,6 @@
38 38 if ( deep_magic_nexgen_probe() ) {
39 39 strcpy(c->x86_vendor_id, "NexGenDriven");
40 40 }
41   - generic_identify(c);
42 41 }
43 42  
44 43 static struct cpu_dev nexgen_cpu_dev __initdata = {
arch/i386/kernel/cpu/transmeta.c
... ... @@ -88,7 +88,6 @@
88 88 static void __init transmeta_identify(struct cpuinfo_x86 * c)
89 89 {
90 90 u32 xlvl;
91   - generic_identify(c);
92 91  
93 92 /* Transmeta-defined flags: level 0x80860001 */
94 93 xlvl = cpuid_eax(0x80860000);