aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/irq
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2011-03-28 15:59:37 -0400
committerThomas Gleixner <tglx@linutronix.de>2011-03-28 19:41:22 -0400
commit0ef5ca1e1f0de71300142b8f730f26ded6a0c2f3 (patch)
treef8eb0e5e63b7d3115c27f110e59a762fd871d693 /kernel/irq
parenta6aeddd1c4e464a2150f97ca2d1c3d68cfbd9296 (diff)
genirq; Fix cleanup fallout
I missed the CONFIG_GENERIC_PENDING_IRQ dependency in the affinity related functions and the IRQ_LEVEL propagation into irq_data state. Did not pop up on my main test platforms. :( Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Tested-by: David Daney <ddaney@caviumnetworks.com>
Diffstat (limited to 'kernel/irq')
-rw-r--r--kernel/irq/chip.c2
-rw-r--r--kernel/irq/manage.c16
2 files changed, 10 insertions, 8 deletions
diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c
index 451d1e81c15c..03099d521f5e 100644
--- a/kernel/irq/chip.c
+++ b/kernel/irq/chip.c
@@ -734,6 +734,8 @@ void irq_modify_status(unsigned int irq, unsigned long clr, unsigned long set)
734 irqd_set(&desc->irq_data, IRQD_PER_CPU); 734 irqd_set(&desc->irq_data, IRQD_PER_CPU);
735 if (irq_settings_can_move_pcntxt(desc)) 735 if (irq_settings_can_move_pcntxt(desc))
736 irqd_set(&desc->irq_data, IRQD_MOVE_PCNTXT); 736 irqd_set(&desc->irq_data, IRQD_MOVE_PCNTXT);
737 if (irq_settings_is_level(desc))
738 irqd_set(&desc->irq_data, IRQD_LEVEL);
737 739
738 irqd_set(&desc->irq_data, irq_settings_get_trigger_mask(desc)); 740 irqd_set(&desc->irq_data, irq_settings_get_trigger_mask(desc));
739 741
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index 805c6a0ce780..acf540768b8f 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -112,13 +112,13 @@ void irq_set_thread_affinity(struct irq_desc *desc)
112} 112}
113 113
114#ifdef CONFIG_GENERIC_PENDING_IRQ 114#ifdef CONFIG_GENERIC_PENDING_IRQ
115static inline bool irq_can_move_pcntxt(struct irq_desc *desc) 115static inline bool irq_can_move_pcntxt(struct irq_data *data)
116{ 116{
117 return irq_settings_can_move_pcntxt(desc); 117 return irqd_can_move_in_process_context(data);
118} 118}
119static inline bool irq_move_pending(struct irq_desc *desc) 119static inline bool irq_move_pending(struct irq_data *data)
120{ 120{
121 return irqd_is_setaffinity_pending(&desc->irq_data); 121 return irqd_is_setaffinity_pending(data);
122} 122}
123static inline void 123static inline void
124irq_copy_pending(struct irq_desc *desc, const struct cpumask *mask) 124irq_copy_pending(struct irq_desc *desc, const struct cpumask *mask)
@@ -131,8 +131,8 @@ irq_get_pending(struct cpumask *mask, struct irq_desc *desc)
131 cpumask_copy(mask, desc->pending_mask); 131 cpumask_copy(mask, desc->pending_mask);
132} 132}
133#else 133#else
134static inline bool irq_can_move_pcntxt(struct irq_desc *desc) { return true; } 134static inline bool irq_can_move_pcntxt(struct irq_data *data) { return true; }
135static inline bool irq_move_pending(struct irq_desc *desc) { return false; } 135static inline bool irq_move_pending(struct irq_desc *data) { return false; }
136static inline void 136static inline void
137irq_copy_pending(struct irq_desc *desc, const struct cpumask *mask) { } 137irq_copy_pending(struct irq_desc *desc, const struct cpumask *mask) { }
138static inline void 138static inline void
@@ -148,7 +148,7 @@ int __irq_set_affinity_locked(struct irq_data *data, const struct cpumask *mask)
148 if (!chip || !chip->irq_set_affinity) 148 if (!chip || !chip->irq_set_affinity)
149 return -EINVAL; 149 return -EINVAL;
150 150
151 if (irqd_can_move_in_process_context(data)) { 151 if (irq_can_move_pcntxt(data)) {
152 ret = chip->irq_set_affinity(data, mask, false); 152 ret = chip->irq_set_affinity(data, mask, false);
153 switch (ret) { 153 switch (ret) {
154 case IRQ_SET_MASK_OK: 154 case IRQ_SET_MASK_OK:
@@ -218,7 +218,7 @@ static void irq_affinity_notify(struct work_struct *work)
218 goto out; 218 goto out;
219 219
220 raw_spin_lock_irqsave(&desc->lock, flags); 220 raw_spin_lock_irqsave(&desc->lock, flags);
221 if (irq_move_pending(desc)) 221 if (irq_move_pending(&desc->irq_data))
222 irq_get_pending(cpumask, desc); 222 irq_get_pending(cpumask, desc);
223 else 223 else
224 cpumask_copy(cpumask, desc->irq_data.affinity); 224 cpumask_copy(cpumask, desc->irq_data.affinity);