Commit 83ce3e6f authored by Vineet Gupta's avatar Vineet Gupta

ARCv2: intc: IDU: support irq affinity

With this nsim standlone / OSCI have working irq affinity - AXS103 still
needs some work as IDU is not visible in intc hierarchy yet !
Signed-off-by: default avatarVineet Gupta <vgupta@synopsys.com>
parent bccea41e
...@@ -218,11 +218,28 @@ static void idu_irq_unmask(struct irq_data *data) ...@@ -218,11 +218,28 @@ static void idu_irq_unmask(struct irq_data *data)
raw_spin_unlock_irqrestore(&mcip_lock, flags); raw_spin_unlock_irqrestore(&mcip_lock, flags);
} }
#ifdef CONFIG_SMP
static int static int
idu_irq_set_affinity(struct irq_data *d, const struct cpumask *cpumask, bool f) idu_irq_set_affinity(struct irq_data *data, const struct cpumask *cpumask,
bool force)
{ {
unsigned long flags;
cpumask_t online;
/* errout if no online cpu per @cpumask */
if (!cpumask_and(&online, cpumask, cpu_online_mask))
return -EINVAL;
raw_spin_lock_irqsave(&mcip_lock, flags);
idu_set_dest(data->hwirq, cpumask_bits(&online)[0]);
idu_set_mode(data->hwirq, IDU_M_TRIG_LEVEL, IDU_M_DISTRI_RR);
raw_spin_unlock_irqrestore(&mcip_lock, flags);
return IRQ_SET_MASK_OK; return IRQ_SET_MASK_OK;
} }
#endif
static struct irq_chip idu_irq_chip = { static struct irq_chip idu_irq_chip = {
.name = "MCIP IDU Intc", .name = "MCIP IDU Intc",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment