Commit 68bbc172 authored by Magnus Damm's avatar Magnus Damm Committed by Andi Kleen
Browse files

[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: default avatarMagnus Damm <magnus@valinux.co.jp>
Signed-off-by: default avatarAndi Kleen <ak@suse.de>
parent 6ad91658
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -275,7 +275,6 @@ static struct cpu_dev amd_cpu_dev __initdata = {
		},
	},
	.c_init		= init_amd,
	.c_identify	= generic_identify,
	.c_size_cache	= amd_size_cache,
};

+1 −1
Original line number Diff line number Diff line
@@ -265,7 +265,7 @@ static void __init early_cpu_detect(void)
	}
}

void __cpuinit generic_identify(struct cpuinfo_x86 * c)
static void __cpuinit generic_identify(struct cpuinfo_x86 * c)
{
	u32 tfms, xlvl;
	int ebx;
+0 −2
Original line number Diff line number Diff line
@@ -24,7 +24,5 @@ extern struct cpu_dev * cpu_devs [X86_VENDOR_NUM];
extern int get_model_name(struct cpuinfo_x86 *c);
extern void display_cacheinfo(struct cpuinfo_x86 *c);

extern void generic_identify(struct cpuinfo_x86 * c);

extern void early_intel_workaround(struct cpuinfo_x86 *c);
+0 −2
Original line number Diff line number Diff line
@@ -427,7 +427,6 @@ static void cyrix_identify(struct cpuinfo_x86 * c)
			local_irq_restore(flags);
		}
	}
	generic_identify(c);
}

static struct cpu_dev cyrix_cpu_dev __initdata = {
@@ -457,7 +456,6 @@ static struct cpu_dev nsc_cpu_dev __initdata = {
	.c_vendor	= "NSC",
	.c_ident 	= { "Geode by NSC" },
	.c_init		= init_nsc,
	.c_identify	= generic_identify,
};

int __init nsc_init_cpu(void)
+0 −1
Original line number Diff line number Diff line
@@ -263,7 +263,6 @@ static struct cpu_dev intel_cpu_dev __cpuinitdata = {
		},
	},
	.c_init		= init_intel,
	.c_identify	= generic_identify,
	.c_size_cache	= intel_size_cache,
};

Loading