2008-05-23 06:57:25 +08:00
|
|
|
#include <linux/init.h>
|
|
|
|
#include <linux/smp.h>
|
|
|
|
|
|
|
|
#include <asm/cpufeature.h>
|
|
|
|
#include <asm/processor.h>
|
|
|
|
|
2008-06-20 14:18:09 +08:00
|
|
|
#include "cpu.h"
|
|
|
|
|
|
|
|
static void __cpuinit early_init_centaur(struct cpuinfo_x86 *c)
|
2008-05-23 06:57:25 +08:00
|
|
|
{
|
|
|
|
if (c->x86 == 0x6 && c->x86_model >= 0xf)
|
|
|
|
set_cpu_cap(c, X86_FEATURE_CONSTANT_TSC);
|
2008-07-11 07:22:56 +08:00
|
|
|
|
|
|
|
set_cpu_cap(c, X86_FEATURE_SYSENTER32);
|
2008-05-23 06:57:25 +08:00
|
|
|
}
|
|
|
|
|
2008-06-20 14:18:09 +08:00
|
|
|
static void __cpuinit init_centaur(struct cpuinfo_x86 *c)
|
2008-05-23 06:57:25 +08:00
|
|
|
{
|
2008-09-06 16:52:28 +08:00
|
|
|
early_init_centaur(c);
|
|
|
|
|
2008-05-23 06:57:25 +08:00
|
|
|
if (c->x86 == 0x6 && c->x86_model >= 0xf) {
|
|
|
|
c->x86_cache_alignment = c->x86_clflush_size * 2;
|
|
|
|
set_cpu_cap(c, X86_FEATURE_REP_GOOD);
|
|
|
|
}
|
|
|
|
set_cpu_cap(c, X86_FEATURE_LFENCE_RDTSC);
|
|
|
|
}
|
2008-06-20 14:18:09 +08:00
|
|
|
|
|
|
|
static struct cpu_dev centaur_cpu_dev __cpuinitdata = {
|
|
|
|
.c_vendor = "Centaur",
|
|
|
|
.c_ident = { "CentaurHauls" },
|
|
|
|
.c_early_init = early_init_centaur,
|
|
|
|
.c_init = init_centaur,
|
2008-09-05 03:09:45 +08:00
|
|
|
.c_x86_vendor = X86_VENDOR_CENTAUR,
|
2008-06-20 14:18:09 +08:00
|
|
|
};
|
|
|
|
|
2008-09-05 03:09:45 +08:00
|
|
|
cpu_dev_register(centaur_cpu_dev);
|
2008-06-20 14:18:09 +08:00
|
|
|
|