Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
3aefbe07
Commit
3aefbe07
authored
May 02, 2007
by
Andi Kleen
Committed by
Andi Kleen
May 02, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] i386: Implement X86_FEATURE_SYNC_RDTSC on i386
Syncs up with x86-64. Signed-off-by:
Andi Kleen
<
ak@suse.de
>
parent
e859dc55
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
5 deletions
+4
-5
arch/i386/kernel/cpu/intel.c
arch/i386/kernel/cpu/intel.c
+3
-1
include/asm-i386/cpufeature.h
include/asm-i386/cpufeature.h
+1
-0
include/asm-i386/tsc.h
include/asm-i386/tsc.h
+0
-4
No files found.
arch/i386/kernel/cpu/intel.c
View file @
3aefbe07
...
...
@@ -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
)
||
...
...
include/asm-i386/cpufeature.h
View file @
3aefbe07
...
...
@@ -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 */
...
...
include/asm-i386/tsc.h
View file @
3aefbe07
...
...
@@ -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
;
/*
...
...
@@ -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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment