diff options
Diffstat (limited to 'arch/arc/kernel/mcip.c')
-rw-r--r-- | arch/arc/kernel/mcip.c | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/arch/arc/kernel/mcip.c b/arch/arc/kernel/mcip.c index 30284e8de6ff..2fb86589054d 100644 --- a/arch/arc/kernel/mcip.c +++ b/arch/arc/kernel/mcip.c | |||
@@ -175,7 +175,6 @@ void mcip_init_early_smp(void) | |||
175 | #include <linux/irqchip.h> | 175 | #include <linux/irqchip.h> |
176 | #include <linux/of.h> | 176 | #include <linux/of.h> |
177 | #include <linux/of_irq.h> | 177 | #include <linux/of_irq.h> |
178 | #include "../../drivers/irqchip/irqchip.h" | ||
179 | 178 | ||
180 | /* | 179 | /* |
181 | * Set the DEST for @cmn_irq to @cpu_mask (1 bit per core) | 180 | * Set the DEST for @cmn_irq to @cpu_mask (1 bit per core) |
@@ -218,11 +217,28 @@ static void idu_irq_unmask(struct irq_data *data) | |||
218 | raw_spin_unlock_irqrestore(&mcip_lock, flags); | 217 | raw_spin_unlock_irqrestore(&mcip_lock, flags); |
219 | } | 218 | } |
220 | 219 | ||
220 | #ifdef CONFIG_SMP | ||
221 | static int | 221 | static int |
222 | idu_irq_set_affinity(struct irq_data *d, const struct cpumask *cpumask, bool f) | 222 | idu_irq_set_affinity(struct irq_data *data, const struct cpumask *cpumask, |
223 | bool force) | ||
223 | { | 224 | { |
225 | unsigned long flags; | ||
226 | cpumask_t online; | ||
227 | |||
228 | /* errout if no online cpu per @cpumask */ | ||
229 | if (!cpumask_and(&online, cpumask, cpu_online_mask)) | ||
230 | return -EINVAL; | ||
231 | |||
232 | raw_spin_lock_irqsave(&mcip_lock, flags); | ||
233 | |||
234 | idu_set_dest(data->hwirq, cpumask_bits(&online)[0]); | ||
235 | idu_set_mode(data->hwirq, IDU_M_TRIG_LEVEL, IDU_M_DISTRI_RR); | ||
236 | |||
237 | raw_spin_unlock_irqrestore(&mcip_lock, flags); | ||
238 | |||
224 | return IRQ_SET_MASK_OK; | 239 | return IRQ_SET_MASK_OK; |
225 | } | 240 | } |
241 | #endif | ||
226 | 242 | ||
227 | static struct irq_chip idu_irq_chip = { | 243 | static struct irq_chip idu_irq_chip = { |
228 | .name = "MCIP IDU Intc", | 244 | .name = "MCIP IDU Intc", |
@@ -330,8 +346,7 @@ idu_of_init(struct device_node *intc, struct device_node *parent) | |||
330 | if (!i) | 346 | if (!i) |
331 | idu_first_irq = irq; | 347 | idu_first_irq = irq; |
332 | 348 | ||
333 | irq_set_handler_data(irq, domain); | 349 | irq_set_chained_handler_and_data(irq, idu_cascade_isr, domain); |
334 | irq_set_chained_handler(irq, idu_cascade_isr); | ||
335 | } | 350 | } |
336 | 351 | ||
337 | __mcip_cmd(CMD_IDU_ENABLE, 0); | 352 | __mcip_cmd(CMD_IDU_ENABLE, 0); |