Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp3074524pxv; Mon, 12 Jul 2021 08:42:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzOmK1NMSOhWsaKTBUX4WX8JTvP62QeZJg9puIBhynsdZNQ9Auiak6MYsJN02lkYwRAOsm1 X-Received: by 2002:a17:906:2cca:: with SMTP id r10mr51937382ejr.298.1626104555122; Mon, 12 Jul 2021 08:42:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626104555; cv=none; d=google.com; s=arc-20160816; b=SZ5stHXGhYQhkFjxSYni3/5NmT6PwvQOEP4CduG+/DMZyTXrQGjLb3KyqXiKaqClFY PzIEgjqT5SoIzhOuhqS+G1Q+J3mnfTjHM3urRcWWEUVm9U48ahEPd6flOQcjxOox7LP8 wodi7jhR/hgEyzbBZIFifugMToqL62wSlY9+t+Mn2wP9yLEB2Zo6PNn/iU+RFbUmE1tw ohwCAa//K8nKhkYeDhP/GiITRMeybVaVsG9qAWugzSk4lyJERI8lxc6pKjRFhfDNTN1r kM/OCSTuQ9ZOK2NvXcDiJE1fUbMPc2D54hMl2l50CDH90hdwK0v5CZU5d5TkxZ6uU+z6 2ktA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:references:cc :to:subject:from:dmarc-filter:sender:dkim-signature; bh=KVqF9QLdzAaHdNmKyTR6MevSTnWOxaAjQ+zmx82O5i4=; b=hVCEbaOm/48dq5jnl8K9chWxtlE231MapQ/lfyojf6dOGCJXK/0DFPwI36V2LsRHTL NQOC2zILHCVxHpoSx6yR2XmO8qD37Tqj0wRCV0JRW4zj6x6FVIr/au4dUV9GWlG/ttvN GS9z2loEssfDuO6owpnGGYWhDHVrlGGhCZw/8P7WCA9qOFPz/vPIT0Tv5miaQbk0ocER K8Sf+1K6HOkzO8xpKTN476P6LeQr+G/XkOurlAXj6ZpoyWhinNXUMEDdQhDOpJOvmAXT uDsPdLsSBqZQZcDa3GkPEMjdwQEa79HyMIUGKT57h9pC9IH2lf7n3tWyHcSSSiDSjOOR GmdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=YEdpexrP; 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 o8si19381912ejj.94.2021.07.12.08.42.11; Mon, 12 Jul 2021 08:42:35 -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=@mg.codeaurora.org header.s=smtp header.b=YEdpexrP; 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 S235516AbhGLPnV (ORCPT + 99 others); Mon, 12 Jul 2021 11:43:21 -0400 Received: from so254-9.mailgun.net ([198.61.254.9]:20811 "EHLO so254-9.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235498AbhGLPnU (ORCPT ); Mon, 12 Jul 2021 11:43:20 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1626104432; h=Content-Transfer-Encoding: Content-Type: In-Reply-To: MIME-Version: Date: Message-ID: References: Cc: To: Subject: From: Sender; bh=KVqF9QLdzAaHdNmKyTR6MevSTnWOxaAjQ+zmx82O5i4=; b=YEdpexrPNlBOGpdizQfazoGqrNOIZ0F/p0d6iwkmCj9p5My/b0XPDIUvW7f7HLCSP46zK/XQ o6VXj5LZXXhlAS3dWkFyJxkUlysIlIlwVcvjUhAMTsA5lu3uP96rk2xIP67/jDOcNXuAmbCV JRt9Or+irmYe1Ifkq2Wh8iG3GYU= X-Mailgun-Sending-Ip: 198.61.254.9 X-Mailgun-Sid: WyI0MWYwYSIsICJsaW51eC1rZXJuZWxAdmdlci5rZXJuZWwub3JnIiwgImJlOWU0YSJd Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n03.prod.us-east-1.postgun.com with SMTP id 60ec6251f30429861417df67 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Mon, 12 Jul 2021 15:40:01 GMT Sender: mdtipton=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id C8F7DC4338A; Mon, 12 Jul 2021 15:40:00 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.4 required=2.0 tests=ALL_TRUSTED,BAYES_00, NICE_REPLY_A,SPF_FAIL,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from [192.168.1.12] (pool-96-253-99-54.rcmdva.fios.verizon.net [96.253.99.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: mdtipton) by smtp.codeaurora.org (Postfix) with ESMTPSA id 01AB0C433D3; Mon, 12 Jul 2021 15:39:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 01AB0C433D3 Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=fail smtp.mailfrom=mdtipton@codeaurora.org From: Mike Tipton Subject: Re: [PATCH 2/4] interconnect: Always call pre_aggregate before aggregate To: okukatla@codeaurora.org Cc: djakov@kernel.org, bjorn.andersson@linaro.org, agross@kernel.org, saravanak@google.com, linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, mdtipton=codeaurora.org@codeaurora.org References: <20210625212839.24155-1-mdtipton@codeaurora.org> <20210625212839.24155-3-mdtipton@codeaurora.org> <000574efe90897c1738299cfba4fea7d@codeaurora.org> Message-ID: Date: Mon, 12 Jul 2021 08:39:57 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <000574efe90897c1738299cfba4fea7d@codeaurora.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 7/1/2021 11:55 AM, okukatla@codeaurora.org wrote: > On 2021-06-26 02:58, Mike Tipton wrote: >> 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 >> --- >>  drivers/interconnect/core.c | 5 ++++- >>  1 file changed, 4 insertions(+), 1 deletion(-) >> >> diff --git a/drivers/interconnect/core.c b/drivers/interconnect/core.c >> index 945121e18b5c..cfd54c90a6bb 100644 >> --- a/drivers/interconnect/core.c >> +++ b/drivers/interconnect/core.c >> @@ -973,9 +973,12 @@ void icc_node_add(struct icc_node *node, struct >> icc_provider *provider) >>      } >>      node->avg_bw = node->init_avg; >>      node->peak_bw = node->init_peak; >> -    if (provider->aggregate) >> +    if (provider->aggregate) { >> +        if (provider->pre_aggregate) >> +            provider->pre_aggregate(node); > nit: we can invoke pre_aggregate() out side of if (qcom_icc_aggregate). Sure, will update this. > >>          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;