diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2011-02-08 11:11:03 -0500 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2011-02-19 06:58:20 -0500 |
commit | a005677b3dd05decdd8880cf3044ae709856f58f (patch) | |
tree | 529d1454940fe8c6723bd54f01e009d9be2ab840 /kernel/irq/chip.c | |
parent | 1ce6068dac1924f7095be5850481e790cbf1b3c1 (diff) |
genirq: Mirror IRQ_PER_CPU and IRQ_NO_BALANCING in irq_data.state
That's the right data structure to look at for arch code.
Accessor functions are provided.
irqd_is_per_cpu(irqdata);
irqd_can_balance(irqdata);
Coders who access them directly will be tracked down and slapped with
stinking trouts.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'kernel/irq/chip.c')
-rw-r--r-- | kernel/irq/chip.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c index 73b2e7e00934..b8aa3dfe8301 100644 --- a/kernel/irq/chip.c +++ b/kernel/irq/chip.c | |||
@@ -706,12 +706,15 @@ void irq_modify_status(unsigned int irq, unsigned long clr, unsigned long set) | |||
706 | if (!desc) | 706 | if (!desc) |
707 | return; | 707 | return; |
708 | 708 | ||
709 | /* Sanitize flags */ | ||
710 | set &= IRQF_MODIFY_MASK; | ||
711 | clr &= IRQF_MODIFY_MASK; | ||
712 | |||
713 | raw_spin_lock_irqsave(&desc->lock, flags); | 709 | raw_spin_lock_irqsave(&desc->lock, flags); |
714 | desc->status &= ~clr; | 710 | |
715 | desc->status |= set; | 711 | irq_settings_clr_and_set(desc, clr, set); |
712 | |||
713 | irqd_clear(&desc->irq_data, IRQD_NO_BALANCING | IRQD_PER_CPU); | ||
714 | if (irq_settings_has_no_balance_set(desc)) | ||
715 | irqd_set(&desc->irq_data, IRQD_NO_BALANCING); | ||
716 | if (irq_settings_is_per_cpu(desc)) | ||
717 | irqd_set(&desc->irq_data, IRQD_PER_CPU); | ||
718 | |||
716 | raw_spin_unlock_irqrestore(&desc->lock, flags); | 719 | raw_spin_unlock_irqrestore(&desc->lock, flags); |
717 | } | 720 | } |