public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] irqchip/gic-v3-its: Mark GIC as non-shareable by OF property
@ 2023-09-04  2:04 Fang Xiang
  2023-09-04  7:24 ` Marc Zyngier
  0 siblings, 1 reply; 3+ messages in thread
From: Fang Xiang @ 2023-09-04  2:04 UTC (permalink / raw)
  To: tglx, maz, linux-kernel; +Cc: fangxiang3

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.

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;
+}
+
 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);

        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!******/#

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-09-05 16:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2023-09-05 10:00   ` Lorenzo Pieralisi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox