Skip to content

Commit

Permalink
irq: Don't re-enable interrupts at the end of irq_exit
Browse files Browse the repository at this point in the history
Commit 74eed01
"irq: Ensure irq_exit() code runs with interrupts disabled"
restore interrupts flags in the end of irq_exit() for archs
that don't define __ARCH_IRQ_EXIT_IRQS_DISABLED.

However always returning from irq_exit() with interrupts
disabled should not be a problem for these archs. Prior to
this commit this was already happening anytime we processed
pending softirqs anyway.

Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
  • Loading branch information
Frederic Weisbecker committed Feb 28, 2013
1 parent 4d4c4e2 commit 4cd5d11
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions kernel/softirq.c
Original file line number Diff line number Diff line change
Expand Up @@ -334,9 +334,7 @@ static inline void invoke_softirq(void)
void irq_exit(void)
{
#ifndef __ARCH_IRQ_EXIT_IRQS_DISABLED
unsigned long flags;

local_irq_save(flags);
local_irq_disable();
#else
WARN_ON_ONCE(!irqs_disabled());
#endif
Expand All @@ -353,9 +351,6 @@ void irq_exit(void)
tick_nohz_irq_exit();
#endif
rcu_irq_exit();
#ifndef __ARCH_IRQ_EXIT_IRQS_DISABLED
local_irq_restore(flags);
#endif
}

/*
Expand Down

0 comments on commit 4cd5d11

Please sign in to comment.