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
nexedi
linux
Commits
8e94d032
Commit
8e94d032
authored
Jul 15, 2003
by
Dave Jones
Committed by
Dave Jones
Jul 15, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[CPUFREQ] Move rdmsrl/wrmsrl to include/asm-i386/msr.h
parent
42806f84
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
23 deletions
+17
-23
arch/i386/kernel/cpu/cpufreq/powernow-k7.c
arch/i386/kernel/cpu/cpufreq/powernow-k7.c
+0
-21
include/asm-i386/msr.h
include/asm-i386/msr.h
+17
-2
No files found.
arch/i386/kernel/cpu/cpufreq/powernow-k7.c
View file @
8e94d032
...
...
@@ -84,27 +84,6 @@ static unsigned int latency;
static
char
have_a0
;
#ifndef rdmsrl
#define rdmsrl(msr,val) do {unsigned long l__,h__; \
rdmsr (msr, l__, h__); \
val = l__; \
val |= ((u64)h__<<32); \
} while(0)
#endif
#ifndef wrmsrl
static
void
wrmsrl
(
u32
msr
,
u64
val
)
{
u32
lo
,
hi
;
lo
=
(
u32
)
val
;
hi
=
val
>>
32
;
wrmsr
(
msr
,
lo
,
hi
);
}
#endif
static
int
check_powernow
(
void
)
{
struct
cpuinfo_x86
*
c
=
cpu_data
;
...
...
include/asm-i386/msr.h
View file @
8e94d032
...
...
@@ -8,15 +8,30 @@
*/
#define rdmsr(msr,val1,val2) \
__asm__ __volatile__("rdmsr" \
__asm__ __volatile__("rdmsr" \
: "=a" (val1), "=d" (val2) \
: "c" (msr))
#define wrmsr(msr,val1,val2) \
__asm__ __volatile__("wrmsr" \
__asm__ __volatile__("wrmsr" \
:
/* no outputs */
\
: "c" (msr), "a" (val1), "d" (val2))
#define rdmsrl(msr,val) do {unsigned long l__,h__; \
rdmsr (msr, l__, h__); \
val = l__; \
val |= ((u64)h__<<32); \
} while(0)
static
void
wrmsrl
(
u32
msr
,
u64
val
)
{
u32
lo
,
hi
;
lo
=
(
u32
)
val
;
hi
=
val
>>
32
;
wrmsr
(
msr
,
lo
,
hi
);
}
#define rdtsc(low,high) \
__asm__ __volatile__("rdtsc" : "=a" (low), "=d" (high))
...
...
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