From nobody Fri Dec 19 06:43:36 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2CEA0C83F2D for ; Mon, 4 Sep 2023 02:05:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350750AbjIDCFu convert rfc822-to-8bit (ORCPT ); Sun, 3 Sep 2023 22:05:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55742 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350541AbjIDCFr (ORCPT ); Sun, 3 Sep 2023 22:05:47 -0400 X-Greylist: delayed 62 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Sun, 03 Sep 2023 19:05:42 PDT Received: from outboundhk.mxmail.xiaomi.com (outboundhk.mxmail.xiaomi.com [118.143.206.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id C105EA9 for ; Sun, 3 Sep 2023 19:05:42 -0700 (PDT) X-IronPort-AV: E=Sophos;i="6.02,225,1688400000"; d="scan'208";a="64204715" From: Fang Xiang To: , , CC: Subject: [PATCH] irqchip/gic-v3-its: Mark GIC as non-shareable by OF property Date: Mon, 4 Sep 2023 10:04:31 +0800 Message-ID: <20230904020431.27057-1-fangxiang3@xiaomi.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.237.8.20] X-ClientProxiedBy: BJ-MBX05.mioffice.cn (10.237.8.125) To BJ-MBX15.mioffice.cn (10.237.8.135) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" 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 --- 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 re= source *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 |=3D ITS_FLAGS_FORCE_NON_SHAREABLE; + gic_rdists->flags |=3D 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 =3D IRQ_DOMAIN_FLAG_ISOLATED_MSI; its_enable_quirks(its); + its_of_update_shareability(its); err =3D its_alloc_tables(its); if (err) -- 2.34.1 #/******\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\= ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\uff= fd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\= ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\uff= fd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\= ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\uff= fd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\= ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\uff= fd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\= ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\uff= fd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\= ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\uff= fd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\= ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\uff= fd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\= ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\uff= fd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\= ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\uff= fd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd This e-mail and its attachments cont= ain confidential information from XIAOMI, which is intended only for the pe= rson or entity whose address is listed above. Any use of the information co= ntained herein in any way (including, but not limited to, total or partial = disclosure, reproduction, or dissemination) by persons other than the inten= ded recipient(s) is prohibited. If you receive this e-mail in error, please= notify the sender by phone or email immediately and delete it!******/#