mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2025-01-21 21:34:58 +08:00
irqchip/irq-csky-mpintc: Support auto irq deliver to all cpus
The csky,mpintc could deliver a external irq to one cpu or all cpus, but it couldn't deliver a external irq to a group of cpus with cpu_mask. So we only use auto deliver mode when affinity mask_val is equal to cpu_present_mask. There is no limitation for only two cpus in SMP system. Signed-off-by: Guo Ren <ren_guo@c-sky.com> Cc: Marc Zyngier <marc.zyngier@arm.com> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
This commit is contained in:
parent
16e32c3cde
commit
db56c5128e
@ -89,8 +89,19 @@ static int csky_irq_set_affinity(struct irq_data *d,
|
||||
if (cpu >= nr_cpu_ids)
|
||||
return -EINVAL;
|
||||
|
||||
/* Enable interrupt destination */
|
||||
cpu |= BIT(31);
|
||||
/*
|
||||
* The csky,mpintc could support auto irq deliver, but it only
|
||||
* could deliver external irq to one cpu or all cpus. So it
|
||||
* doesn't support deliver external irq to a group of cpus
|
||||
* with cpu_mask.
|
||||
* SO we only use auto deliver mode when affinity mask_val is
|
||||
* equal to cpu_present_mask.
|
||||
*
|
||||
*/
|
||||
if (cpumask_equal(mask_val, cpu_present_mask))
|
||||
cpu = 0;
|
||||
else
|
||||
cpu |= BIT(31);
|
||||
|
||||
writel_relaxed(cpu, INTCG_base + INTCG_CIDSTR + offset);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user