Received: by 2002:a05:7412:f584:b0:e2:908c:2ebd with SMTP id eh4csp1316433rdb; Mon, 4 Sep 2023 09:31:11 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH+LSZXR9ycAQBsUHEjdn/pI7Yw0pwam6akaySMy0Q8yuweO6Rm2ICoDEN29thgQ4Zz6Y52 X-Received: by 2002:a17:906:8b:b0:9a5:852f:10ae with SMTP id 11-20020a170906008b00b009a5852f10aemr8301743ejc.60.1693845070952; Mon, 04 Sep 2023 09:31:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693845070; cv=none; d=google.com; s=arc-20160816; b=LkQyg/XyiozInuCS2TgGZewXls6SFdyoRvrAsva2r+rMGxo4UEnAXnxRw+SgrAi4Vy Tv5N8Dng4Qa2jkrTQyFvFavBX3O4kvYprPvkc0tW6GSgyXFxcu2wmJaZUoVBSpUZ59W6 U9QqLf4sHCsmgTDPjxaOr0ZecnZmJeOkC3R/NZSvBdg9HWNxYLWfScvXl6UM1PdJKuTO tFXnp126WNCDglN7dyT9p9fcqMueP+1e7bdwsEeXyYXUyDpjiCvkkGzTDQ7hikt0Nnyy B4Bb7LkHBCK6/fhDWA31t3/6gYMB+ZJIIowxCQXxSxbs4MwVY5gj64iwhLHVq/JRV01o bYhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=oV9azKk19YE3172OMOzzWaz/DmjFTRrZHvR4rTxccTg=; fh=yx3np549NmzZiIDI1Gh3cZ8cHKTcxDnMF4nAgx8WOd0=; b=Q+7S2M5nPwtOLrnK/F/UoN+PR/Z81OC02D5jjuO9iDRI5ket0QjQJtfOVLfrjv0FX0 PkQ0qAGO5Oo++Bh6suVvoKo1nSuyvG4HcJztlHohfBRVhca+G46z5p5Weq1Fz/8S7IWH 7I+tvwYc6gQdSn77MQjXZ4ncgd8DprVm3Ssvy2kDi/xYrEL6nbwQBLVrdtanaPfZUXQz uVRO8ZanVSK6j/tVEzE0tvjYJB4LNA5zxEOMGiTwo03zEjHWgyEQPpA1Pv2F+amBramt 3L4AkwfIgQp5xEENalW7+9le94krKaPlxquc+e4iJ/Lr8FNHq0SW7rXdArPHkuFzxoho lixw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=xiaomi.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qq21-20020a17090720d500b0098889bf7f86si6627371ejb.315.2023.09.04.09.30.42; Mon, 04 Sep 2023 09:31:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=xiaomi.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350551AbjIDCFu convert rfc822-to-8bit (ORCPT + 99 others); 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: 8BIT Content-Type: text/plain 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) X-Spam-Status: No, score=-1.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL, SPF_HELO_SOFTFAIL,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 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!******/#