From: Valentin Schneider <valentin.schneider@arm.com>
To: James Morse <james.morse@arm.com>, linux-kernel@vger.kernel.org
Cc: Thomas Gleixner <tglx@linutronix.de>, Marc Zyngier <maz@kernel.org>
Subject: Re: [PATCH 2/2] irqchip/gic-v3: Fix selection of partition domain for EPPIs
Date: Fri, 30 Jul 2021 11:47:30 +0100 [thread overview]
Message-ID: <87eebgkri5.mognet@arm.com> (raw)
In-Reply-To: <20210729172748.28841-3-james.morse@arm.com>
On 29/07/21 17:27, James Morse wrote:
> commit 5f51f803826e ("irqchip/gic-v3: Add EPPI range support") added
> GIC_IRQ_TYPE_PARTITION support for EPPI to gic_irq_domain_translate(),
> and commit 52085d3f2028 ("irqchip/gic-v3: Dynamically allocate PPI
> partition descriptors") made the gic_data.ppi_descs array big enough for
> EPPI, but neither gic_irq_domain_select() nor partition_domain_translate()
> were updated.
>
> This means partitions are created by partition_create_desc() for the
> EPPI range, but can't be registered as they will always match the root
> domain and map to the summary interrupt.
>
> Update gic_irq_domain_select() to match PPI and EPPI. The fwspec for
> PPI and EPPI both start from 0. Use gic_irq_domain_translate() to find
> the hwirq from the fwspec, then convert this to a ppi index.
>
> Reported-by: Valentin Schneider <valentin.schneider@arm.com>
> Signed-off-by: James Morse <james.morse@arm.com>
Tiny nit below, regardless:
Reviewed-by: Valentin Schneider <valentin.schneider@arm.com>
> @@ -1518,7 +1547,12 @@ static int partition_domain_translate(struct irq_domain *d,
> if (WARN_ON(!np))
> return -EINVAL;
>
> - ret = partition_translate_id(gic_data.ppi_descs[fwspec->param[1]],
> + ret = gic_irq_domain_translate(d, fwspec, &ppi_intid, type);
This assigns @type for us, so the @type assignment at the tail of
partition_domain_translate() becomes redundant.
> + if (WARN_ON_ONCE(ret))
> + return 0;
> +
> + ppi_idx = __gic_get_ppi_index(ppi_intid);
> + ret = partition_translate_id(gic_data.ppi_descs[ppi_idx],
> of_node_to_fwnode(np));
> if (ret < 0)
> return ret;
> --
> 2.30.2
next prev parent reply other threads:[~2021-07-30 10:47 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-29 17:27 [PATCH 0/2] irqchip/gic-v3: Fix selection of partition domain for EPPIs James Morse
2021-07-29 17:27 ` [PATCH 1/2] irqchip/gic-v3: Add __gic_get_ppi_index() to find the PPI number from hwirq James Morse
2021-07-30 10:47 ` Valentin Schneider
2021-08-12 7:13 ` [irqchip: irq/irqchip-next] " irqchip-bot for James Morse
2021-07-29 17:27 ` [PATCH 2/2] irqchip/gic-v3: Fix selection of partition domain for EPPIs James Morse
2021-07-30 10:47 ` Valentin Schneider [this message]
2021-08-12 7:13 ` [irqchip: irq/irqchip-next] " irqchip-bot for James Morse
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=87eebgkri5.mognet@arm.com \
--to=valentin.schneider@arm.com \
--cc=james.morse@arm.com \
--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