summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2007-06-02 15:36:37 +0100
committerRussell King <rmk+kernel@arm.linux.org.uk>2007-06-02 21:31:49 +0100
commitf72267c30f5a08f9a77c97417ec120e6943195f8 (patch)
tree72516867e90329c97bb549d7cc26f06ef01b03e6 /arch
parent29c349d22ccda5678a7dfb732093dbd3befcefa3 (diff)
[ARM] Solve buggy smp_processor_id() usage
BUG: using smp_processor_id() in preemptible [00000001] code: opcontrol/427 Resolve this bug by ensuring that we're not using smp_processor_id() in a preemptable context (by disabling preemption.) Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/oprofile/op_model_mpcore.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/arm/oprofile/op_model_mpcore.c b/arch/arm/oprofile/op_model_mpcore.c
index 7791da791f5f..75bae067922d 100644
--- a/arch/arm/oprofile/op_model_mpcore.c
+++ b/arch/arm/oprofile/op_model_mpcore.c
@@ -200,8 +200,10 @@ static int em_call_function(int (*fn)(void))
data.fn = fn;
data.ret = 0;
+ preempt_disable();
smp_call_function(em_func, &data, 1, 1);
em_func(&data);
+ preempt_enable();
return data.ret;
}