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
2c7f5db1
Commit
2c7f5db1
authored
Mar 23, 2003
by
Dave Jones
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] make x86 MSR driver preempt safe
parent
96e5445b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
arch/i386/kernel/msr.c
arch/i386/kernel/msr.c
+6
-1
No files found.
arch/i386/kernel/msr.c
View file @
2c7f5db1
...
@@ -115,9 +115,13 @@ static void msr_smp_rdmsr(void *cmd_block)
...
@@ -115,9 +115,13 @@ static void msr_smp_rdmsr(void *cmd_block)
static
inline
int
do_wrmsr
(
int
cpu
,
u32
reg
,
u32
eax
,
u32
edx
)
static
inline
int
do_wrmsr
(
int
cpu
,
u32
reg
,
u32
eax
,
u32
edx
)
{
{
struct
msr_command
cmd
;
struct
msr_command
cmd
;
int
ret
;
preempt_disable
();
if
(
cpu
==
smp_processor_id
()
)
{
if
(
cpu
==
smp_processor_id
()
)
{
return
wrmsr_eio
(
reg
,
eax
,
edx
);
ret
=
wrmsr_eio
(
reg
,
eax
,
edx
);
preempt_enable
();
return
ret
;
}
else
{
}
else
{
cmd
.
cpu
=
cpu
;
cmd
.
cpu
=
cpu
;
cmd
.
reg
=
reg
;
cmd
.
reg
=
reg
;
...
@@ -125,6 +129,7 @@ static inline int do_wrmsr(int cpu, u32 reg, u32 eax, u32 edx)
...
@@ -125,6 +129,7 @@ static inline int do_wrmsr(int cpu, u32 reg, u32 eax, u32 edx)
cmd
.
data
[
1
]
=
edx
;
cmd
.
data
[
1
]
=
edx
;
smp_call_function
(
msr_smp_wrmsr
,
&
cmd
,
1
,
1
);
smp_call_function
(
msr_smp_wrmsr
,
&
cmd
,
1
,
1
);
preempt_enable
();
return
cmd
.
err
;
return
cmd
.
err
;
}
}
}
}
...
...
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