Skip to content

Commit

Permalink
up.c: use local_irq_{save,restore}() in smp_call_function_single.
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
daviddaney authored and torvalds committed Sep 11, 2013
1 parent fa68820 commit 081192b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions kernel/up.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 081192b

Please sign in to comment.