Skip to content

Commit

Permalink
Merge branch 'irq-core-for-linus' of git://git.kernel.org/pub/scm/lin…
Browse files Browse the repository at this point in the history
…ux/kernel/git/tip/linux-2.6-tip

* 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  xen: Do not suspend IPI IRQs.
  powerpc: Use IRQF_NO_SUSPEND not IRQF_TIMER for non-timer interrupts
  ixp4xx-beeper: Use IRQF_NO_SUSPEND not IRQF_TIMER for non-timer interrupt
  irq: Add new IRQ flag IRQF_NO_SUSPEND
  • Loading branch information
Linus Torvalds committed Aug 6, 2010
2 parents b62ad9a + 4877c73 commit 1787985
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 9 deletions.
5 changes: 3 additions & 2 deletions arch/powerpc/platforms/powermac/low_i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -542,11 +542,12 @@ static struct pmac_i2c_host_kw *__init kw_i2c_host_init(struct device_node *np)
/* Make sure IRQ is disabled */
kw_write_reg(reg_ier, 0);

/* Request chip interrupt. We set IRQF_TIMER because we don't
/* Request chip interrupt. We set IRQF_NO_SUSPEND because we don't
* want that interrupt disabled between the 2 passes of driver
* suspend or we'll have issues running the pfuncs
*/
if (request_irq(host->irq, kw_i2c_irq, IRQF_TIMER, "keywest i2c", host))
if (request_irq(host->irq, kw_i2c_irq, IRQF_NO_SUSPEND,
"keywest i2c", host))
host->irq = NO_IRQ;

printk(KERN_INFO "KeyWest i2c @0x%08x irq %d %s\n",
Expand Down
3 changes: 2 additions & 1 deletion drivers/input/misc/ixp4xx-beeper.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@ static int __devinit ixp4xx_spkr_probe(struct platform_device *dev)
input_dev->event = ixp4xx_spkr_event;

err = request_irq(IRQ_IXP4XX_TIMER2, &ixp4xx_spkr_interrupt,
IRQF_DISABLED | IRQF_TIMER, "ixp4xx-beeper", (void *) dev->id);
IRQF_DISABLED | IRQF_NO_SUSPEND, "ixp4xx-beeper",
(void *) dev->id);
if (err)
goto err_free_device;

Expand Down
9 changes: 5 additions & 4 deletions drivers/macintosh/via-pmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -400,11 +400,12 @@ static int __init via_pmu_start(void)
printk(KERN_ERR "via-pmu: can't map interrupt\n");
return -ENODEV;
}
/* We set IRQF_TIMER because we don't want the interrupt to be disabled
* between the 2 passes of driver suspend, we control our own disabling
* for that one
/* We set IRQF_NO_SUSPEND because we don't want the interrupt
* to be disabled between the 2 passes of driver suspend, we
* control our own disabling for that one
*/
if (request_irq(irq, via_pmu_interrupt, IRQF_TIMER, "VIA-PMU", (void *)0)) {
if (request_irq(irq, via_pmu_interrupt, IRQF_NO_SUSPEND,
"VIA-PMU", (void *)0)) {
printk(KERN_ERR "via-pmu: can't request irq %d\n", irq);
return -ENODEV;
}
Expand Down
1 change: 1 addition & 0 deletions drivers/xen/events.c
Original file line number Diff line number Diff line change
Expand Up @@ -550,6 +550,7 @@ int bind_ipi_to_irqhandler(enum ipi_vector ipi,
if (irq < 0)
return irq;

irqflags |= IRQF_NO_SUSPEND;
retval = request_irq(irq, handler, irqflags, devname, dev_id);
if (retval != 0) {
unbind_from_irq(irq);
Expand Down
7 changes: 6 additions & 1 deletion include/linux/interrupt.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,21 @@
* IRQF_ONESHOT - Interrupt is not reenabled after the hardirq handler finished.
* Used by threaded interrupts which need to keep the
* irq line disabled until the threaded handler has been run.
* IRQF_NO_SUSPEND - Do not disable this IRQ during suspend
*
*/
#define IRQF_DISABLED 0x00000020
#define IRQF_SAMPLE_RANDOM 0x00000040
#define IRQF_SHARED 0x00000080
#define IRQF_PROBE_SHARED 0x00000100
#define IRQF_TIMER 0x00000200
#define __IRQF_TIMER 0x00000200
#define IRQF_PERCPU 0x00000400
#define IRQF_NOBALANCING 0x00000800
#define IRQF_IRQPOLL 0x00001000
#define IRQF_ONESHOT 0x00002000
#define IRQF_NO_SUSPEND 0x00004000

#define IRQF_TIMER (__IRQF_TIMER | IRQF_NO_SUSPEND)

/*
* Bits used by threaded handlers:
Expand Down
2 changes: 1 addition & 1 deletion kernel/irq/manage.c
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ static inline int setup_affinity(unsigned int irq, struct irq_desc *desc)
void __disable_irq(struct irq_desc *desc, unsigned int irq, bool suspend)
{
if (suspend) {
if (!desc->action || (desc->action->flags & IRQF_TIMER))
if (!desc->action || (desc->action->flags & IRQF_NO_SUSPEND))
return;
desc->status |= IRQ_SUSPENDED;
}
Expand Down

0 comments on commit 1787985

Please sign in to comment.