diff options
Diffstat (limited to 'arch/x86_64/kernel/setup.c')
-rw-r--r-- | arch/x86_64/kernel/setup.c | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/arch/x86_64/kernel/setup.c b/arch/x86_64/kernel/setup.c index f12f266f3e98..af425a8049fb 100644 --- a/arch/x86_64/kernel/setup.c +++ b/arch/x86_64/kernel/setup.c | |||
@@ -731,11 +731,8 @@ static void __cpuinit init_amd(struct cpuinfo_x86 *c) | |||
731 | /* Fix cpuid4 emulation for more */ | 731 | /* Fix cpuid4 emulation for more */ |
732 | num_cache_leaves = 3; | 732 | num_cache_leaves = 3; |
733 | 733 | ||
734 | /* When there is only one core no need to synchronize RDTSC */ | 734 | /* RDTSC can be speculated around */ |
735 | if (num_possible_cpus() == 1) | 735 | clear_bit(X86_FEATURE_SYNC_RDTSC, &c->x86_capability); |
736 | set_bit(X86_FEATURE_SYNC_RDTSC, &c->x86_capability); | ||
737 | else | ||
738 | clear_bit(X86_FEATURE_SYNC_RDTSC, &c->x86_capability); | ||
739 | } | 736 | } |
740 | 737 | ||
741 | static void __cpuinit detect_ht(struct cpuinfo_x86 *c) | 738 | static void __cpuinit detect_ht(struct cpuinfo_x86 *c) |
@@ -834,6 +831,15 @@ static void __cpuinit init_intel(struct cpuinfo_x86 *c) | |||
834 | set_bit(X86_FEATURE_ARCH_PERFMON, &c->x86_capability); | 831 | set_bit(X86_FEATURE_ARCH_PERFMON, &c->x86_capability); |
835 | } | 832 | } |
836 | 833 | ||
834 | if (cpu_has_ds) { | ||
835 | unsigned int l1, l2; | ||
836 | rdmsr(MSR_IA32_MISC_ENABLE, l1, l2); | ||
837 | if (!(l1 & (1<<11))) | ||
838 | set_bit(X86_FEATURE_BTS, c->x86_capability); | ||
839 | if (!(l1 & (1<<12))) | ||
840 | set_bit(X86_FEATURE_PEBS, c->x86_capability); | ||
841 | } | ||
842 | |||
837 | n = c->extended_cpuid_level; | 843 | n = c->extended_cpuid_level; |
838 | if (n >= 0x80000008) { | 844 | if (n >= 0x80000008) { |
839 | unsigned eax = cpuid_eax(0x80000008); | 845 | unsigned eax = cpuid_eax(0x80000008); |
@@ -853,7 +859,10 @@ static void __cpuinit init_intel(struct cpuinfo_x86 *c) | |||
853 | set_bit(X86_FEATURE_CONSTANT_TSC, &c->x86_capability); | 859 | set_bit(X86_FEATURE_CONSTANT_TSC, &c->x86_capability); |
854 | if (c->x86 == 6) | 860 | if (c->x86 == 6) |
855 | set_bit(X86_FEATURE_REP_GOOD, &c->x86_capability); | 861 | set_bit(X86_FEATURE_REP_GOOD, &c->x86_capability); |
856 | set_bit(X86_FEATURE_SYNC_RDTSC, &c->x86_capability); | 862 | if (c->x86 == 15) |
863 | set_bit(X86_FEATURE_SYNC_RDTSC, &c->x86_capability); | ||
864 | else | ||
865 | clear_bit(X86_FEATURE_SYNC_RDTSC, &c->x86_capability); | ||
857 | c->x86_max_cores = intel_num_cpu_cores(c); | 866 | c->x86_max_cores = intel_num_cpu_cores(c); |
858 | 867 | ||
859 | srat_detect_node(); | 868 | srat_detect_node(); |