Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp96163rwb; Thu, 22 Sep 2022 15:03:43 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6vQgpa22XsA31gv9cZsJXZa8D4Bt3M9a0qIwoN1BgfOVg+1w3+RtDbuxFqeSBWW/eJ+4aU X-Received: by 2002:a17:907:6ea4:b0:782:6b82:a2cb with SMTP id sh36-20020a1709076ea400b007826b82a2cbmr3166573ejc.408.1663884223418; Thu, 22 Sep 2022 15:03:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663884223; cv=none; d=google.com; s=arc-20160816; b=r6B+tTqo18lU81RkhbU2UtSGdxaytPWGCXjaV7agcE/yFio+oXF4pfHy3j16/PBkXG 2NuwW7M3k0sgF6DnssnDJXkU1bBJR7b6m6dUc9U30JVBE3leGOMnPazHbgRPPSmp/ZT6 fVRUIwkhkNFbZBSiI5V7rnMV+L46KqemVPV1k2RtJqjKrzLkNsC/FQdJQ034zgF+2UO2 l/D98uiA/mP0fr+uyOT3gWD+52ooecT2WjeUENmYbbgdfVqufVMMnZNEqyxUiyqcTSip Uw8tQNwYgk2rC7djWfsGoi7qr3wlLxtHt9wNuwQaMCoEukea69HchuV/bJ2bY67N4LZd /+/w== 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=cxbQv9D2p8vN8THDF3AKAQRLlVYEVvb4qnk8cFoXNPs=; b=Z+PFbAaYEx/x4JpTn10z4JQdkYjuApCaBWvn3aYnn0ng8vvejJbzKw44nOfTCi3zhY lWxpd8ud/1mFBxrOr+n3T/OnRlkpfrapqGPbSooWpiQPN/raH/+N0e1Pn/t405RzYJbW ri1eOZBGnMzqOZT/qinnEUpQ9/RgOU9pDyau8t0gB0zHTOziiDQBNwOSDHRtV56CcuL3 o6McpLUlVgEPrjv/Kx3yBwJImMF0KNw2PLLLKeU1D8WjMwtR5vdWlxZfcB6m2djGTZQy X1kYoZSbkuaqa9Xm6u4DWv2/CLIg16hYjZ7rrdpRXJoXgW0A9zvt/C98eBWan/aqXnvB Facg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=f2cVDIpV; 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=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m20-20020a170906581400b007414081b2ebsi5500883ejq.148.2022.09.22.15.02.59; Thu, 22 Sep 2022 15:03:43 -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=@linaro.org header.s=google header.b=f2cVDIpV; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230469AbiIVV2r (ORCPT + 99 others); Thu, 22 Sep 2022 17:28:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52110 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231193AbiIVV2c (ORCPT ); Thu, 22 Sep 2022 17:28:32 -0400 Received: from mail-il1-x136.google.com (mail-il1-x136.google.com [IPv6:2607:f8b0:4864:20::136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B737E111DFB for ; Thu, 22 Sep 2022 14:28:27 -0700 (PDT) Received: by mail-il1-x136.google.com with SMTP id g6so5602232ild.6 for ; Thu, 22 Sep 2022 14:28:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date; bh=cxbQv9D2p8vN8THDF3AKAQRLlVYEVvb4qnk8cFoXNPs=; b=f2cVDIpVYXuoDIP3unMWkQNMOWeE7Xo0nLUDsGCy0Gmx1AWEdw1WZBQlqjd551VySs Zng1uF7z2o1k44Y3k7MnWH0L7/lT14/eFcee9EOBiYb6hsHWb2W/qOOuzgu500OfdWR+ SEMxH6v8T+6OOwr7ufc/ftxs4W9xNxCf0brItbND+l5/BkNmwWJN2j/mObiDZFpm31Ge cgF+a00RGIdc7eDtI9JC9mfR/AUHXL4w/KAZSpBwlZ7wePJnP/Z1PO67bdMlGSQidB2h 4SCYmdSxMPqils9q3+qY2uSfH5V9uob9QJ2kISuZNuVx2ZNbCQTG67p4hIAmQwBDfe/3 PtPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date; bh=cxbQv9D2p8vN8THDF3AKAQRLlVYEVvb4qnk8cFoXNPs=; b=E3cEs0puO1syO0eE3FzoT1RL7RDXrG0MjZweuiuDZnXBON2XhFgMcgaohRZNg11o7D GF7pHUlprl+7chGqUBil4lEdcOtIJxfF35hRKRx3r3pR1BqPWhqZBZ0EdLSwUrPMn9S8 1YQ4mTVg5NEUwKn5PERjAc5aeQA2u4ti1ucWRU6fyDd9fRdcwjIJ1K3wLqGam1jd2/rM CjAa6MiGhUFWSKaRNzuC1ja2Vlj6METu0Gk051vMT8O4kVMFiJdYl28f7Ood89OUVeIO je0xyboFhPzyzZtP+w1VVOgqk75XN+EjS6q4UYurjxKiFuPAn6QlkgC+TZ5n98G1KTfx Em9w== X-Gm-Message-State: ACrzQf0WnkQCvwJrwpC4JLOBWyCO0uLUk7RTqKMpXwzkpUuKJeIaKbzv QzDpxUlE/4S2JOKZT6Y+LNB7Zw== X-Received: by 2002:a92:c545:0:b0:2f6:5ca9:8bc5 with SMTP id a5-20020a92c545000000b002f65ca98bc5mr2899934ilj.270.1663882106796; Thu, 22 Sep 2022 14:28:26 -0700 (PDT) Received: from [172.22.22.4] ([98.61.227.136]) by smtp.googlemail.com with ESMTPSA id i7-20020a056638380700b00349d2d52f6asm2650812jav.37.2022.09.22.14.28.25 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 22 Sep 2022 14:28:26 -0700 (PDT) Message-ID: <00eb82ca-8bf6-c744-d04d-96b97ce06b17@linaro.org> Date: Thu, 22 Sep 2022 16:28:25 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [5.10 PATCH] interconnect: qcom: icc-rpmh: Add BCMs to commit list in pre_aggregate Content-Language: en-US To: Douglas Anderson , stable@vger.kernel.org, gregkh@linuxfoundation.org Cc: swboyd@chromium.org, Mike Tipton , Georgi Djakov , Andy Gross , Bjorn Andersson , Georgi Djakov , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org References: <20220922141725.5.10.1.I791715539cae1355e21827ca738b0b523a4a0f53@changeid> From: Alex Elder In-Reply-To: <20220922141725.5.10.1.I791715539cae1355e21827ca738b0b523a4a0f53@changeid> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS 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 On 9/22/22 4:18 PM, Douglas Anderson wrote: > From: Mike Tipton > > commit b95b668eaaa2574e8ee72f143c52075e9955177e upstream. > > We're only adding BCMs to the commit list in aggregate(), but there are > cases where pre_aggregate() is called without subsequently calling > aggregate(). In particular, in icc_sync_state() when a node with initial > BW has zero requests. Since BCMs aren't added to the commit list in > these cases, we don't actually send the zero BW request to HW. So the > resources remain on unnecessarily. > > Add BCMs to the commit list in pre_aggregate() instead, which is always > called even when there are no requests. > > Signed-off-by: Mike Tipton > [georgi: remove icc_sync_state for platforms with incomplete support] > Link: https://lore.kernel.org/r/20211125174751.25317-1-djakov@kernel.org > Signed-off-by: Georgi Djakov > [dianders: dropped sm8350.c which isn't present in 5.10] > Signed-off-by: Douglas Anderson Whoops, sorry about that. Acked-by: Alex Elder > --- > This should have been included in Alex Elder's request for patches > picked to 5.10 [1] but it was missed. Let's finally pick it up. > > [1] https://lore.kernel.org/r/20220608205415.185248-3-elder@linaro.org > > drivers/interconnect/qcom/icc-rpmh.c | 10 +++++----- > drivers/interconnect/qcom/sm8150.c | 1 - > drivers/interconnect/qcom/sm8250.c | 1 - > 3 files changed, 5 insertions(+), 7 deletions(-) > > diff --git a/drivers/interconnect/qcom/icc-rpmh.c b/drivers/interconnect/qcom/icc-rpmh.c > index f6fae64861ce..27cc5f03611c 100644 > --- a/drivers/interconnect/qcom/icc-rpmh.c > +++ b/drivers/interconnect/qcom/icc-rpmh.c > @@ -20,13 +20,18 @@ void qcom_icc_pre_aggregate(struct icc_node *node) > { > size_t i; > struct qcom_icc_node *qn; > + struct qcom_icc_provider *qp; > > qn = node->data; > + qp = to_qcom_provider(node->provider); > > for (i = 0; i < QCOM_ICC_NUM_BUCKETS; i++) { > qn->sum_avg[i] = 0; > qn->max_peak[i] = 0; > } > + > + for (i = 0; i < qn->num_bcms; i++) > + qcom_icc_bcm_voter_add(qp->voter, qn->bcms[i]); > } > EXPORT_SYMBOL_GPL(qcom_icc_pre_aggregate); > > @@ -44,10 +49,8 @@ int qcom_icc_aggregate(struct icc_node *node, u32 tag, u32 avg_bw, > { > size_t i; > struct qcom_icc_node *qn; > - struct qcom_icc_provider *qp; > > qn = node->data; > - qp = to_qcom_provider(node->provider); > > if (!tag) > tag = QCOM_ICC_TAG_ALWAYS; > @@ -67,9 +70,6 @@ int qcom_icc_aggregate(struct icc_node *node, u32 tag, u32 avg_bw, > *agg_avg += avg_bw; > *agg_peak = max_t(u32, *agg_peak, peak_bw); > > - for (i = 0; i < qn->num_bcms; i++) > - qcom_icc_bcm_voter_add(qp->voter, qn->bcms[i]); > - > return 0; > } > EXPORT_SYMBOL_GPL(qcom_icc_aggregate); > diff --git a/drivers/interconnect/qcom/sm8150.c b/drivers/interconnect/qcom/sm8150.c > index c76b2c7f9b10..b936196c229c 100644 > --- a/drivers/interconnect/qcom/sm8150.c > +++ b/drivers/interconnect/qcom/sm8150.c > @@ -627,7 +627,6 @@ static struct platform_driver qnoc_driver = { > .driver = { > .name = "qnoc-sm8150", > .of_match_table = qnoc_of_match, > - .sync_state = icc_sync_state, > }, > }; > module_platform_driver(qnoc_driver); > diff --git a/drivers/interconnect/qcom/sm8250.c b/drivers/interconnect/qcom/sm8250.c > index cc558fec74e3..40820043c8d3 100644 > --- a/drivers/interconnect/qcom/sm8250.c > +++ b/drivers/interconnect/qcom/sm8250.c > @@ -643,7 +643,6 @@ static struct platform_driver qnoc_driver = { > .driver = { > .name = "qnoc-sm8250", > .of_match_table = qnoc_of_match, > - .sync_state = icc_sync_state, > }, > }; > module_platform_driver(qnoc_driver);