Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b9e67f00 authored by Yinghai Lu's avatar Yinghai Lu Committed by Ingo Molnar
Browse files

x86: cpu/common.c, merge default_init()



Signed-off-by: default avatarYinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent fab334c1
Loading
Loading
Loading
Loading
+4 −0
Original line number Original line Diff line number Diff line
@@ -224,6 +224,9 @@ static struct cpu_dev *cpu_devs[X86_VENDOR_NUM] = {};


static void __cpuinit default_init(struct cpuinfo_x86 *c)
static void __cpuinit default_init(struct cpuinfo_x86 *c)
{
{
#ifdef CONFIG_X86_64
	display_cacheinfo(c);
#else
	/* Not much we can do here... */
	/* Not much we can do here... */
	/* Check if at least it has cpuid */
	/* Check if at least it has cpuid */
	if (c->cpuid_level == -1) {
	if (c->cpuid_level == -1) {
@@ -233,6 +236,7 @@ static void __cpuinit default_init(struct cpuinfo_x86 *c)
		else if (c->x86 == 3)
		else if (c->x86 == 3)
			strcpy(c->x86_model_id, "386");
			strcpy(c->x86_model_id, "386");
	}
	}
#endif
}
}


static struct cpu_dev __cpuinitdata default_cpu = {
static struct cpu_dev __cpuinitdata default_cpu = {
+12 −0
Original line number Original line Diff line number Diff line
@@ -223,7 +223,19 @@ static struct cpu_dev *cpu_devs[X86_VENDOR_NUM] = {};


static void __cpuinit default_init(struct cpuinfo_x86 *c)
static void __cpuinit default_init(struct cpuinfo_x86 *c)
{
{
#ifdef CONFIG_X86_64
	display_cacheinfo(c);
	display_cacheinfo(c);
#else
	/* Not much we can do here... */
	/* Check if at least it has cpuid */
	if (c->cpuid_level == -1) {
		/* No cpuid. It must be an ancient CPU */
		if (c->x86 == 4)
			strcpy(c->x86_model_id, "486");
		else if (c->x86 == 3)
			strcpy(c->x86_model_id, "386");
	}
#endif
}
}


static struct cpu_dev __cpuinitdata default_cpu = {
static struct cpu_dev __cpuinitdata default_cpu = {