diff options
author | Alexander Gordeev <agordeev@redhat.com> | 2012-03-21 12:22:13 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2012-03-29 05:31:52 -0400 |
commit | 69592db298e400a7c175c4dfbe7a086c783f349d (patch) | |
tree | cd6b3b24af6996612331ebf8cd9fb749c2d19f24 /kernel | |
parent | b5174fa3a7f4f8f150bfa3b917c92608953dfa0f (diff) |
genirq: Minor readablity improvement in irq_wake_thread()
exit_irq_thread() clears IRQTF_RUNTHREAD flag and drops the thread's bit in
desc->threads_oneshot then. The bit must not be set again in between and it
does not, since irq_wake_thread() sees PF_EXITING flag first and returns.
Due to above the order or checking PF_EXITING and IRQTF_RUNTHREAD flags in
irq_wake_thread() is important. This change just makes it more visible in the
source code.
Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
Link: http://lkml.kernel.org/r/20120321162212.GO24806@dhcp-26-207.brq.redhat.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/irq/handle.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/kernel/irq/handle.c b/kernel/irq/handle.c index 6ff84e6a954c..bdb180325551 100644 --- a/kernel/irq/handle.c +++ b/kernel/irq/handle.c | |||
@@ -54,14 +54,18 @@ static void warn_no_thread(unsigned int irq, struct irqaction *action) | |||
54 | static void irq_wake_thread(struct irq_desc *desc, struct irqaction *action) | 54 | static void irq_wake_thread(struct irq_desc *desc, struct irqaction *action) |
55 | { | 55 | { |
56 | /* | 56 | /* |
57 | * Wake up the handler thread for this action. In case the | 57 | * In case the thread crashed and was killed we just pretend that |
58 | * thread crashed and was killed we just pretend that we | 58 | * we handled the interrupt. The hardirq handler has disabled the |
59 | * handled the interrupt. The hardirq handler has disabled the | 59 | * device interrupt, so no irq storm is lurking. |
60 | * device interrupt, so no irq storm is lurking. If the | 60 | */ |
61 | if (action->thread->flags & PF_EXITING) | ||
62 | return; | ||
63 | |||
64 | /* | ||
65 | * Wake up the handler thread for this action. If the | ||
61 | * RUNTHREAD bit is already set, nothing to do. | 66 | * RUNTHREAD bit is already set, nothing to do. |
62 | */ | 67 | */ |
63 | if ((action->thread->flags & PF_EXITING) || | 68 | if (test_and_set_bit(IRQTF_RUNTHREAD, &action->thread_flags)) |
64 | test_and_set_bit(IRQTF_RUNTHREAD, &action->thread_flags)) | ||
65 | return; | 69 | return; |
66 | 70 | ||
67 | /* | 71 | /* |