Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 53933
b: refs/heads/master
c: 3aefbe0
h: refs/heads/master
i:
  53931: 0fd0401
v: v3
  • Loading branch information
Andi Kleen authored and Andi Kleen committed May 2, 2007
1 parent 08646ff commit 032357b
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 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: e859dc553c857f4672b3bbb73ee9170a901f8712
refs/heads/master: 3aefbe0746580a710d4392a884ac1e4aac7c728f
4 changes: 3 additions & 1 deletion trunk/arch/i386/kernel/cpu/intel.c
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,10 @@ static void __cpuinit init_intel(struct cpuinfo_x86 *c)
}
#endif

if (c->x86 == 15)
if (c->x86 == 15) {
set_bit(X86_FEATURE_P4, c->x86_capability);
set_bit(X86_FEATURE_SYNC_RDTSC, c->x86_capability);
}
if (c->x86 == 6)
set_bit(X86_FEATURE_P3, c->x86_capability);
if ((c->x86 == 0xf && c->x86_model >= 0x03) ||
Expand Down
1 change: 1 addition & 0 deletions trunk/include/asm-i386/cpufeature.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@
#define X86_FEATURE_PEBS (3*32+12) /* Precise-Event Based Sampling */
#define X86_FEATURE_BTS (3*32+13) /* Branch Trace Store */
#define X86_FEATURE_LAPIC_TIMER_BROKEN (3*32+ 14) /* lapic timer broken in C1 */
#define X86_FEATURE_SYNC_RDTSC (3*32+15) /* RDTSC synchronizes the CPU */

/* Intel-defined CPU features, CPUID level 0x00000001 (ecx), word 4 */
#define X86_FEATURE_XMM3 (4*32+ 0) /* Streaming SIMD Extensions-3 */
Expand Down
4 changes: 0 additions & 4 deletions trunk/include/asm-i386/tsc.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ static inline cycles_t get_cycles(void)
static __always_inline cycles_t get_cycles_sync(void)
{
unsigned long long ret;
#ifdef X86_FEATURE_SYNC_RDTSC
unsigned eax;

/*
Expand All @@ -44,9 +43,6 @@ static __always_inline cycles_t get_cycles_sync(void)
*/
alternative_io("cpuid", ASM_NOP2, X86_FEATURE_SYNC_RDTSC,
"=a" (eax), "0" (1) : "ebx","ecx","edx","memory");
#else
sync_core();
#endif
rdtscll(ret);

return ret;
Expand Down

0 comments on commit 032357b

Please sign in to comment.