[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7943816e-1cf0-dbc9-157d-71a83c5016c6@arm.com>
Date: Tue, 4 Jun 2019 12:54:51 +0100
From: Marc Zyngier <marc.zyngier@....com>
To: guoren@...nel.org, mark.rutland@....com, tglx@...utronix.de
Cc: linux-kernel@...r.kernel.org, jason@...edaemon.net,
linux-csky@...r.kernel.org, Guo Ren <ren_guo@...ky.com>
Subject: Re: [PATCH V4 3/4] irqchip/irq-csky-mpintc: Support auto irq deliver
to all cpus
On 04/06/2019 12:05, guoren@...nel.org wrote:
> From: Guo Ren <ren_guo@...ky.com>
>
> 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@...ky.com>
> Cc: Marc Zyngier <marc.zyngier@....com>
> ---
> drivers/irqchip/irq-csky-mpintc.c | 15 +++++++++++++--
> 1 file changed, 13 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/irqchip/irq-csky-mpintc.c b/drivers/irqchip/irq-csky-mpintc.c
> index a451a07..2740dd5 100644
> --- a/drivers/irqchip/irq-csky-mpintc.c
> +++ b/drivers/irqchip/irq-csky-mpintc.c
> @@ -143,8 +143,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);
>
>
Isn't that the same patch as [1]? In which case, I've queued it as a fix
already.
Thanks,
M.
[1] https://lkml.org/lkml/2019/5/21/174
--
Jazz is not dead. It just smells funny...
Powered by blists - more mailing lists