Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 156228
b: refs/heads/master
c: bab9a3d
h: refs/heads/master
v: v3
  • Loading branch information
Borislav Petkov authored and H. Peter Anvin committed Aug 3, 2009
1 parent 22f7177 commit 96a601c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 17 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: d2ba8b211bb8abc29aa627dbd4dce08cfbc8082b
refs/heads/master: bab9a3da93bfe09c609407dedae5708b07a7ac56
26 changes: 10 additions & 16 deletions trunk/arch/x86/lib/msr.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,16 +89,13 @@ void rdmsr_on_cpus(const cpumask_t *mask, u32 msr_no, struct msr *msrs)
rv.msrs = msrs;
rv.msr_no = msr_no;

preempt_disable();
/*
* FIXME: handle the CPU we're executing on separately for now until
* smp_call_function_many has been fixed to not skip it.
*/
this_cpu = raw_smp_processor_id();
smp_call_function_single(this_cpu, __rdmsr_on_cpu, &rv, 1);
this_cpu = get_cpu();

if (cpumask_test_cpu(this_cpu, mask))
__rdmsr_on_cpu(&rv);

smp_call_function_many(mask, __rdmsr_on_cpu, &rv, 1);
preempt_enable();
put_cpu();
}
EXPORT_SYMBOL(rdmsr_on_cpus);

Expand All @@ -121,16 +118,13 @@ void wrmsr_on_cpus(const cpumask_t *mask, u32 msr_no, struct msr *msrs)
rv.msrs = msrs;
rv.msr_no = msr_no;

preempt_disable();
/*
* FIXME: handle the CPU we're executing on separately for now until
* smp_call_function_many has been fixed to not skip it.
*/
this_cpu = raw_smp_processor_id();
smp_call_function_single(this_cpu, __wrmsr_on_cpu, &rv, 1);
this_cpu = get_cpu();

if (cpumask_test_cpu(this_cpu, mask))
__wrmsr_on_cpu(&rv);

smp_call_function_many(mask, __wrmsr_on_cpu, &rv, 1);
preempt_enable();
put_cpu();
}
EXPORT_SYMBOL(wrmsr_on_cpus);

Expand Down

0 comments on commit 96a601c

Please sign in to comment.