From: Marc Zyngier <maz@kernel.org>
To: Fang Xiang <fangxiang3@xiaomi.com>
Cc: <tglx@linutronix.de>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] irqchip/gic-v3-its: Mark GIC as non-shareable by OF property
Date: Mon, 04 Sep 2023 08:24:51 +0100 [thread overview]
Message-ID: <86sf7ue6yk.wl-maz@kernel.org> (raw)
In-Reply-To: <20230904020431.27057-1-fangxiang3@xiaomi.com>
On Mon, 04 Sep 2023 03:04:31 +0100,
Fang Xiang <fangxiang3@xiaomi.com> wrote:
>
> GIC600/GIC700 integration in some platforms does not support the
> sharability feature. Commit a8707f553884 ("irqchip/gic-v3: Add
> Rockchip 3588001 erratum workaround") added flags to indicate the
> integration design error, but the quirk is just applied with
> RK3588/RK3588S and GIC600.
>
> The property are named "force-non-shareable" to be vendor agnostic,
> since apparently similar integration design errors exist in other
> platforms and they can reuse the same property in their GIC ITS
> device-node.
No. If this is a problem, this must be dealt with in the following
manner:
- a standard property, which is documented in the ITS binding
- an equivalent ACPI property, equally documented
- separate instances of the property for the core GIC and the ITS
(because the RDs are *not* defined at the ITS level)
>
> Signed-off-by: Fang Xiang <fangxiang3@xiaomi.com>
> ---
> drivers/irqchip/irq-gic-v3-its.c | 11 +++++++++++
> 1 file changed, 11 insertions(+)
>
> diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c
> index e0c2b10d154d..2e92eac1e5f3 100644
> --- a/drivers/irqchip/irq-gic-v3-its.c
> +++ b/drivers/irqchip/irq-gic-v3-its.c
> @@ -5055,6 +5055,16 @@ static int __init its_compute_its_list_map(struct resource *res,
> return its_number;
> }
>
> +static void its_of_update_shareability(struct its_node *its)
> +{
> + if (!fwnode_property_present(its->fwnode_handle,
> + "force-non-shareable"))
> + return;
> +
> + its->flags |= ITS_FLAGS_FORCE_NON_SHAREABLE;
> + gic_rdists->flags |= RDIST_FLAGS_FORCE_NON_SHAREABLE;
There is no reason why we should conflate the two, other than your
implementation being monolithic.
> +}
> +
> static int __init its_probe_one(struct resource *res,
> struct fwnode_handle *handle, int numa_node)
> {
> @@ -5130,6 +5140,7 @@ static int __init its_probe_one(struct resource *res,
> its->msi_domain_flags = IRQ_DOMAIN_FLAG_ISOLATED_MSI;
>
> its_enable_quirks(its);
> + its_of_update_shareability(its);
As mentioned above, we need a mechanism that works across firmware implementations.
>
> err = its_alloc_tables(its);
> if (err)
> --
> 2.34.1
>
> #/******±¾Óʼþ¼°Æä¸½¼þº¬ÓÐСÃ×¹«Ë¾µÄ±£ÃÜÐÅÏ¢£¬½öÏÞÓÚ·¢Ë͸øÉÏÃæµØÖ·ÖÐÁгöµÄ¸öÈË»òȺ×é¡£½ûÖ¹ÈÎºÎÆäËûÈËÒÔÈκÎÐÎʽʹÓ㨰üÀ¨µ«²»ÏÞÓÚÈ«²¿»ò²¿·ÖµØÐ¹Â¶¡¢¸´ÖÆ¡¢»òÉ¢·¢£©±¾ÓʼþÖеÄÐÅÏ¢¡£Èç¹ûÄú´íÊÕÁ˱¾Óʼþ£¬ÇëÄúÁ¢¼´µç»°»òÓʼþ֪ͨ·¢¼þÈ˲¢É¾³ý±¾Óʼþ£¡ This e-mail and its attachments contain confidential information from XIAOMI, which is intended only for the person or entity whose address is listed above. Any use of the information contained herein in any way (including, but not limited to, total or partial disclosure, reproduction, or dissemination) by persons other than the intended recipient(s) is prohibited. If you receive this e-mail in error, please notify the sender by phone or email immediately and delete it!******/#
\
Please fix your email setup.
M.
--
Without deviation from the norm, progress is not possible.
next prev parent reply other threads:[~2023-09-04 7:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-04 2:04 [PATCH] irqchip/gic-v3-its: Mark GIC as non-shareable by OF property Fang Xiang
2023-09-04 7:24 ` Marc Zyngier [this message]
2023-09-05 10:00 ` Lorenzo Pieralisi
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=86sf7ue6yk.wl-maz@kernel.org \
--to=maz@kernel.org \
--cc=fangxiang3@xiaomi.com \
--cc=linux-kernel@vger.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