diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2011-02-10 16:25:31 -0500 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2011-02-19 06:58:22 -0500 |
commit | e1ef824146131709d7466e37f889f2dab24ca98e (patch) | |
tree | d66f8423fce8e4d04aa509e1cbbaea2fb99a812c | |
parent | 7f94226f03299f1ca32f118f02f2a0295e0e5e93 (diff) |
genirq: Reflect IRQ_MOVE_PCNTXT in irq_data state
Required by x86.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
-rw-r--r-- | include/linux/irq.h | 8 | ||||
-rw-r--r-- | kernel/irq/chip.c | 4 |
2 files changed, 11 insertions, 1 deletions
diff --git a/include/linux/irq.h b/include/linux/irq.h index 94c8f5bb548f..c101ad4b821f 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h | |||
@@ -170,6 +170,8 @@ struct irq_data { | |||
170 | * IRQD_LEVEL - Interrupt is level triggered | 170 | * IRQD_LEVEL - Interrupt is level triggered |
171 | * IRQD_WAKEUP_STATE - Interrupt is configured for wakeup | 171 | * IRQD_WAKEUP_STATE - Interrupt is configured for wakeup |
172 | * from suspend | 172 | * from suspend |
173 | * IRDQ_MOVE_PCNTXT - Interrupt can be moved in process | ||
174 | * context | ||
173 | */ | 175 | */ |
174 | enum { | 176 | enum { |
175 | IRQD_TRIGGER_MASK = 0xf, | 177 | IRQD_TRIGGER_MASK = 0xf, |
@@ -179,6 +181,7 @@ enum { | |||
179 | IRQD_AFFINITY_SET = (1 << 12), | 181 | IRQD_AFFINITY_SET = (1 << 12), |
180 | IRQD_LEVEL = (1 << 13), | 182 | IRQD_LEVEL = (1 << 13), |
181 | IRQD_WAKEUP_STATE = (1 << 14), | 183 | IRQD_WAKEUP_STATE = (1 << 14), |
184 | IRQD_MOVE_PCNTXT = (1 << 15), | ||
182 | }; | 185 | }; |
183 | 186 | ||
184 | static inline bool irqd_is_setaffinity_pending(struct irq_data *d) | 187 | static inline bool irqd_is_setaffinity_pending(struct irq_data *d) |
@@ -225,6 +228,11 @@ static inline bool irqd_is_wakeup_set(struct irq_data *d) | |||
225 | return d->state_use_accessors & IRQD_WAKEUP_STATE; | 228 | return d->state_use_accessors & IRQD_WAKEUP_STATE; |
226 | } | 229 | } |
227 | 230 | ||
231 | static inline bool irqd_can_move_in_process_context(struct irq_data *d) | ||
232 | { | ||
233 | return d->state_use_accessors & IRQD_MOVE_PCNTXT; | ||
234 | } | ||
235 | |||
228 | /** | 236 | /** |
229 | * struct irq_chip - hardware interrupt chip descriptor | 237 | * struct irq_chip - hardware interrupt chip descriptor |
230 | * | 238 | * |
diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c index 4687457fe7f0..2b0f9192a830 100644 --- a/kernel/irq/chip.c +++ b/kernel/irq/chip.c | |||
@@ -712,11 +712,13 @@ void irq_modify_status(unsigned int irq, unsigned long clr, unsigned long set) | |||
712 | irq_settings_clr_and_set(desc, clr, set); | 712 | irq_settings_clr_and_set(desc, clr, set); |
713 | 713 | ||
714 | irqd_clear(&desc->irq_data, IRQD_NO_BALANCING | IRQD_PER_CPU | | 714 | irqd_clear(&desc->irq_data, IRQD_NO_BALANCING | IRQD_PER_CPU | |
715 | IRQD_TRIGGER_MASK | IRQD_LEVEL); | 715 | IRQD_TRIGGER_MASK | IRQD_LEVEL | IRQD_MOVE_PCNTXT); |
716 | if (irq_settings_has_no_balance_set(desc)) | 716 | if (irq_settings_has_no_balance_set(desc)) |
717 | irqd_set(&desc->irq_data, IRQD_NO_BALANCING); | 717 | irqd_set(&desc->irq_data, IRQD_NO_BALANCING); |
718 | if (irq_settings_is_per_cpu(desc)) | 718 | if (irq_settings_is_per_cpu(desc)) |
719 | irqd_set(&desc->irq_data, IRQD_PER_CPU); | 719 | irqd_set(&desc->irq_data, IRQD_PER_CPU); |
720 | if (irq_settings_can_move_pcntxt(desc)) | ||
721 | irqd_set(&desc->irq_data, IRQD_MOVE_PCNTXT); | ||
720 | 722 | ||
721 | irqd_set(&desc->irq_data, irq_settings_get_trigger_mask(desc)); | 723 | irqd_set(&desc->irq_data, irq_settings_get_trigger_mask(desc)); |
722 | 724 | ||