Received: by 2002:a05:6a10:8395:0:0:0:0 with SMTP id n21csp377683pxh; Tue, 9 Nov 2021 12:11:35 -0800 (PST) X-Google-Smtp-Source: ABdhPJxPKyOwMKmOjib3gFF+XimRnjEOEOWBoBZQb1JdMhc9Lr2a+tNm0mFe2YBJ+47IlsKD8BQf X-Received: by 2002:a05:6638:2727:: with SMTP id m39mr3226578jav.75.1636488695405; Tue, 09 Nov 2021 12:11:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636488695; cv=none; d=google.com; s=arc-20160816; b=w3RcP0Q17RAxpE502284xbqHJXW7plbLNgDKihhNQmOe5Wz7OZNOkGy1+3yo5WJXb/ K7Xh4fJKY8i0JZZNrQxI/Rv65snDjalb8aM0lDJ+Ln+3gq5t8ndU2GCvoo161Y7hudpB eUSdmM26pvZQ3Ub/WYQn6hbzvsOmJrEFdgGC0u6aVLi9ZXVHaV838vMLHnwjgEmjBcVy EdHrXWybPLfsMbe9GLZJQBFoZuQZK2Ljd54FmVGJ3BpVfG7Pfnj3nJNDtJ5d/Q/Kmx68 USxcqrHlKMnRE7QIDrh6YV18qWzb5zpgiNxdZSdvjfKH3dcdAVxGef4bUdyeTk7B6Si9 jzVw== 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=RiExFva19iXpcbPI5dAYFzRkXGmUkKhn82LlovdHwDo=; b=pHQwfMHXSBm0GmaUbI3Qp3IP9qTzoIMPaaHjIC/RnHhvVqSnSvF+uOKORARlnXxNMB 4sCu0HTYXRjvp9M7Ew3U8CJ2QfEpRc7d5xBFLpAVVFZV8T04Q3mUkVtXekfd5+rN4XSI fDI1mAPBk5FD+bJH5gIY++Pp4Z31AOE9USE7M4N9n2j5kmYZqqlO7TLLweSfQbXx3cK3 9ARJGoh8wThNq09fxw5iGKTg4fUy2/h78nrtdLl+RMKJA96tJ3uudPegl2OR+zhPmexV dVbwnXfvlBw7ht43yzh+r/v+KEuPg7fdjW/mIrUkAv54YwfGVytTrvkJH5nM+mq8lk4i 0b1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gerhold.net header.s=strato-dkim-0002 header.b=FBVBdfyv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z6si33553939ilb.156.2021.11.09.12.11.19; Tue, 09 Nov 2021 12:11:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gerhold.net header.s=strato-dkim-0002 header.b=FBVBdfyv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245317AbhKIK3R (ORCPT + 99 others); Tue, 9 Nov 2021 05:29:17 -0500 Received: from mo4-p01-ob.smtp.rzone.de ([81.169.146.166]:32727 "EHLO mo4-p01-ob.smtp.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239354AbhKIK3Q (ORCPT ); Tue, 9 Nov 2021 05:29:16 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1636453586; s=strato-dkim-0002; d=gerhold.net; h=In-Reply-To:References:Message-ID:Subject:Cc:To:From:Date:Cc:Date: From:Subject:Sender; bh=RiExFva19iXpcbPI5dAYFzRkXGmUkKhn82LlovdHwDo=; b=FBVBdfyvQYtX6+LPASWG4S84/a1D4AJY+5Xo18NJumgpGW1aUEGBqs0CXCnLHsfc9t 0ZrfkeT5JYp7G2u7OS6+AfJdDMEwxw/TP2OC4SRmJqfdOn8A6l4Ys9ntDqJPI2NPHK2a 1Jn/9k2FTU+Wl7spuKVaTleM0TjRcEEjQCyWLydiRu0NrUXFrIiwtyRLD+CpqPfyjGW5 WgqOWY7Js7S7zUURkojmWoX4VD5EL+mDz1/Shxa3o9EylF1/bCbHJVOIdCrcMTUPQhwL /dzdfBZKz3cLXA1fgKch6PnHV8x4FmQFSmTSP6hDNWDbGDSXSyO2RIbp++GSgvuu4q8K Yb2w== Authentication-Results: strato.com; dkim=none X-RZG-AUTH: ":P3gBZUipdd93FF5ZZvYFPugejmSTVR2nRPhVOQ/OcYgojyw4j34+u267FZF9PwpcNKLVrK86+6Y=" X-RZG-CLASS-ID: mo00 Received: from gerhold.net by smtp.strato.de (RZmta 47.34.1 SBL|AUTH) with ESMTPSA id Q0a97bxA9AQPXZ3 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Tue, 9 Nov 2021 11:26:25 +0100 (CET) Date: Tue, 9 Nov 2021 11:26:21 +0100 From: Stephan Gerhold To: Shawn Guo Cc: Stephen Boyd , Bjorn Andersson , Loic Poulain , linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 0/3] clk: qcom: smd-rpm: Report enable state to framework Message-ID: References: <20211109022558.14529-1-shawn.guo@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211109022558.14529-1-shawn.guo@linaro.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Shawn, On Tue, Nov 09, 2021 at 10:25:55AM +0800, Shawn Guo wrote: > Currently the enable state of smd-rpm clocks are not properly reported > back to framework due to missing .is_enabled and .is_prepared hooks. > This causes a couple of issues. > > - All those unused clocks are not voted for off, because framework has > no knowledge that they are unused. It becomes a problem for vlow > power mode support, as we do not have every single RPM clock claimed > and voted for off by client devices, and rely on clock framework to > disable those unused RPM clocks. > I posted a similar patch a bit more than a year ago [1]. Back then one of the concerns was that we might disable critical clocks just because they have no driver using it actively. For example, not all of the platforms using clk-smd-rpm already have an interconnect driver. Disabling the interconnect related clocks will almost certainly make the device lock up completely. (I tried it back then, it definitely does...) I proposed adding CLK_IGNORE_UNUSED for the interconnect related clocks back then [2] which would allow disabling most of the clocks at least. Stephen Boyd had an alternative proposal to instead move the interconnect related clocks completely out of clk-smd-rpm [3]. But I'm still unsure how this would work in a backwards compatible way. [4] Since your patches are more or less identical I'm afraid the same concerns still need to be solved somehow. :) Thanks, Stephan [1]: https://lore.kernel.org/linux-arm-msm/20200817140908.185976-1-stephan@gerhold.net/ [2]: https://lore.kernel.org/linux-arm-msm/20200818080738.GA46574@gerhold.net/ [3]: https://lore.kernel.org/linux-arm-msm/159796605593.334488.8355244657387381953@swboyd.mtv.corp.google.com/ [4]: https://lore.kernel.org/linux-arm-msm/20200821064857.GA905@gerhold.net/