From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4FFF1C74A5B for ; Tue, 21 Mar 2023 13:56:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231302AbjCUN44 (ORCPT ); Tue, 21 Mar 2023 09:56:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57244 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229696AbjCUN4t (ORCPT ); Tue, 21 Mar 2023 09:56:49 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1CAED6199; Tue, 21 Mar 2023 06:56:48 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 9F06861C14; Tue, 21 Mar 2023 13:56:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 23950C433D2; Tue, 21 Mar 2023 13:56:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1679407007; bh=ezAwooPCONqOE3wCgSpV5G/v4lBoltOn+J+AETmWWLk=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=VLi5xk4+KrQZ3LPmifTMt/HGiUMRfZnocFTOrMRPwIU2YG90z6qMuDvzqDGbinAp8 FCrOWWN98c+cTc+mLR3760ZYW+c1zKyu7FMwVNHBI5VrRQ7D42uiKp45DZpj0O+W8z KHBxpiplb3BOj3uTvaArK3VbmYzktIF3aLQLH5PDUIx27O12YDy94gfTQarH8JaFKD 09uVZxnPSLP9uMsqC7NY2+Xl6DnjASr4FADJDxenOSf4Q5bFPCPM9zJJPQlpVrHUjj YH5JJleSHdYUbR00x4KUAiZp6/oqQCGPk5lAwfIi8twyt93JhRL9uWKTytXk2ohJ8+ it2hd92EtM3pQ== Message-ID: <32bcb19f-db74-8660-7270-305e81363376@kernel.org> Date: Tue, 21 Mar 2023 15:56:40 +0200 MIME-Version: 1.0 Subject: Re: [PATCH v7 6/9] interconnect: qcom: rpm: Handle interface clocks To: Konrad Dybcio , Andy Gross , Bjorn Andersson , Dmitry Baryshkov Cc: Bryan O'Donoghue , linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org References: <20230228-topic-qos-v7-0-815606092fff@linaro.org> <20230228-topic-qos-v7-6-815606092fff@linaro.org> Content-Language: en-US From: Georgi Djakov In-Reply-To: <20230228-topic-qos-v7-6-815606092fff@linaro.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Hi Konrad, Thank you for working on this and sorry about jumping a bit late into the discussion. On 8.03.23 23:40, Konrad Dybcio wrote: > Some (but not all) providers (or their specific nodes) require > specific clocks to be turned on before they can be accessed. Failure > to ensure that results in a seemingly random system crash (which > would usually happen at boot with the interconnect driver built-in), > resulting in the platform not booting up properly. These "interface" clocks seem to be used only to program QoS for the respective ip block (eg ufs). So if we don't program QoS, there should be no crashes, right? I believe that in downstream they defer setting QoS until the first non-zero bandwidth request because of drivers that probe asynchronously or there is some firmware booting involved (IPA maybe). And bad stuff might happen if we touch the clock while the firmware is still booting. So setting the QoS on the first non-zero bandwidth request might not be a bad idea. Such nodes should probably be also excluded from sync_state by implementing get_bw() to return 0 bandwidth. BR, Georgi > > Limit the number of bus_clocks to 2 (which is the maximum that SMD > RPM interconnect supports anyway) and handle non-scaling clocks > separately. Update MSM8996 and SDM660 drivers to make sure they do > not regress with this change. > > This unfortunately has to be done in one patch to prevent either > compile errors or broken bisect. > > Signed-off-by: Konrad Dybcio > --- > drivers/interconnect/qcom/icc-rpm.c | 52 ++++++++++++++++++++++++++++++------- > drivers/interconnect/qcom/icc-rpm.h | 14 ++++++++-- > drivers/interconnect/qcom/msm8996.c | 22 +++++++--------- > drivers/interconnect/qcom/sdm660.c | 16 +++++------- > 4 files changed, 70 insertions(+), 34 deletions(-) > [..]