aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-19 10:54:02 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-19 10:54:02 -0500
commitcf91b824bb2bdea8a47bf6bb94cf3a438683e5eb (patch)
tree2598bebb452fbdab0e53b21551e449a949738600
parentb69409279c4c960fcd1575bcf80f2a0ca414ca93 (diff)
parent89d694b9dbe769ca1004e01db0ca43964806a611 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/tglx/linux-2.6-genirq
* git://git.kernel.org/pub/scm/linux/kernel/git/tglx/linux-2.6-genirq: genirq: do not leave interupts enabled on free_irq genirq: spurious.c: use time_* macros
-rw-r--r--kernel/irq/chip.c20
-rw-r--r--kernel/irq/spurious.c3
2 files changed, 21 insertions, 2 deletions
diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c
index cc54c6276356..fdb3fbe2b0c4 100644
--- a/kernel/irq/chip.c
+++ b/kernel/irq/chip.c
@@ -246,6 +246,17 @@ static unsigned int default_startup(unsigned int irq)
246} 246}
247 247
248/* 248/*
249 * default shutdown function
250 */
251static void default_shutdown(unsigned int irq)
252{
253 struct irq_desc *desc = irq_desc + irq;
254
255 desc->chip->mask(irq);
256 desc->status |= IRQ_MASKED;
257}
258
259/*
249 * Fixup enable/disable function pointers 260 * Fixup enable/disable function pointers
250 */ 261 */
251void irq_chip_set_defaults(struct irq_chip *chip) 262void irq_chip_set_defaults(struct irq_chip *chip)
@@ -256,8 +267,15 @@ void irq_chip_set_defaults(struct irq_chip *chip)
256 chip->disable = default_disable; 267 chip->disable = default_disable;
257 if (!chip->startup) 268 if (!chip->startup)
258 chip->startup = default_startup; 269 chip->startup = default_startup;
270 /*
271 * We use chip->disable, when the user provided its own. When
272 * we have default_disable set for chip->disable, then we need
273 * to use default_shutdown, otherwise the irq line is not
274 * disabled on free_irq():
275 */
259 if (!chip->shutdown) 276 if (!chip->shutdown)
260 chip->shutdown = chip->disable; 277 chip->shutdown = chip->disable != default_disable ?
278 chip->disable : default_shutdown;
261 if (!chip->name) 279 if (!chip->name)
262 chip->name = chip->typename; 280 chip->name = chip->typename;
263 if (!chip->end) 281 if (!chip->end)
diff --git a/kernel/irq/spurious.c b/kernel/irq/spurious.c
index a6b2bc831dd0..088dabbf2d6a 100644
--- a/kernel/irq/spurious.c
+++ b/kernel/irq/spurious.c
@@ -6,6 +6,7 @@
6 * This file contains spurious interrupt handling. 6 * This file contains spurious interrupt handling.
7 */ 7 */
8 8
9#include <linux/jiffies.h>
9#include <linux/irq.h> 10#include <linux/irq.h>
10#include <linux/module.h> 11#include <linux/module.h>
11#include <linux/kallsyms.h> 12#include <linux/kallsyms.h>
@@ -179,7 +180,7 @@ void note_interrupt(unsigned int irq, struct irq_desc *desc,
179 * otherwise the couter becomes a doomsday timer for otherwise 180 * otherwise the couter becomes a doomsday timer for otherwise
180 * working systems 181 * working systems
181 */ 182 */
182 if (jiffies - desc->last_unhandled > HZ/10) 183 if (time_after(jiffies, desc->last_unhandled + HZ/10))
183 desc->irqs_unhandled = 1; 184 desc->irqs_unhandled = 1;
184 else 185 else
185 desc->irqs_unhandled++; 186 desc->irqs_unhandled++;