Received: by 2002:a05:7412:f584:b0:e2:908c:2ebd with SMTP id eh4csp1924286rdb; Tue, 5 Sep 2023 09:00:29 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEvb5sXB72jSRIFrKIGTf6F9vjcSs7Pynvh2iND2XdRgMk+8IBT56fwDr8Vjz8PY7NjCkNg X-Received: by 2002:a17:902:b494:b0:1bf:8779:e03f with SMTP id y20-20020a170902b49400b001bf8779e03fmr12346431plr.68.1693929628566; Tue, 05 Sep 2023 09:00:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693929628; cv=none; d=google.com; s=arc-20160816; b=LFTA1ofFUyDxzw0pI+doUx+2mobkgp4ErZ3eJ84D2UYGaEcKWd9LjUw2ZVEVIeLPEP V3S2nhMKWByEdVUKnWL6tkf+s/PmbziJ/X3Ifp25Oq9WdgK+38Wif2M8LwAuZf7kWzUO vERrfVgL77U/BKwrMiduBy1zWnxQXgNPMx6lve3Bg8aaY0vbraP+ky2dubEPKEhJgt2Y jIvV1UgXjC2P8X73q0QUOG9qIu7asX6iBylPOUZX0fLWgrZXxybnO8DE6hmfxCwR1azE sH9WILIA0e3q8R1ZULMGabFhHWO5Ci9NF4WoLJd/Q5MlBrt5cUEtvW9cZ/TxmRl15xmP kz4w== 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 :user-agent:references:in-reply-to:subject:cc:to:from:message-id :date:dkim-signature; bh=d2CVlcaf/Wd+sy+Xxl483qhxLRSKwruu1QvgjXpojrw=; fh=Zm7nZHbepNkSv87ZBMydHDm4Qt1cqVAfUG3cqNJlbB8=; b=B9PAQPWQ4iwz7dGjZB7Q4GeVsJ1WYsmCV1BlVzfvRB1d0bS0sJCBWIhMLjsnFLQ5L/ bGSa+ULmA03uprGcSwWcC1SHEp/n9368TYb4dYREQ6ZlRk5zjLWSAYuX5ZeQfREJbQfA G/gQ/RS1FrND5SoL83fkVK8d664/W8WZcZGkmYU3sekQODPvfVHgPFf2WURiLjMXgy8j 4E3jjm5usHjDn7UsDfJrba6s/EZ9ChpuagIGpZZ6u68qb9Vy/CJHv0y+AtwjrpW8JsKl 37wbEB1gw4uw05LtMGCjOm+kVaFaEIXNqr3Vj5MtM4QBMbXwN3bzbdtBkSg/CsOwZHGq XGaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=H0IB075K; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ik24-20020a170902ab1800b001b8ae34f1b7si9421967plb.631.2023.09.05.09.00.26; Tue, 05 Sep 2023 09:00:28 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=H0IB075K; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237270AbjIDHZD (ORCPT + 14 others); Mon, 4 Sep 2023 03:25:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52928 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229659AbjIDHZB (ORCPT ); Mon, 4 Sep 2023 03:25:01 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AECFA99 for ; Mon, 4 Sep 2023 00:24:57 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id 1570CCE0E16 for ; Mon, 4 Sep 2023 07:24:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5C241C433CA; Mon, 4 Sep 2023 07:24:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1693812294; bh=+Fgf+ImZTDHXXqnwmS8ZbyqaMlbLSub5KTWLjW3eOcU=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=H0IB075KyiKfr1kXyc8e21zXdpuvwIgjPf5b4GZ9e4EdywRRDIAzSXtvigiZgk+V3 VdXs1QZj0+uYgLsdHBm074V58F0MNbb1raZ1F1LIJ3UnMGn96zap2fiahuNRlekY6G 19bg+7qsXQFsKDauqboTa2jyKyiW+rrP3654MrgsZT294t0huNHRFFYZNfkWGCpQ+Y YpBchICH64xhYXHvtYdomPUzBkbBWKkdHjt5INGcF5YfKyKvNH87mK1PRkTcLkZcvl atkcjN4GSkPBxBccFcFYW2yKjWe24S+7kbDGM5yxKoqEduq91rqy1sk/krqQlohLc5 Ilt7yfshC1WvQ== Received: from sofa.misterjones.org ([185.219.108.64] helo=goblin-girl.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1qd3x5-00AKnd-R0; Mon, 04 Sep 2023 08:24:51 +0100 Date: Mon, 04 Sep 2023 08:24:51 +0100 Message-ID: <86sf7ue6yk.wl-maz@kernel.org> From: Marc Zyngier To: Fang Xiang Cc: , Subject: Re: [PATCH] irqchip/gic-v3-its: Mark GIC as non-shareable by OF property In-Reply-To: <20230904020431.27057-1-fangxiang3@xiaomi.com> References: <20230904020431.27057-1-fangxiang3@xiaomi.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/28.2 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: fangxiang3@xiaomi.com, tglx@linutronix.de, linux-kernel@vger.kernel.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham 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 On Mon, 04 Sep 2023 03:04:31 +0100, Fang Xiang wrote: >=20 > 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. >=20 > 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) >=20 > Signed-off-by: Fang Xiang > --- > drivers/irqchip/irq-gic-v3-its.c | 11 +++++++++++ > 1 file changed, 11 insertions(+) >=20 > diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v= 3-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; > } >=20 > +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; 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_no= de) > { > @@ -5130,6 +5140,7 @@ static int __init its_probe_one(struct resource *re= s, > its->msi_domain_flags =3D IRQ_DOMAIN_FLAG_ISOLATED_MSI; >=20 > its_enable_quirks(its); > + its_of_update_shareability(its); As mentioned above, we need a mechanism that works across firmware implemen= tations. >=20 > err =3D its_alloc_tables(its); > if (err) > -- > 2.34.1 >=20 > #/******=C2=B1=C2=BE=C3=93=C3=8A=C2=BC=C3=BE=C2=BC=C2=B0=C3=86=C3=A4=C2= =B8=C2=BD=C2=BC=C3=BE=C2=BA=C2=AC=C3=93=C3=90=C3=90=C2=A1=C3=83=C3=97=C2=B9= =C2=AB=C3=8B=C2=BE=C2=B5=C3=84=C2=B1=C2=A3=C3=83=C3=9C=C3=90=C3=85=C3=8F=C2= =A2=C2=A3=C2=AC=C2=BD=C3=B6=C3=8F=C3=9E=C3=93=C3=9A=C2=B7=C2=A2=C3=8B=C3=8D= =C2=B8=C3=B8=C3=89=C3=8F=C3=83=C3=A6=C2=B5=C3=98=C3=96=C2=B7=C3=96=C3=90=C3= =81=C3=90=C2=B3=C3=B6=C2=B5=C3=84=C2=B8=C3=B6=C3=88=C3=8B=C2=BB=C3=B2=C3=88= =C2=BA=C3=97=C3=A9=C2=A1=C2=A3=C2=BD=C3=BB=C3=96=C2=B9=C3=88=C3=8E=C2=BA=C3= =8E=C3=86=C3=A4=C3=8B=C3=BB=C3=88=C3=8B=C3=92=C3=94=C3=88=C3=8E=C2=BA=C3=8E= =C3=90=C3=8E=C3=8A=C2=BD=C3=8A=C2=B9=C3=93=C3=83=C2=A3=C2=A8=C2=B0=C3=BC=C3= =80=C2=A8=C2=B5=C2=AB=C2=B2=C2=BB=C3=8F=C3=9E=C3=93=C3=9A=C3=88=C2=AB=C2=B2= =C2=BF=C2=BB=C3=B2=C2=B2=C2=BF=C2=B7=C3=96=C2=B5=C3=98=C3=90=C2=B9=C3=82=C2= =B6=C2=A1=C2=A2=C2=B8=C2=B4=C3=96=C3=86=C2=A1=C2=A2=C2=BB=C3=B2=C3=89=C2=A2= =C2=B7=C2=A2=C2=A3=C2=A9=C2=B1=C2=BE=C3=93=C3=8A=C2=BC=C3=BE=C3=96=C3=90=C2= =B5=C3=84=C3=90=C3=85=C3=8F=C2=A2=C2=A1=C2=A3=C3=88=C3=A7=C2=B9=C3=BB=C3=84= =C3=BA=C2=B4=C3=AD=C3=8A=C3=95=C3=81=C3=8B=C2=B1=C2=BE=C3=93=C3=8A=C2=BC=C3= =BE=C2=A3=C2=AC=C3=87=C3=AB=C3=84=C3=BA=C3=81=C2=A2=C2=BC=C2=B4=C2=B5=C3=A7= =C2=BB=C2=B0=C2=BB=C3=B2=C3=93=C3=8A=C2=BC=C3=BE=C3=8D=C2=A8=C3=96=C2=AA=C2= =B7=C2=A2=C2=BC=C3=BE=C3=88=C3=8B=C2=B2=C2=A2=C3=89=C2=BE=C2=B3=C3=BD=C2=B1= =C2=BE=C3=93=C3=8A=C2=BC=C3=BE=C2=A3=C2=A1 This e-mail and its attachments = contain confidential information from XIAOMI, which is intended only for th= e person or entity whose address is listed above. Any use of the informatio= n contained herein in any way (including, but not limited to, total or part= ial disclosure, reproduction, or dissemination) by persons other than the i= ntended recipient(s) is prohibited. If you receive this e-mail in error, pl= ease notify the sender by phone or email immediately and delete it!******/# \ Please fix your email setup. M. --=20 Without deviation from the norm, progress is not possible.