summaryrefslogtreecommitdiffstats
path: root/arch/x86/lib
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2008-08-27 19:17:07 -0700
committerH. Peter Anvin <hpa@zytor.com>2008-08-27 19:17:07 -0700
commitb30a72a7edfc64c8929104d5c2178aca489aa559 (patch)
tree2b26c155c318d08d946bd2d70cf815dcdb29a243 /arch/x86/lib
parentf1c5d30e1d79bbfb60eaf189db862d3cb2bcac92 (diff)
parentc1b362e3b4d331a63915b268a33207311a439d60 (diff)
downloadop-kernel-dev-b30a72a7edfc64c8929104d5c2178aca489aa559.zip
op-kernel-dev-b30a72a7edfc64c8929104d5c2178aca489aa559.tar.gz
Merge branch 'x86/urgent' into x86/cpu
Conflicts: arch/x86/kernel/cpu/cyrix.c
Diffstat (limited to 'arch/x86/lib')
-rw-r--r--arch/x86/lib/msr-on-cpu.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/arch/x86/lib/msr-on-cpu.c b/arch/x86/lib/msr-on-cpu.c
index d5a2b39..01b868b 100644
--- a/arch/x86/lib/msr-on-cpu.c
+++ b/arch/x86/lib/msr-on-cpu.c
@@ -30,10 +30,11 @@ static int _rdmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 *l, u32 *h, int safe)
rv.msr_no = msr_no;
if (safe) {
- smp_call_function_single(cpu, __rdmsr_safe_on_cpu, &rv, 1);
- err = rv.err;
+ err = smp_call_function_single(cpu, __rdmsr_safe_on_cpu,
+ &rv, 1);
+ err = err ? err : rv.err;
} else {
- smp_call_function_single(cpu, __rdmsr_on_cpu, &rv, 1);
+ err = smp_call_function_single(cpu, __rdmsr_on_cpu, &rv, 1);
}
*l = rv.l;
*h = rv.h;
@@ -64,23 +65,24 @@ static int _wrmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h, int safe)
rv.l = l;
rv.h = h;
if (safe) {
- smp_call_function_single(cpu, __wrmsr_safe_on_cpu, &rv, 1);
- err = rv.err;
+ err = smp_call_function_single(cpu, __wrmsr_safe_on_cpu,
+ &rv, 1);
+ err = err ? err : rv.err;
} else {
- smp_call_function_single(cpu, __wrmsr_on_cpu, &rv, 1);
+ err = smp_call_function_single(cpu, __wrmsr_on_cpu, &rv, 1);
}
return err;
}
-void wrmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h)
+int wrmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h)
{
- _wrmsr_on_cpu(cpu, msr_no, l, h, 0);
+ return _wrmsr_on_cpu(cpu, msr_no, l, h, 0);
}
-void rdmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 *l, u32 *h)
+int rdmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 *l, u32 *h)
{
- _rdmsr_on_cpu(cpu, msr_no, l, h, 0);
+ return _rdmsr_on_cpu(cpu, msr_no, l, h, 0);
}
/* These "safe" variants are slower and should be used when the target MSR
OpenPOWER on IntegriCloud