Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp3768401pxt; Tue, 10 Aug 2021 10:52:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJytXpqeXYcgxJrg08EANdLnJDciMD5HPdgdBtJS9FcO6kJNRdjwEGKBtyHW66XA9LeorFE+ X-Received: by 2002:a92:870f:: with SMTP id m15mr406358ild.2.1628617971789; Tue, 10 Aug 2021 10:52:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628617971; cv=none; d=google.com; s=arc-20160816; b=pxOnQTXKLewCVhP9qDNESNz5GudaK1/W2zh+D5crrlTZIs56tNMt/PM1Oj2Sbm1/7E gV6ti3baTY3S2w/Zge6UE+4iRGERWdhihyskfgAlnbUYDGKCc350KDgqE95aGzP9mUWg tpl8pcJsBiSkEl9M6j5n4Ae1Sl1KVsK+qf4ZHXdCXnUA43A745MsQVuMZK1lGnT2c0+o vJrLpgq7/IPwG8Ful4TyygomklzbtYk95dMJh34BoGYHPDkFacNpwJMO7YgG2n2+wZr/ vVDnQtXAOVZCwI0ZSqpeV5FgFeYTiK/17NHruosJzOPWb/Ynms0q6DNDjq9VWYDIHlHw mIHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Egdjm0Kka1ETvbJIKpS4Xn3ngz1Nb7uEHcQROtnukz8=; b=BlL1fgnXqCP7GBKSQwDMyeMaQ74WruLtEPlnYbDA0L3Ro2FaeB471uObU1K4cYZ04u +dXJegc83n3FtR2QVrNjNJWgbbehyI3Bj+yOD6ZuTea9lif12vK1I2pqeRhIszcOS14o 3BJpgjnBuQQu+3md0yQ0xNgqXJ+hpaZQOcMDtotKIYuhnNmpMUuFjKFGbictPJk/8BU4 WuLsMV+zA4xOmRWDXhkD4fu0PFT/mN2t6D6ZqCvOOiPBeMbvUTYlPaXHWFIUPsJIlRdy SdaR2WpJhh+tTmgsblbv33Y1/jeDWOZlCU/G64b4l3lJsvh4WUts6xW07QSNaRwqUqiO bR4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=F+BTjqUa; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z10si416196jap.49.2021.08.10.10.52.39; Tue, 10 Aug 2021 10:52:51 -0700 (PDT) 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=@linuxfoundation.org header.s=korg header.b=F+BTjqUa; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233518AbhHJRvp (ORCPT + 99 others); Tue, 10 Aug 2021 13:51:45 -0400 Received: from mail.kernel.org ([198.145.29.99]:50908 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235393AbhHJRr5 (ORCPT ); Tue, 10 Aug 2021 13:47:57 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 5161E6108F; Tue, 10 Aug 2021 17:41:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1628617267; bh=FDWxW4OiFQUYwUrZcCCcVNylBIGPVM7fgBxvDxPhMSc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=F+BTjqUaqe5BSpJeaNBXWxN2ZTNG2cEiSJy8OdFKj9mTpr3mL295MK2T4xUPXfghJ VWW3GQlPydk1wlr5KmNq0PbXulltL4ceituO6pgp689AsHoLEGJ549538Hl1YDH2/c ZPIwoaDls9uVfawdYcy64qNZdNmAddWFoKnVXCAE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Mike Tipton , Georgi Djakov Subject: [PATCH 5.10 120/135] interconnect: qcom: icc-rpmh: Add BCMs to commit list in pre_aggregate Date: Tue, 10 Aug 2021 19:30:54 +0200 Message-Id: <20210810172959.873173619@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210810172955.660225700@linuxfoundation.org> References: <20210810172955.660225700@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Mike Tipton commit f84f5b6f72e68bbaeb850b58ac167e4a3a47532a 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. Fixes: 976daac4a1c5 ("interconnect: qcom: Consolidate interconnect RPMh support") Signed-off-by: Mike Tipton Link: https://lore.kernel.org/r/20210721175432.2119-5-mdtipton@codeaurora.org Signed-off-by: Georgi Djakov Signed-off-by: Greg Kroah-Hartman --- drivers/interconnect/qcom/icc-rpmh.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) --- 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_n { 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 * { 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 * *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);