diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2011-02-07 04:34:30 -0500 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2011-02-19 06:58:09 -0500 |
commit | fe200ae48ef5c79bf7941fe8046ff9505c570ff6 (patch) | |
tree | 767d2cf011437a266a655ce2ec39360cb85f7f28 /kernel/irq/internals.h | |
parent | d05c65fff0ef672be75429266751f0e015b54d94 (diff) |
genirq: Mark polled irqs and defer the real handler
With the chip.end() function gone we might run into a situation where
a poll call runs and the real interrupt comes in, sees IRQ_INPROGRESS
and disables the line. That might be a perfect working one, which will
then be masked forever.
So mark them polled while the poll runs. When the real handler sees
IRQ_INPROGRESS it checks the poll flag and waits for the polling to
complete. Add the necessary amount of sanity checks to it to avoid
deadlocks.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'kernel/irq/internals.h')
-rw-r--r-- | kernel/irq/internals.h | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/kernel/irq/internals.h b/kernel/irq/internals.h index b5bfa24aa6a6..0eff7e92b1a9 100644 --- a/kernel/irq/internals.h +++ b/kernel/irq/internals.h | |||
@@ -28,6 +28,7 @@ extern void init_kstat_irqs(struct irq_desc *desc, int node, int nr); | |||
28 | 28 | ||
29 | /* Resending of interrupts :*/ | 29 | /* Resending of interrupts :*/ |
30 | void check_irq_resend(struct irq_desc *desc, unsigned int irq); | 30 | void check_irq_resend(struct irq_desc *desc, unsigned int irq); |
31 | bool irq_wait_for_poll(struct irq_desc *desc); | ||
31 | 32 | ||
32 | #ifdef CONFIG_PROC_FS | 33 | #ifdef CONFIG_PROC_FS |
33 | extern void register_irq_proc(unsigned int irq, struct irq_desc *desc); | 34 | extern void register_irq_proc(unsigned int irq, struct irq_desc *desc); |
@@ -47,16 +48,6 @@ extern int irq_select_affinity_usr(unsigned int irq, struct cpumask *mask); | |||
47 | 48 | ||
48 | extern void irq_set_thread_affinity(struct irq_desc *desc); | 49 | extern void irq_set_thread_affinity(struct irq_desc *desc); |
49 | 50 | ||
50 | #ifndef CONFIG_GENERIC_HARDIRQS_NO_DEPRECATED | ||
51 | static inline void irq_end(unsigned int irq, struct irq_desc *desc) | ||
52 | { | ||
53 | if (desc->irq_data.chip && desc->irq_data.chip->end) | ||
54 | desc->irq_data.chip->end(irq); | ||
55 | } | ||
56 | #else | ||
57 | static inline void irq_end(unsigned int irq, struct irq_desc *desc) { } | ||
58 | #endif | ||
59 | |||
60 | /* Inline functions for support of irq chips on slow busses */ | 51 | /* Inline functions for support of irq chips on slow busses */ |
61 | static inline void chip_bus_lock(struct irq_desc *desc) | 52 | static inline void chip_bus_lock(struct irq_desc *desc) |
62 | { | 53 | { |