Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 80147
b: refs/heads/master
c: de42186
h: refs/heads/master
i:
  80145: be87fd7
  80143: e08f963
v: v3
  • Loading branch information
Andi Kleen authored and Ingo Molnar committed Jan 30, 2008
1 parent 8a43896 commit 06d706a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 27efeb67714608b28c0b213cceb6080749435c6b
refs/heads/master: de4218634e3df6d73a3e6cdfdf3a17fa3bc7e013
3 changes: 3 additions & 0 deletions trunk/arch/x86/kernel/cpu/amd.c
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,9 @@ static void __cpuinit init_amd(struct cpuinfo_x86 *c)
/* K6s reports MCEs but don't actually have all the MSRs */
if (c->x86 < 6)
clear_bit(X86_FEATURE_MCE, c->x86_capability);

if (cpu_has_xmm)
set_bit(X86_FEATURE_MFENCE_RDTSC, c->x86_capability);
}

static unsigned int __cpuinit amd_size_cache(struct cpuinfo_x86 * c, unsigned int size)
Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/x86/kernel/setup_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -746,8 +746,8 @@ static void __cpuinit init_amd(struct cpuinfo_x86 *c)
if (c->x86 == 0xf || c->x86 == 0x10 || c->x86 == 0x11)
set_cpu_cap(c, X86_FEATURE_K8);

/* RDTSC can be speculated around */
clear_cpu_cap(c, X86_FEATURE_SYNC_RDTSC);
/* MFENCE stops RDTSC speculation */
set_cpu_cap(c, X86_FEATURE_MFENCE_RDTSC);

/* Family 10 doesn't support C states in MWAIT so don't use it */
if (c->x86 == 0x10 && !force_mwait)
Expand Down
1 change: 1 addition & 0 deletions trunk/include/asm-x86/cpufeature.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@
/* 14 free */
#define X86_FEATURE_SYNC_RDTSC (3*32+15) /* RDTSC synchronizes the CPU */
#define X86_FEATURE_REP_GOOD (3*32+16) /* rep microcode works well on this CPU */
#define X86_FEATURE_MFENCE_RDTSC (3*32+17) /* Mfence synchronizes RDTSC */

/* Intel-defined CPU features, CPUID level 0x00000001 (ecx), word 4 */
#define X86_FEATURE_XMM3 (4*32+ 0) /* Streaming SIMD Extensions-3 */
Expand Down

0 comments on commit 06d706a

Please sign in to comment.