diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2011-03-27 16:05:36 +0200 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2011-03-27 17:45:58 +0200 |
commit | b3d422329f2e061d66af4f933ef316e50e5edcac (patch) | |
tree | 530100dd1733e24a017f4b3df4959c667369d236 /kernel/irq/chip.c | |
parent | 0fdb4b259ed3e91b687ac26848202f5e7c217e62 (diff) | |
download | talos-obmc-linux-b3d422329f2e061d66af4f933ef316e50e5edcac.tar.gz talos-obmc-linux-b3d422329f2e061d66af4f933ef316e50e5edcac.zip |
genirq: Add chip flag for restricting cpu_on/offline calls
Add a flag which indicates that the on/offline callback should only be
called on enabled interrupts.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'kernel/irq/chip.c')
-rw-r--r-- | kernel/irq/chip.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c index 44b16a1ecd9a..9283d3300ea9 100644 --- a/kernel/irq/chip.c +++ b/kernel/irq/chip.c @@ -718,8 +718,9 @@ void irq_cpu_online(void) raw_spin_lock_irqsave(&desc->lock, flags); chip = irq_data_get_irq_chip(&desc->irq_data); - - if (chip && chip->irq_cpu_online) + if (chip && chip->irq_cpu_online && + (!(chip->flags & IRQCHIP_ONOFFLINE_ENABLED) || + !(desc->istate & IRQS_DISABLED))) chip->irq_cpu_online(&desc->irq_data); raw_spin_unlock_irqrestore(&desc->lock, flags); @@ -747,8 +748,9 @@ void irq_cpu_offline(void) raw_spin_lock_irqsave(&desc->lock, flags); chip = irq_data_get_irq_chip(&desc->irq_data); - - if (chip && chip->irq_cpu_offline) + if (chip && chip->irq_cpu_offline && + (!(chip->flags & IRQCHIP_ONOFFLINE_ENABLED) || + !(desc->istate & IRQS_DISABLED))) chip->irq_cpu_offline(&desc->irq_data); raw_spin_unlock_irqrestore(&desc->lock, flags); |