diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-11-19 13:40:00 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-11-19 13:40:00 -0500 |
commit | 4007162647b3b2e2e438904471b620aba013c4af (patch) | |
tree | 2798671e1fd62b632ccae6e03eda9c49ab95763a /kernel | |
parent | 801a76050bcf8d4e500eb8d048ff6265f37a61c8 (diff) | |
parent | 00d1a39e69d5afa7523dad515a05b21abd17c389 (diff) |
Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull irq cleanups from Ingo Molnar:
"This is a multi-arch cleanup series from Thomas Gleixner, which we
kept to near the end of the merge window, to not interfere with
architecture updates.
This series (motivated by the -rt kernel) unifies more aspects of IRQ
handling and generalizes PREEMPT_ACTIVE"
* 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
preempt: Make PREEMPT_ACTIVE generic
sparc: Use preempt_schedule_irq
ia64: Use preempt_schedule_irq
m32r: Use preempt_schedule_irq
hardirq: Make hardirq bits generic
m68k: Simplify low level interrupt handling code
genirq: Prevent spurious detection for unconditionally polled interrupts
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/irq/settings.h | 7 | ||||
-rw-r--r-- | kernel/irq/spurious.c | 12 |
2 files changed, 16 insertions, 3 deletions
diff --git a/kernel/irq/settings.h b/kernel/irq/settings.h index 1162f1030f18..3320b84cc60f 100644 --- a/kernel/irq/settings.h +++ b/kernel/irq/settings.h | |||
@@ -14,6 +14,7 @@ enum { | |||
14 | _IRQ_NO_BALANCING = IRQ_NO_BALANCING, | 14 | _IRQ_NO_BALANCING = IRQ_NO_BALANCING, |
15 | _IRQ_NESTED_THREAD = IRQ_NESTED_THREAD, | 15 | _IRQ_NESTED_THREAD = IRQ_NESTED_THREAD, |
16 | _IRQ_PER_CPU_DEVID = IRQ_PER_CPU_DEVID, | 16 | _IRQ_PER_CPU_DEVID = IRQ_PER_CPU_DEVID, |
17 | _IRQ_IS_POLLED = IRQ_IS_POLLED, | ||
17 | _IRQF_MODIFY_MASK = IRQF_MODIFY_MASK, | 18 | _IRQF_MODIFY_MASK = IRQF_MODIFY_MASK, |
18 | }; | 19 | }; |
19 | 20 | ||
@@ -26,6 +27,7 @@ enum { | |||
26 | #define IRQ_NOAUTOEN GOT_YOU_MORON | 27 | #define IRQ_NOAUTOEN GOT_YOU_MORON |
27 | #define IRQ_NESTED_THREAD GOT_YOU_MORON | 28 | #define IRQ_NESTED_THREAD GOT_YOU_MORON |
28 | #define IRQ_PER_CPU_DEVID GOT_YOU_MORON | 29 | #define IRQ_PER_CPU_DEVID GOT_YOU_MORON |
30 | #define IRQ_IS_POLLED GOT_YOU_MORON | ||
29 | #undef IRQF_MODIFY_MASK | 31 | #undef IRQF_MODIFY_MASK |
30 | #define IRQF_MODIFY_MASK GOT_YOU_MORON | 32 | #define IRQF_MODIFY_MASK GOT_YOU_MORON |
31 | 33 | ||
@@ -147,3 +149,8 @@ static inline bool irq_settings_is_nested_thread(struct irq_desc *desc) | |||
147 | { | 149 | { |
148 | return desc->status_use_accessors & _IRQ_NESTED_THREAD; | 150 | return desc->status_use_accessors & _IRQ_NESTED_THREAD; |
149 | } | 151 | } |
152 | |||
153 | static inline bool irq_settings_is_polled(struct irq_desc *desc) | ||
154 | { | ||
155 | return desc->status_use_accessors & _IRQ_IS_POLLED; | ||
156 | } | ||
diff --git a/kernel/irq/spurious.c b/kernel/irq/spurious.c index 7b5f012bde9d..a1d8cc63b56e 100644 --- a/kernel/irq/spurious.c +++ b/kernel/irq/spurious.c | |||
@@ -67,8 +67,13 @@ static int try_one_irq(int irq, struct irq_desc *desc, bool force) | |||
67 | 67 | ||
68 | raw_spin_lock(&desc->lock); | 68 | raw_spin_lock(&desc->lock); |
69 | 69 | ||
70 | /* PER_CPU and nested thread interrupts are never polled */ | 70 | /* |
71 | if (irq_settings_is_per_cpu(desc) || irq_settings_is_nested_thread(desc)) | 71 | * PER_CPU, nested thread interrupts and interrupts explicitely |
72 | * marked polled are excluded from polling. | ||
73 | */ | ||
74 | if (irq_settings_is_per_cpu(desc) || | ||
75 | irq_settings_is_nested_thread(desc) || | ||
76 | irq_settings_is_polled(desc)) | ||
72 | goto out; | 77 | goto out; |
73 | 78 | ||
74 | /* | 79 | /* |
@@ -268,7 +273,8 @@ try_misrouted_irq(unsigned int irq, struct irq_desc *desc, | |||
268 | void note_interrupt(unsigned int irq, struct irq_desc *desc, | 273 | void note_interrupt(unsigned int irq, struct irq_desc *desc, |
269 | irqreturn_t action_ret) | 274 | irqreturn_t action_ret) |
270 | { | 275 | { |
271 | if (desc->istate & IRQS_POLL_INPROGRESS) | 276 | if (desc->istate & IRQS_POLL_INPROGRESS || |
277 | irq_settings_is_polled(desc)) | ||
272 | return; | 278 | return; |
273 | 279 | ||
274 | /* we get here again via the threaded handler */ | 280 | /* we get here again via the threaded handler */ |