| From 95c6a403c768aa2de401266506c95b57aea9230e Mon Sep 17 00:00:00 2001 |
| From: Thomas Gleixner <tglx@linutronix.de> |
| Date: Wed, 12 Aug 2009 18:32:08 +0200 |
| Subject: [PATCH] genirq: Cleanup forced threading bits when handler thread terminates |
| |
| commit b46fe5710dee18042a0f333e3709cd7af79acd97 in tip. |
| |
| When a handler thread terminates then the forced_thread_active bit |
| might be still set. Cleanup and unmask the interrupt if this is the |
| last thread which blocked the unmask. |
| |
| Signed-off-by: Thomas Gleixner <tglx@linutronix.de> |
| Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> |
| --- |
| kernel/irq/manage.c | 9 +++++++++ |
| 1 files changed, 9 insertions(+), 0 deletions(-) |
| |
| diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c |
| index 8fb33fe..c6e4830 100644 |
| --- a/kernel/irq/manage.c |
| +++ b/kernel/irq/manage.c |
| @@ -539,6 +539,13 @@ again: |
| return 0; |
| } |
| |
| +static inline void |
| +preempt_hardirq_cleanup(struct irq_desc *desc, struct irqaction *action) |
| +{ |
| + clear_bit(IRQTF_RUNTHREAD, &action->thread_flags); |
| + preempt_hardirq_thread_done(desc, action); |
| +} |
| + |
| static int |
| irq_wait_for_interrupt(struct irq_desc *desc, struct irqaction *action) |
| { |
| @@ -669,6 +676,8 @@ static int irq_thread(void *data) |
| wake_up(&desc->wait_for_threads); |
| } |
| |
| + preempt_hardirq_cleanup(desc, action); |
| + |
| /* |
| * Clear irqaction. Otherwise exit_irq_thread() would make |
| * fuzz about an active irq thread going into nirvana. |
| -- |
| 1.7.0.4 |
| |