Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp3474622pxb; Mon, 4 Apr 2022 18:08:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz8AxrKieS/sb+IfIcecLDKyjDt4GsRSPwBQCuSp/33VfRUhg/qsD1KRiHTxZZqSxumEJl6 X-Received: by 2002:a65:4989:0:b0:398:da12:70dd with SMTP id r9-20020a654989000000b00398da1270ddmr729628pgs.295.1649120883090; Mon, 04 Apr 2022 18:08:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649120883; cv=none; d=google.com; s=arc-20160816; b=rgWUHepVc0+jyZfmVhPOzvS4sHmdb41WQ4TXxVlWHC7bzisGngqd4d6LqxVgqPvP6C wVmSsbxXaelk0z4ni5QPH8yY3XAHT4qWVtAZVU1LPVukIkg4DICaOEsIe0001kHbKCQ9 odFZJKmuWyyEIaXcKYIGQ02C+K+3ZHRvmLBHv5D9yaSIgcSLTSrt3wX+/QhskXwaeJ2e ylx+psyacgZxOuEhi8GUDGcEAk0Dfd37cF/4bvcXdpKxIIrWk9mQhzay6K/KmfN9lWa5 hEHzAHixWz7tmqhl9chdRXv+4GTf2WjnMhgGzdV7b9Bd5yFnUqkuwhEuieARXz8RPVMy 9Vbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=/ct4xIq9BGo6OjNUfhv+1jPg6+XKEMXQd9ZrTNWmUuU=; b=n7Sq3uEYq3OiKvkhFtEbT5LF9C+oCQomxLAjALizK500Sf2a2rn1+amNgxMBZgdjQR nJmXjdBj444qxr5yczwRzlOrGcQhuGikQF8hRhqopnwztrZGBZBIyYuvEeMmX9yxdYyo V2l4SISjKRAgB7yJMosdMef57vYHCJxdHyR3jqwqrb/difDoISvnrMHqVVjHxsMzwsSA Qce7h3wonhifKc2t3lAvOUTTlnNExbuRtsjn9JkO7sccMtA4czBlYvg7XM+9syM7eeaD /+46+rbVMg79pUjcWtf810846dKjRdXd5MTzbcNskU1g0tYROnohUg8ov3SCuTj3xIcP HVdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=WqS3FMiZ; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id 138-20020a630290000000b003820b4ea6ddsi10775994pgc.792.2022.04.04.18.08.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Apr 2022 18:08:03 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=WqS3FMiZ; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 9DF926517C; Mon, 4 Apr 2022 17:07:33 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236336AbiDDImh (ORCPT + 99 others); Mon, 4 Apr 2022 04:42:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41438 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232894AbiDDIme (ORCPT ); Mon, 4 Apr 2022 04:42:34 -0400 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [46.235.227.227]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7907C3AA52; Mon, 4 Apr 2022 01:40:38 -0700 (PDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: kholk11) with ESMTPSA id 78AFE1F45934 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1649061637; bh=cyY2WRTj47ZWJuah+bRJ1PD2Fc40hBw+zYOhIhaJPuc=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=WqS3FMiZNnwkL8MZxuq/MhThpgxdfwDs9pYEIBv5FN3ri911cZtLdCTcJVlJzxuzy iRqq4fZsV0V8rXFv2HFLar3p4+l/83ofGVGKyT7cNLAEl/dh14TygAFNTF+zDONvxE k1vN+MTKfWJPlcBoHSleLh7cB+bp0I16OncVTp/n9o9zdRa2UWxNMAKPe+O9QFyQp7 IYCqq0eFrC2mBy2W7jEKN+kRfaIs5gduNuC86JSGUyDKtPgGKSVUkGFlOp9BgsGIqO TcDxXLq9BJPCHYGxAOnKY7WimvWh6Cwa2SzfDg6Mzq3poZRWMSjS9lNXSNKCwwfp6L lr7HVyV3odKpw== Message-ID: <7775eb70-692f-3f1b-f226-f7e0fad47e37@collabora.com> Date: Mon, 4 Apr 2022 10:40:34 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: [PATCH 2/2] dt-bindings: mfd: syscon: Add support for regmap fast-io Content-Language: en-US To: Krzysztof Kozlowski , lee.jones@linaro.org Cc: robh+dt@kernel.org, krzk+dt@kernel.org, arnd@arndb.de, matthias.bgg@gmail.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, nfraprado@collabora.com, kernel@collabora.com References: <20220401135048.23245-1-angelogioacchino.delregno@collabora.com> <20220401135048.23245-3-angelogioacchino.delregno@collabora.com> <8588a941-6d3e-9e14-cb21-d7af29b4b2bd@linaro.org> From: AngeloGioacchino Del Regno In-Reply-To: <8588a941-6d3e-9e14-cb21-d7af29b4b2bd@linaro.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,RDNS_NONE,SPF_HELO_NONE, T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY autolearn=unavailable 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 Il 02/04/22 13:38, Krzysztof Kozlowski ha scritto: > On 01/04/2022 15:50, AngeloGioacchino Del Regno wrote: >> The syscon driver now enables the .fast_io regmap configuration when >> the 'fast-io' property is found in a syscon node. >> >> Keeping in mind that, in regmap, fast_io is checked only if we are >> not using hardware spinlocks, allow the fast-io property only if >> there is no hwlocks reference (and vice-versa). > > I have doubts you need a property for this. "fast" is subjective in > terms of hardware, so this looks more like a software property, not > hardware. > > I think most of MMIOs inside a SoC are considered fast. Usually also the > syscon/regmap consumer knows which regmap it gets, so knows that it is > fast or not. > Hello Krzysztof, well yes, this property is changing how software behaves - specifically, as you've correctly understood, what regmap does. It's true that most of MMIOs inside a SoC are considered fast.. the word "most" is the exact reason why I haven't proposed simply hardcoding '.fast_io = true' in syscon, or in regmap-mmio... There are too many different SoCs around, and I didn't want to end up breaking anything (even if it should be unlikely, since MMIO is fast by principle). >> >> Signed-off-by: AngeloGioacchino Del Regno >> --- >> Documentation/devicetree/bindings/mfd/syscon.yaml | 15 +++++++++++++++ >> 1 file changed, 15 insertions(+) >> >> diff --git a/Documentation/devicetree/bindings/mfd/syscon.yaml b/Documentation/devicetree/bindings/mfd/syscon.yaml >> index 13baa452cc9d..85a2e83b5861 100644 >> --- a/Documentation/devicetree/bindings/mfd/syscon.yaml >> +++ b/Documentation/devicetree/bindings/mfd/syscon.yaml >> @@ -83,11 +83,26 @@ properties: >> $ref: /schemas/types.yaml#/definitions/uint32 >> enum: [1, 2, 4, 8] >> >> + fast-io: >> + description: >> + Indicates that this bus has a very fast IO, for which >> + acquiring a mutex would be significant overhead. >> + When present, regmap will use a spinlock instead. > > Regmap is current implementation behind this, but it's not related to > hardware, so how about removing it from the description? Something like: > "..., for which different locking methods should be used to reduce > overhead (e.g. spinlock instead of mutex)." > That's a very good point. I didn't think about any future in which the implementation would be changed from regmap to *new-name-here*... but anyway it makes a lot more sense to "speak generic". I'll change the description to match your proposal, thank you! Regards, Angelo