summaryrefslogtreecommitdiff
path: root/kernel/up.c
diff options
context:
space:
mode:
authorDavid Daney <david.daney@cavium.com>2013-09-11 14:23:25 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2013-09-11 15:58:25 -0700
commit081192b25c2d4620b5f5838620624d3daee94b66 (patch)
tree848d5ad102ba0a0268c165811bc9dd7f13275391 /kernel/up.c
parentfa688207c9db48b64ab6538abc3fcdf26110b9ec (diff)
up.c: use local_irq_{save,restore}() in smp_call_function_single.
The SMP version of this function doesn't unconditionally enable irqs, so neither should this !SMP version. There are no know problems caused by this, but we make the change for consistency's sake. Signed-off-by: David Daney <david.daney@cavium.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/up.c')
-rw-r--r--kernel/up.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/kernel/up.c b/kernel/up.c
index 144e57255234..b1cf036255f3 100644
--- a/kernel/up.c
+++ b/kernel/up.c
@@ -10,11 +10,13 @@
int smp_call_function_single(int cpu, void (*func) (void *info), void *info,
int wait)
{
+ unsigned long flags;
+
WARN_ON(cpu != 0);
- local_irq_disable();
- (func)(info);
- local_irq_enable();
+ local_irq_save(flags);
+ func(info);
+ local_irq_restore(flags);
return 0;
}