Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp3768061pxt; Tue, 10 Aug 2021 10:52:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyX1hDcaHYSTYn+9uI832av0UKQaNKiiTzQk8HCWlKYkAkBsN8S1akiaKajldl9xVhdKPOD X-Received: by 2002:a05:6e02:108f:: with SMTP id r15mr132280ilj.281.1628617940180; Tue, 10 Aug 2021 10:52:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628617940; cv=none; d=google.com; s=arc-20160816; b=Wim3w2O8nTWtgbMi6SasxMsqZwMk0+MkFhdYKWWOkISY+IFX7Ehk4kPQq8lKvZWt/N h7CqriapMhHvPKxwsL1Hh7AMGx7ysrYk22j1VBaax6/W9NUXrdu2WxBLwARb7xIGUP+8 iyX0DHVGwxTK5IiO5Yru+IMws9OXYcHljk/uuV1tlFJx9ClC+IJBYEbmGw1UOLAxjkkP Q6yxgYrjvKDtXSldeSZJmzWxxRFWjuNXS54+TomxT0p9GAltp4OBNIEnc3z8EqXVkT4B n7wQ55+TKTo+mnTPp/TaxKGln9sDW6ScB4hl9N0rbQaWsyyWL+I907mA2q98A/5XoTFx yLYQ== 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=wm6xkx3J/c0H3miRPeAcsS/ehBP+fQJwgLuu1dsuR6g=; b=h/esayBJGB6Ax4TVRBwPcicMGXE+GJvCFuiCvFs9hGD2xFEvbFDayP8IhMtG2IHqSI 2o4oFddZXINUaQE6vk6m+NXh0aZDwfodZUjQym/W6E6e5J5eBonH36g7pzbgC0NU55o7 qWF07ZQnEK3iivkmPQsILo2Ok0eNUCHgc+KAd+SlRgJOT1L5zeM8On7x1HsZb+P5vJqo JdM6zQBILuwVUp5wGL4KKNwmruvWrn76jSQ7e2iJfdrQzGVX7OjgYjoyhMYeFtJDDSMd h8WvgFOwj1+zYoezRtCMW0xx1A0JHFVfF7lOasji5pjkHgm0tAqjIUhSLa+5kqY4VmJp M47Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=bZ3p0G+g; 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 m1si25652277ilu.13.2021.08.10.10.52.08; Tue, 10 Aug 2021 10:52:20 -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=bZ3p0G+g; 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 S234999AbhHJRvr (ORCPT + 99 others); Tue, 10 Aug 2021 13:51:47 -0400 Received: from mail.kernel.org ([198.145.29.99]:56806 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235248AbhHJRr5 (ORCPT ); Tue, 10 Aug 2021 13:47:57 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id D4F776023D; Tue, 10 Aug 2021 17:41:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1628617263; bh=pDdLwGfN7E6ybMm18yH4Jbx6PvgDlvXVc+EYZDqlKyI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bZ3p0G+gZ75uVjIXDMWOCOrxvo6wAsr9NLRi5xpns4n+e7Ej9+XXSeQNUW/BboOm1 AWgwa11oVx3T2W8jV1IKGuurYWvQ0NfI6epfyIPEsOMvCp5tE60kKkT4OLHZr1IORK 40FYObgn60bZi3speHHtfUskl0vRUWiNe2niYwy8= 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 118/135] interconnect: Always call pre_aggregate before aggregate Date: Tue, 10 Aug 2021 19:30:52 +0200 Message-Id: <20210810172959.802675667@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 73606ba9242f8e32023699b500b7922b4cf2993c upstream. The pre_aggregate callback isn't called in all cases before calling aggregate. Add the missing calls so providers can rely on consistent framework behavior. Fixes: d3703b3e255f ("interconnect: Aggregate before setting initial bandwidth") Signed-off-by: Mike Tipton Link: https://lore.kernel.org/r/20210721175432.2119-3-mdtipton@codeaurora.org Signed-off-by: Georgi Djakov Signed-off-by: Greg Kroah-Hartman --- drivers/interconnect/core.c | 5 +++++ 1 file changed, 5 insertions(+) --- a/drivers/interconnect/core.c +++ b/drivers/interconnect/core.c @@ -973,9 +973,14 @@ void icc_node_add(struct icc_node *node, } node->avg_bw = node->init_avg; node->peak_bw = node->init_peak; + + if (provider->pre_aggregate) + provider->pre_aggregate(node); + if (provider->aggregate) provider->aggregate(node, 0, node->init_avg, node->init_peak, &node->avg_bw, &node->peak_bw); + provider->set(node, node); node->avg_bw = 0; node->peak_bw = 0;