Received: by 2002:a05:7412:f584:b0:e2:908c:2ebd with SMTP id eh4csp2000030rdb; Tue, 5 Sep 2023 11:07:14 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGOpjjlx4GrClT0VhsU7jq7OD9qLmNCXmbVi3Bp+jSn/bDQMn7krrmP+HaIvWm1xDDU1Yy7 X-Received: by 2002:a05:6a00:847:b0:68a:6018:a66f with SMTP id q7-20020a056a00084700b0068a6018a66fmr16492530pfk.2.1693937233810; Tue, 05 Sep 2023 11:07:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693937233; cv=none; d=google.com; s=arc-20160816; b=eduNGQS35J45Fpxkza5tFfz9F04LY0OiSPGw45c2gTFVhpP7Kziy3TYGXzjV0Inraj NatnC50xnqUClM/bsYxkQnZF815EXS7OFEb/51G9qzc+UN704dx4C3C4DIz5LskhiBbq VGYlGux1/nqDBOz1IbwD0/QhB1JcO0p6cikW8RROSnk3vTHIdVHVqCmbK2uw2xgydAYd F/3tR8FQLGPxBNhdfd9HYyYbBOQOKBY0kaqqoDtRo3Ho6ZcJ/sScPClki3onUbnJGqFd d8ZYS4pz/eCrZ9U3Ld01Su08KWAFOzhmpFG1x2jKfRXoolJghZfZV/Jrcl+0RtOlIlaZ vUVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=PDGYfhangWuYS9+VNx9Ls/nCnFZjIkXi8Nkkc4bAPuQ=; fh=p0WmFcdnKr/HEaCAk8YOWF3omioU40oy6PcTifuOVoY=; b=wPS4YBnosm1de0C2/ks1zOUIWMwiYDy7Y6VVxX+fP5tBQib/5gK8B7tQpC2kxEuMUY Z9Bu39c3NmaT6OvtQK0b6ZobjAnsGo9D8hCkFNgsB41MGIsu46cw4LP+UWjJ1DFFkQwm YGA/985WaAz7Y1qcoVR/xIUM/4tATH/iyAA3udYBE9DEipo/ijd5WovniTf70ccKaQ1D qgGeJyHu3mTvMZ5ZuENZhMrolzXDlSA+Ovdiq9b0nHiRheKhyyXsH0EySfJ7XG5G37a4 9bAVzEflaZzKsxfSeN7u4UB4MDasg4uN8h8IkiiBXMI6QfXtVTF5LMXyE6661SNVhJS8 2J3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=LjbGDCdA; 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 p33-20020a056a000a2100b0068a524a38f8si10022793pfh.396.2023.09.05.11.06.59; Tue, 05 Sep 2023 11:07:13 -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=LjbGDCdA; 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 S1345941AbjIEQ4V (ORCPT + 99 others); Tue, 5 Sep 2023 12:56:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48050 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1354165AbjIEKAZ (ORCPT ); Tue, 5 Sep 2023 06:00:25 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 04C3CB4 for ; Tue, 5 Sep 2023 03:00:22 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 76CB2601D4 for ; Tue, 5 Sep 2023 10:00:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 94FB6C433C8; Tue, 5 Sep 2023 10:00:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1693908020; bh=UisXsBbG/7SOBMzTUSO9ECmJ9xjtD0EjCsd2Conv+no=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=LjbGDCdA8SK8NuSqJ1rFD8pgktW409yLTH9H+18wIA2UntWdLSfdCahc9vscoOO1x MJPleTUWugmKqaOBdfyIf9XymzY7Zh/f+M/zot0icqhoSoaMRTXsE34f23E9GVhSD1 OjhfOf9Iy6gpGY+vEy5Gt25uAfM2kmJvlddpoMUCFR4b+kNhSyqaD3XEaHtB0Ds8en 40zqD0NXhC54qbLRNl4io8oqSiYpuJpjOW4LHfzjr6BmMrMG0fkGIcOyM798G7mn39 fKRq5ahwAPC3MLeE82S5/WMoGxFhl8VtmjkX/ZuU7jyfwlEYj3DHL5AxTCiT0BINYf 6DCQ8qJfyAV1g== Date: Tue, 5 Sep 2023 12:00:16 +0200 From: Lorenzo Pieralisi To: Marc Zyngier Cc: Fang Xiang , tglx@linutronix.de, linux-kernel@vger.kernel.org Subject: Re: [PATCH] irqchip/gic-v3-its: Mark GIC as non-shareable by OF property Message-ID: References: <20230904020431.27057-1-fangxiang3@xiaomi.com> <86sf7ue6yk.wl-maz@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <86sf7ue6yk.wl-maz@kernel.org> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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, Sep 04, 2023 at 08:24:51AM +0100, Marc Zyngier wrote: > On Mon, 04 Sep 2023 03:04:31 +0100, > Fang Xiang 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) I am about to post a patchset to start discussion on how to "fix" these designs (in DT - ACPI will follow the approach we agree on), let's take it from there. Thanks, Lorenzo > > 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; > > 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.