Merge branch 'linus' into x86/core
[deliverable/linux.git] / arch / x86 / kernel / cpu / centaur_64.c
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 /* Cache sizes */
20 unsigned n;
21
22 n = c->extended_cpuid_level;
23 if (n >= 0x80000008) {
24 unsigned eax = cpuid_eax(0x80000008);
25 c->x86_virt_bits = (eax >> 8) & 0xff;
26 c->x86_phys_bits = eax & 0xff;
27 }
28
29 if (c->x86 == 0x6 && c->x86_model >= 0xf) {
30 c->x86_cache_alignment = c->x86_clflush_size * 2;
31 set_cpu_cap(c, X86_FEATURE_CONSTANT_TSC);
32 set_cpu_cap(c, X86_FEATURE_REP_GOOD);
33 }
34 set_cpu_cap(c, X86_FEATURE_LFENCE_RDTSC);
35 }
36
37 static struct cpu_dev centaur_cpu_dev __cpuinitdata = {
38 .c_vendor = "Centaur",
39 .c_ident = { "CentaurHauls" },
40 .c_early_init = early_init_centaur,
41 .c_init = init_centaur,
42 };
43
44 cpu_vendor_dev_register(X86_VENDOR_CENTAUR, &centaur_cpu_dev);
45
This page took 0.035582 seconds and 6 git commands to generate.