diff options
Diffstat (limited to 'arch/x86/kernel/cpu/centaur_64.c')
-rw-r--r-- | arch/x86/kernel/cpu/centaur_64.c | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/arch/x86/kernel/cpu/centaur_64.c b/arch/x86/kernel/cpu/centaur_64.c new file mode 100644 index 000000000000..1d181c40e2e1 --- /dev/null +++ b/arch/x86/kernel/cpu/centaur_64.c | |||
@@ -0,0 +1,35 @@ | |||
1 | #include <linux/init.h> | ||
2 | #include <linux/smp.h> | ||
3 | |||
4 | #include <asm/cpufeature.h> | ||
5 | #include <asm/processor.h> | ||
6 | |||
7 | #include "cpu.h" | ||
8 | |||
9 | static void __cpuinit early_init_centaur(struct cpuinfo_x86 *c) | ||
10 | { | ||
11 | if (c->x86 == 0x6 && c->x86_model >= 0xf) | ||
12 | set_cpu_cap(c, X86_FEATURE_CONSTANT_TSC); | ||
13 | |||
14 | set_cpu_cap(c, X86_FEATURE_SYSENTER32); | ||
15 | } | ||
16 | |||
17 | static void __cpuinit init_centaur(struct cpuinfo_x86 *c) | ||
18 | { | ||
19 | if (c->x86 == 0x6 && c->x86_model >= 0xf) { | ||
20 | c->x86_cache_alignment = c->x86_clflush_size * 2; | ||
21 | set_cpu_cap(c, X86_FEATURE_CONSTANT_TSC); | ||
22 | set_cpu_cap(c, X86_FEATURE_REP_GOOD); | ||
23 | } | ||
24 | set_cpu_cap(c, X86_FEATURE_LFENCE_RDTSC); | ||
25 | } | ||
26 | |||
27 | static struct cpu_dev centaur_cpu_dev __cpuinitdata = { | ||
28 | .c_vendor = "Centaur", | ||
29 | .c_ident = { "CentaurHauls" }, | ||
30 | .c_early_init = early_init_centaur, | ||
31 | .c_init = init_centaur, | ||
32 | }; | ||
33 | |||
34 | cpu_vendor_dev_register(X86_VENDOR_CENTAUR, ¢aur_cpu_dev); | ||
35 | |||