diff options
author | Frederic Weisbecker <fweisbec@gmail.com> | 2013-02-21 18:05:07 -0500 |
---|---|---|
committer | Frederic Weisbecker <fweisbec@gmail.com> | 2013-02-21 18:05:07 -0500 |
commit | 4d4c4e24cf48400a24d33feffc7cca4f4e8cabe1 (patch) | |
tree | b1d4862302c3cc56a10bed9605c9e9b0379a234b /kernel | |
parent | af7bdbafe3812af406ce07631effd2b96aae2dba (diff) |
irq: Remove IRQ_EXIT_OFFSET workaround
The IRQ_EXIT_OFFSET trick was used to make sure the irq
doesn't get preempted after we substract the HARDIRQ_OFFSET
until we are entirely done with any code in irq_exit().
This workaround was necessary because some archs may call
irq_exit() with irqs enabled and there is still some code
in the end of this function that is not covered by the
HARDIRQ_OFFSET but want to stay non-preemptible.
Now that irq are always disabled in irq_exit(), the whole code
is guaranteed not to be preempted. We can thus remove this hack.
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>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/softirq.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/kernel/softirq.c b/kernel/softirq.c index 24a921bcf04f..f42ff97e1f8f 100644 --- a/kernel/softirq.c +++ b/kernel/softirq.c | |||
@@ -343,7 +343,7 @@ void irq_exit(void) | |||
343 | 343 | ||
344 | account_irq_exit_time(current); | 344 | account_irq_exit_time(current); |
345 | trace_hardirq_exit(); | 345 | trace_hardirq_exit(); |
346 | sub_preempt_count(IRQ_EXIT_OFFSET); | 346 | sub_preempt_count(HARDIRQ_OFFSET); |
347 | if (!in_interrupt() && local_softirq_pending()) | 347 | if (!in_interrupt() && local_softirq_pending()) |
348 | invoke_softirq(); | 348 | invoke_softirq(); |
349 | 349 | ||
@@ -353,7 +353,6 @@ void irq_exit(void) | |||
353 | tick_nohz_irq_exit(); | 353 | tick_nohz_irq_exit(); |
354 | #endif | 354 | #endif |
355 | rcu_irq_exit(); | 355 | rcu_irq_exit(); |
356 | sched_preempt_enable_no_resched(); | ||
357 | #ifndef __ARCH_IRQ_EXIT_IRQS_DISABLED | 356 | #ifndef __ARCH_IRQ_EXIT_IRQS_DISABLED |
358 | local_irq_restore(flags); | 357 | local_irq_restore(flags); |
359 | #endif | 358 | #endif |