linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Valentin Schneider <valentin.schneider@arm.com>
To: Marc Zyngier <maz@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	kernel-team@android.com, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	Jason Cooper <jason@lakedaemon.net>
Subject: Re: [PATCH v2 1/4] genirq: Walk the irq_data hierarchy when resending an interrupt
Date: Fri, 04 Sep 2020 20:28:38 +0100	[thread overview]
Message-ID: <jhj4kodxrx5.mognet@arm.com> (raw)
In-Reply-To: <20200903183206.104838-2-maz@kernel.org>


Hi Marc,

On 03/09/20 19:32, Marc Zyngier wrote:
> On resending an interrupt, we only check the topmost irqchip for
> a irq_retrigger callback. However, this callback could be implemented
> at a lower level. Use irq_chip_retrigger_hierarchy() in this case.
>

Rookie wording question here; re-reading this I'm questioning which way is
up.

From an irq_data hierarchy PoV, the topmost chip (i.e. last ->parent)
should be the root irqchip. However, the irq_desc we get from irq_to_desc()
ought to hold the irq_data for the lowermost irqchip in that irq_data
hierarchy.

Is it that here by "topmost" you instead mean topmost of the irqchip stack
on top of the root (IOW furthest away from the root)?

> Signed-off-by: Marc Zyngier <maz@kernel.org>
> ---
>  kernel/irq/resend.c | 15 +++++++++++++--
>  1 file changed, 13 insertions(+), 2 deletions(-)
>
> diff --git a/kernel/irq/resend.c b/kernel/irq/resend.c
> index c48ce19a257f..8ccd32a0cc80 100644
> --- a/kernel/irq/resend.c
> +++ b/kernel/irq/resend.c
> @@ -86,6 +86,18 @@ static int irq_sw_resend(struct irq_desc *desc)
>  }
>  #endif
>
> +static int try_retrigger(struct irq_desc *desc)
> +{
> +	if (desc->irq_data.chip->irq_retrigger)
> +		return desc->irq_data.chip->irq_retrigger(&desc->irq_data);
> +
> +#ifdef CONFIG_IRQ_DOMAIN_HIERARCHY
> +	return irq_chip_retrigger_hierarchy(&desc->irq_data);
> +#else
> +	return 0;
> +#endif
> +}
> +
>  /*
>   * IRQ resend
>   *
> @@ -113,8 +125,7 @@ int check_irq_resend(struct irq_desc *desc, bool inject)
>
>       desc->istate &= ~IRQS_PENDING;
>
> -	if (!desc->irq_data.chip->irq_retrigger ||
> -	    !desc->irq_data.chip->irq_retrigger(&desc->irq_data))
> +	if (!try_retrigger(desc))
>               err = irq_sw_resend(desc);
>
>       /* If the retrigger was successfull, mark it with the REPLAY bit */

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2020-09-04 19:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-03 18:32 [PATCH v2 0/4] irqchip/gic: Generalize use of HW-based retriggering Marc Zyngier
2020-09-03 18:32 ` [PATCH v2 1/4] genirq: Walk the irq_data hierarchy when resending an interrupt Marc Zyngier
2020-09-04 19:28   ` Valentin Schneider [this message]
2020-09-05  9:26     ` Marc Zyngier
2020-09-05 12:58       ` Valentin Schneider
2020-09-03 18:32 ` [PATCH v2 2/4] irqchip/gic-v2, v3: Implement irq_chip->irq_retrigger() Marc Zyngier
2020-09-03 18:32 ` [PATCH v2 3/4] irqchip/git-v3-its: Implement irq_retrigger callback for device-triggered LPIs Marc Zyngier
2020-09-03 18:32 ` [PATCH v2 4/4] irqchip/gic-v2, v3: Prevent SW resends entirely Marc Zyngier

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=jhj4kodxrx5.mognet@arm.com \
    --to=valentin.schneider@arm.com \
    --cc=jason@lakedaemon.net \
    --cc=kernel-team@android.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maz@kernel.org \
    --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).