Skip to content

Commit

Permalink
genirq: Get rid of unneeded force parameter in irq_finalize_oneshot()
Browse files Browse the repository at this point in the history
The only place irq_finalize_oneshot() is called with force parameter set
is the threaded handler error exit path. But IRQTF_RUNTHREAD is dropped
at this point and irq_wake_thread() is not going to set it again,
since PF_EXITING is set for this thread already. So irq_finalize_oneshot()
will drop the threads bit in threads_oneshot anyway and hence the force
parameter is superfluous.

Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
Link: http://lkml.kernel.org/r/20120321162234.GP24806@dhcp-26-207.brq.redhat.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
  • Loading branch information
Alexander Gordeev authored and Thomas Gleixner committed Mar 29, 2012
1 parent 69592db commit f3f79e3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions kernel/irq/manage.c
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,7 @@ static int irq_wait_for_interrupt(struct irqaction *action)
* is marked MASKED.
*/
static void irq_finalize_oneshot(struct irq_desc *desc,
struct irqaction *action, bool force)
struct irqaction *action)
{
if (!(desc->istate & IRQS_ONESHOT))
return;
Expand Down Expand Up @@ -679,7 +679,7 @@ static void irq_finalize_oneshot(struct irq_desc *desc,
* we would clear the threads_oneshot bit of this thread which
* was just set.
*/
if (!force && test_bit(IRQTF_RUNTHREAD, &action->thread_flags))
if (test_bit(IRQTF_RUNTHREAD, &action->thread_flags))
goto out_unlock;

desc->threads_oneshot &= ~action->thread_mask;
Expand Down Expand Up @@ -739,7 +739,7 @@ irq_forced_thread_fn(struct irq_desc *desc, struct irqaction *action)

local_bh_disable();
ret = action->thread_fn(action->irq, action->dev_id);
irq_finalize_oneshot(desc, action, false);
irq_finalize_oneshot(desc, action);
local_bh_enable();
return ret;
}
Expand All @@ -755,7 +755,7 @@ static irqreturn_t irq_thread_fn(struct irq_desc *desc,
irqreturn_t ret;

ret = action->thread_fn(action->irq, action->dev_id);
irq_finalize_oneshot(desc, action, false);
irq_finalize_oneshot(desc, action);
return ret;
}

Expand Down Expand Up @@ -844,7 +844,7 @@ void exit_irq_thread(void)
wake_threads_waitq(desc);

/* Prevent a stale desc->threads_oneshot */
irq_finalize_oneshot(desc, action, true);
irq_finalize_oneshot(desc, action);
}

static void irq_setup_forced_threading(struct irqaction *new)
Expand Down

0 comments on commit f3f79e3

Please sign in to comment.