Skip to content

Commit

Permalink
x86: move transmeta cap read to early_init_transmeta()
Browse files Browse the repository at this point in the history
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Yinghai Lu authored and Ingo Molnar committed Sep 14, 2008
1 parent aef93c8 commit afae865
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 21 deletions.
8 changes: 0 additions & 8 deletions arch/x86/kernel/cpu/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -465,14 +465,6 @@ static void __cpuinit get_cpu_cap(struct cpuinfo_x86 *c)
}

#ifdef CONFIG_X86_64
/* Transmeta-defined flags: level 0x80860001 */
xlvl = cpuid_eax(0x80860000);
if ((xlvl & 0xffff0000) == 0x80860000) {
/* Don't set x86_cpuid_level here for now to not confuse. */
if (xlvl >= 0x80860001)
c->x86_capability[2] = cpuid_edx(0x80860001);
}

if (c->extended_cpuid_level >= 0x80000008) {
u32 eax = cpuid_eax(0x80000008);

Expand Down
28 changes: 15 additions & 13 deletions arch/x86/kernel/cpu/transmeta.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,27 @@
#include <asm/msr.h>
#include "cpu.h"

static void __cpuinit early_init_transmeta(struct cpuinfo_x86 *c)
{
u32 xlvl;

/* Transmeta-defined flags: level 0x80860001 */
xlvl = cpuid_eax(0x80860000);
if ((xlvl & 0xffff0000) == 0x80860000) {
if (xlvl >= 0x80860001)
c->x86_capability[2] = cpuid_edx(0x80860001);
}
}

static void __cpuinit init_transmeta(struct cpuinfo_x86 *c)
{
unsigned int cap_mask, uk, max, dummy;
unsigned int cms_rev1, cms_rev2;
unsigned int cpu_rev, cpu_freq = 0, cpu_flags, new_cpu_rev;
char cpu_info[65];

early_init_transmeta(c);

display_cacheinfo(c);

/* Print CMS and CPU revision */
Expand Down Expand Up @@ -84,23 +98,11 @@ static void __cpuinit init_transmeta(struct cpuinfo_x86 *c)
#endif
}

static void __cpuinit transmeta_identify(struct cpuinfo_x86 *c)
{
u32 xlvl;

/* Transmeta-defined flags: level 0x80860001 */
xlvl = cpuid_eax(0x80860000);
if ((xlvl & 0xffff0000) == 0x80860000) {
if (xlvl >= 0x80860001)
c->x86_capability[2] = cpuid_edx(0x80860001);
}
}

static struct cpu_dev transmeta_cpu_dev __cpuinitdata = {
.c_vendor = "Transmeta",
.c_ident = { "GenuineTMx86", "TransmetaCPU" },
.c_early_init = early_init_transmeta,
.c_init = init_transmeta,
.c_identify = transmeta_identify,
.c_x86_vendor = X86_VENDOR_TRANSMETA,
};

Expand Down

0 comments on commit afae865

Please sign in to comment.