linux-csky.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marc Zyngier <marc.zyngier@arm.com>
To: guoren@kernel.org, mark.rutland@arm.com, tglx@linutronix.de
Cc: linux-kernel@vger.kernel.org, jason@lakedaemon.net,
	linux-csky@vger.kernel.org, Guo Ren <ren_guo@c-sky.com>
Subject: Re: [PATCH V4 3/4] irqchip/irq-csky-mpintc: Support auto irq deliver to all cpus
Date: Tue, 4 Jun 2019 12:54:51 +0100	[thread overview]
Message-ID: <7943816e-1cf0-dbc9-157d-71a83c5016c6@arm.com> (raw)
In-Reply-To: <1559646306-18860-4-git-send-email-guoren@kernel.org>

On 04/06/2019 12:05, guoren@kernel.org wrote:
> From: Guo Ren <ren_guo@c-sky.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@c-sky.com>
> Cc: Marc Zyngier <marc.zyngier@arm.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...

  reply	other threads:[~2019-06-04 11:54 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-04 11:05 [PATCH V4 0/4] irqchip/irq-csky-mpintc: Update some features guoren
2019-06-04 11:05 ` [PATCH V4 1/4] irqchip/irq-csky-mpintc: Add triger type guoren
2019-06-04 11:05 ` [PATCH V4 2/4] dt-bindings: interrupt-controller: Update csky mpintc guoren
2019-06-04 11:05 ` [PATCH V4 3/4] irqchip/irq-csky-mpintc: Support auto irq deliver to all cpus guoren
2019-06-04 11:54   ` Marc Zyngier [this message]
2019-06-04 12:32     ` Guo Ren
2019-06-04 11:05 ` [PATCH V4 4/4] irqchip/irq-csky-mpintc: Remove unnecessary loop in interrupt handler guoren

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7943816e-1cf0-dbc9-157d-71a83c5016c6@arm.com \
    --to=marc.zyngier@arm.com \
    --cc=guoren@kernel.org \
    --cc=jason@lakedaemon.net \
    --cc=linux-csky@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=ren_guo@c-sky.com \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).