| From 3945dede0b0339e0e0cee7e772c4d400ece06a86 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> |
| |
| diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c |
| index b6ee643..89345ec 100644 |
| --- a/kernel/irq/manage.c |
| +++ b/kernel/irq/manage.c |
| @@ -535,6 +535,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) |
| { |
| @@ -647,6 +654,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.1.1 |
| |