aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/cpu
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kernel/cpu')
-rw-r--r--arch/x86/kernel/cpu/Makefile1
-rw-r--r--arch/x86/kernel/cpu/centaur_64.c31
2 files changed, 32 insertions, 0 deletions
diff --git a/arch/x86/kernel/cpu/Makefile b/arch/x86/kernel/cpu/Makefile
index b7a11924fed7..c77a1c50d944 100644
--- a/arch/x86/kernel/cpu/Makefile
+++ b/arch/x86/kernel/cpu/Makefile
@@ -10,6 +10,7 @@ obj-$(CONFIG_X86_32) += amd.o
10obj-$(CONFIG_X86_64) += amd_64.o 10obj-$(CONFIG_X86_64) += amd_64.o
11obj-$(CONFIG_X86_32) += cyrix.o 11obj-$(CONFIG_X86_32) += cyrix.o
12obj-$(CONFIG_X86_32) += centaur.o 12obj-$(CONFIG_X86_32) += centaur.o
13obj-$(CONFIG_X86_64) += centaur_64.o
13obj-$(CONFIG_X86_32) += transmeta.o 14obj-$(CONFIG_X86_32) += transmeta.o
14obj-$(CONFIG_X86_32) += intel.o 15obj-$(CONFIG_X86_32) += intel.o
15obj-$(CONFIG_X86_64) += intel_64.o 16obj-$(CONFIG_X86_64) += intel_64.o
diff --git a/arch/x86/kernel/cpu/centaur_64.c b/arch/x86/kernel/cpu/centaur_64.c
new file mode 100644
index 000000000000..bac96d187d05
--- /dev/null
+++ b/arch/x86/kernel/cpu/centaur_64.c
@@ -0,0 +1,31 @@
1#include <linux/init.h>
2#include <linux/smp.h>
3
4#include <asm/cpufeature.h>
5#include <asm/processor.h>
6
7void __cpuinit early_init_centaur(struct cpuinfo_x86 *c)
8{
9 if (c->x86 == 0x6 && c->x86_model >= 0xf)
10 set_cpu_cap(c, X86_FEATURE_CONSTANT_TSC);
11}
12
13void __cpuinit init_centaur(struct cpuinfo_x86 *c)
14{
15 /* Cache sizes */
16 unsigned n;
17
18 n = c->extended_cpuid_level;
19 if (n >= 0x80000008) {
20 unsigned eax = cpuid_eax(0x80000008);
21 c->x86_virt_bits = (eax >> 8) & 0xff;
22 c->x86_phys_bits = eax & 0xff;
23 }
24
25 if (c->x86 == 0x6 && c->x86_model >= 0xf) {
26 c->x86_cache_alignment = c->x86_clflush_size * 2;
27 set_cpu_cap(c, X86_FEATURE_CONSTANT_TSC);
28 set_cpu_cap(c, X86_FEATURE_REP_GOOD);
29 }
30 set_cpu_cap(c, X86_FEATURE_LFENCE_RDTSC);
31}