Received: by 2002:a05:7412:f584:b0:e2:908c:2ebd with SMTP id eh4csp1968735rdb; Tue, 5 Sep 2023 10:08:28 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGPZrWgJIzsJs+A/sQXB46Lai+GdiEk2vxcufixKHtvY8q6fAjaKsvqbqnm1LnVM3OBIivc X-Received: by 2002:a17:902:d505:b0:1c1:fbec:bc32 with SMTP id b5-20020a170902d50500b001c1fbecbc32mr15573065plg.6.1693933708071; Tue, 05 Sep 2023 10:08:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693933708; cv=none; d=google.com; s=arc-20160816; b=jj0xnoCsqzD/qDU3rQ4voMMOSR4sVyZ7EbOlNR+PCBrqJK3CGZ9oqGB1iplXf49yC2 MoINVjH+1M4FX3uDAybHZmn6xVskMUPZ5SpUnxBrmpxlJRyAd7uyoGjyuM3vo21nCxLq lbuSVZ2mTpWic3oy4QaD7NkT8iVRfZAvFloRwoJ8VfvVn8lZiq0UM2QCpXxOGMqYc0Rm y50TudvPwVB4l8rXbf8YVXt/vKZPia2s75FOfnPzUoaiwnbSYj+9Mw13JMnyIMDI//pY QLMID38U+n1Kdj7KemuSXYXl8El8vHXcAjOKUCRzApeISTFyLxuo31juntsxJeB+YSGI QbBg== 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-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=IGdzC6ye5NfKlN7i9G4PpQaaCunmDiDXh6HiIwZ9++0=; fh=R4JwZbO+j6GE/8CmK80QaWMqLbVRP5/bRAPOEy0B81o=; b=dLZPDtzvqcLKEcWgLNblP43u2kSPGuGD8qDqA9p6GCogrJdfs/4OeePhaiZ57PxYYr xczwsQjmJOOy10kZdA/fCGHqpne6/NYesisXa7NoK5QKXHEiJiCfMvJ1718Hc5PA/pgv 0ZUSvA7zY1MFmq+C+z/LFDmpWxtgf0PNSSXFtICIRP9SRB5jt5MrAjWwY49QRcp+pkfj v0LQ33//7Csp6XbhTdjuumsedMDDOUHtREV477MSmskqeRdigBFYtqYxcWT8wKKpK4ue 7JYANp18UtrOyQ3E+31kpzI8PlaOIEssRAe4tkLUNuffVv57q4WvInB9bCMQBJBqvZnN 9iQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=M91M2qjY; 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 e5-20020a170902cf4500b001c0ab540e6dsi9685726plg.212.2023.09.05.10.08.13; Tue, 05 Sep 2023 10:08: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=M91M2qjY; 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 S242906AbjIEQtK (ORCPT + 99 others); Tue, 5 Sep 2023 12:49:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36558 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1354533AbjIEMWv (ORCPT ); Tue, 5 Sep 2023 08:22:51 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 706681A8; Tue, 5 Sep 2023 05:22:48 -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 05AB660686; Tue, 5 Sep 2023 12:22:48 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EB9ADC433C7; Tue, 5 Sep 2023 12:22:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1693916567; bh=SoNW2HIc86v/ID8fpk0tLx5Hbits5RDiuL3Og0Y11Fs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=M91M2qjYeHxPHsS+sEAzDLTaa25Cp66UkgL/p5L0b9ufh1drfgHSzZ6FQ/1DZr+ey QbnrPvUeEWQSguEWNg34rKqKqxxwyhvXBoaqCpTG3gCIswqLR5FBuVcoWljYaYanH3 E7TNBDkAUXzzO8UrTLUyfPtOhGGLU5LF7iwD68oQJRHKMkB1cnYpdmcgHLsTFsFPWb +9e28y1UXEINMQpTxiEiRvky+cuwmElTZiLARmV85SmDdB6MME8Ng3y1U0sIsAu63E y1zb0CAGseuP4pD8O0h8Fmce62dW+rcL3ps/qri/EYYyjZnycN9wgPQIGFtaKRzBL1 zg2uEle1EpS4g== Date: Tue, 5 Sep 2023 14:22:42 +0200 From: Lorenzo Pieralisi To: Robin Murphy Cc: linux-kernel@vger.kernel.org, Rob Herring , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, Mark Rutland , Rob Herring , Fang Xiang , Marc Zyngier Subject: Re: [PATCH 1/2] dt-bindings: interrupt-controller: arm,gic-v3: Add dma-noncoherent property Message-ID: References: <20230905104721.52199-1-lpieralisi@kernel.org> <20230905104721.52199-2-lpieralisi@kernel.org> <932355b4-7d43-a465-a2da-8dded8e2d069@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <932355b4-7d43-a465-a2da-8dded8e2d069@arm.com> 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 Tue, Sep 05, 2023 at 12:17:51PM +0100, Robin Murphy wrote: > On 05/09/2023 11:47 am, Lorenzo Pieralisi wrote: > > The GIC v3 specifications allow redistributors and ITSes interconnect > > ports used to access memory to be wired up in a way that makes the > > respective initiators/memory observers non-coherent. > > > > Add the standard dma-noncoherent property to the GICv3 bindings to > > allow firmware to describe the redistributors/ITSes components and > > interconnect ports behaviour in system designs where the redistributors > > and ITSes are not coherent with the CPU. > > > > Signed-off-by: Lorenzo Pieralisi > > Cc: Rob Herring > > --- > > .../bindings/interrupt-controller/arm,gic-v3.yaml | 8 ++++++++ > > 1 file changed, 8 insertions(+) > > > > diff --git a/Documentation/devicetree/bindings/interrupt-controller/arm,gic-v3.yaml b/Documentation/devicetree/bindings/interrupt-controller/arm,gic-v3.yaml > > index 39e64c7f6360..0a81ae4519a6 100644 > > --- a/Documentation/devicetree/bindings/interrupt-controller/arm,gic-v3.yaml > > +++ b/Documentation/devicetree/bindings/interrupt-controller/arm,gic-v3.yaml > > @@ -106,6 +106,10 @@ properties: > > $ref: /schemas/types.yaml#/definitions/uint32 > > maximum: 4096 > > + dma-noncoherent: > > + description: | > > + Present if the GIC redistributors are not cache coherent with the CPU. > > I wonder if it's worth being a bit more specific here, e.g. "if the GIC > {redistributors,ITS} permit programming cacheable inner-shareable memory > attributes, but are connected to a non-coherent downstream interconnect." In my opinion it is and I wanted to elaborate on what I wrote but then I thought that this is a standard DT property, I wasn't sure whether we really need to explain what it is there for. We are using the property to plug a hole so I agree with you, we should be as clear as possible in the property definition but I will rely on Rob/Marc's opinion, I don't know what's the DT policy for this. > That might help clarify why the negative property, which could seem a bit > backwards at first glance, and that it's not so important in the cases where > the GIC itself is fundamentally non-coherent anyway (which *is* > software-discoverable). Is it ? Again, see above, are we defining "dma-noncoherent" to fix a bug or to fix the specs ? The shareability bits are writeable and even a fundamentally non-coherent GIC design could allow writing them, AFAIU. I would avoid putting ourselves into a corner where we can't use this property because the binding itself is too strict on what it is solving. > Otherwise, this is the same approach that I like and have previously lobbied > for, so obviously I approve :) > > (plus I do think it's the right shape to be able to slot an equivalent field > into ACPI MADT entries without *too* much bother) We are in agreement, let's see what others think. Thanks, Lorenzo > > Thanks, > Robin. > > > + > > msi-controller: > > description: > > Only present if the Message Based Interrupt functionality is > > @@ -193,6 +197,10 @@ patternProperties: > > compatible: > > const: arm,gic-v3-its > > + dma-noncoherent: > > + description: | > > + Present if the GIC ITS is not cache coherent with the CPU. > > + > > msi-controller: true > > "#msi-cells": > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel