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 66709C88CB2 for ; Tue, 13 Jun 2023 09:06:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241548AbjFMJGw (ORCPT ); Tue, 13 Jun 2023 05:06:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36792 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240748AbjFMJGt (ORCPT ); Tue, 13 Jun 2023 05:06:49 -0400 Received: from mail-lf1-x12e.google.com (mail-lf1-x12e.google.com [IPv6:2a00:1450:4864:20::12e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1AAD51B3 for ; Tue, 13 Jun 2023 02:06:47 -0700 (PDT) Received: by mail-lf1-x12e.google.com with SMTP id 2adb3069b0e04-4f65779894eso5298810e87.1 for ; Tue, 13 Jun 2023 02:06:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1686647205; x=1689239205; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=k24Lafsnyyipy4bbdfe0wwTh9zApI1J6ii/T/AgJk2Q=; b=yTGx/fLt7Qp+oiLbviwb5H1L4TejgbG24LlseJOOnCI2aStf8k0cLLLpVtodVKwS0T 9FQLyrjzjaVZYZk5LI2d89M23GMQKO7LVe3zUYzTOCpkhkYHsHKAJHTAYREU0vFUljE6 h4YVyAhT6S+q50CEbnhQ9M5n5Rsx2zK7PjOJlcp5ZdgkHhwDBu0M8/C3pctIHKJRo3Dl ql/8HnWA+ShqpJdHXS7BbXFPjBYvSXsmaLphcMLCOKaDz8kcbtgQZj5OCSM9OgB7RvoO PB6MA5ztb82/vtjXFwYiUR8VSs0UTz5NbV+G9VE0iTqPkDUldQS4qwA2Iygv5w0DIh2H jMzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686647205; x=1689239205; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=k24Lafsnyyipy4bbdfe0wwTh9zApI1J6ii/T/AgJk2Q=; b=cITj44fw6862KmkgngeOqU6YXxLkhS/75jHH1F927ONsdEp5BgcO53mEsGQfbwJsDa HT3+rv/X51gNHg/hnihj/Z0IkneITRrA8wvE9MPD78KF+zywI35YOAamZnGvrpRs0Aal jnHZaWC11d4zm1Dumqn6dmccZ1HIyVawT0e/qRsLkesX1nhev3VFg9eLzu8tD6LG+Q6H 8VDOFvjyecRc+K380nlL2YOAatvtfNZh4RgrkxNI0ZYDwXwEbDTB+BoC7qexqQrdlNi5 THg4jsDv4dZmU7egFc7tuLTxE6za50Yh49kvgmIcc57ja/XgHPlPQwE07Yg+swfHD3r5 Cj5g== X-Gm-Message-State: AC+VfDxZhvgY8ZhfKC47i86LUcRubko1nnih5WW2w0NS8mNXDqZtQnKN +oNcvl2HwnJ1vpI2uYY1M+cOWQ== X-Google-Smtp-Source: ACHHUZ4kGtn5iyYh44KfD7k/afWcN7Di/N0xVMwtASdAptlWTKfnyJmL3XYi3+US9VxHmcWPg9rrFA== X-Received: by 2002:a2e:81ca:0:b0:295:d7a8:559b with SMTP id s10-20020a2e81ca000000b00295d7a8559bmr3237895ljg.10.1686647205174; Tue, 13 Jun 2023 02:06:45 -0700 (PDT) Received: from [192.168.1.101] (abyj190.neoplus.adsl.tpnet.pl. [83.9.29.190]) by smtp.gmail.com with ESMTPSA id r10-20020a2e94ca000000b002b0488ef239sm2067426ljh.93.2023.06.13.02.06.43 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 13 Jun 2023 02:06:44 -0700 (PDT) Message-ID: Date: Tue, 13 Jun 2023 11:06:43 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.2 Subject: Re: [PATCH v3 20/23] interconnect: qcom: icc-rpm: Fix bucket number To: Stephan Gerhold Cc: Andy Gross , Bjorn Andersson , Michael Turquette , Stephen Boyd , Georgi Djakov , Leo Yan , Evan Green , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Marijn Suijten , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, Dmitry Baryshkov References: <20230526-topic-smd_icc-v3-0-5fb7d39b874f@linaro.org> <20230526-topic-smd_icc-v3-20-5fb7d39b874f@linaro.org> Content-Language: en-US From: Konrad Dybcio In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org On 12.06.2023 22:57, Stephan Gerhold wrote: > On Mon, Jun 12, 2023 at 08:24:37PM +0200, Konrad Dybcio wrote: >> SMD RPM only provides two buckets, one each for the active-only and >> active-sleep RPM contexts. Use the correct constant to allocate and >> operate on them. >> >> This will make the qcom,icc.h header no longer work with this driver, >> mostly because.. it was never meant to! The commit that introduced >> bucket support to SMD RPM was trying to shove a square into a round >> hole and it did not work out very well. That said, there are no >> active users of SMD RPM ICC + qcom,icc.h, so that doesn't hurt. >> >> Fixes: dcbce7b0a79c ("interconnect: qcom: icc-rpm: Support multiple buckets") >> Reviewed-by: Dmitry Baryshkov >> Signed-off-by: Konrad Dybcio >> --- >> drivers/interconnect/qcom/icc-rpm.c | 14 +++++++------- >> drivers/interconnect/qcom/icc-rpm.h | 4 ++-- >> 2 files changed, 9 insertions(+), 9 deletions(-) >> >> diff --git a/drivers/interconnect/qcom/icc-rpm.c b/drivers/interconnect/qcom/icc-rpm.c >> index 5ffcf5ca8914..54a9999fe55d 100644 >> --- a/drivers/interconnect/qcom/icc-rpm.c >> +++ b/drivers/interconnect/qcom/icc-rpm.c >> @@ -249,7 +249,7 @@ static void qcom_icc_pre_bw_aggregate(struct icc_node *node) >> size_t i; >> >> qn = node->data; >> - for (i = 0; i < QCOM_ICC_NUM_BUCKETS; i++) { >> + for (i = 0; i < QCOM_SMD_RPM_STATE_NUM; i++) { >> qn->sum_avg[i] = 0; >> qn->max_peak[i] = 0; >> } >> @@ -275,7 +275,7 @@ static int qcom_icc_bw_aggregate(struct icc_node *node, u32 tag, u32 avg_bw, >> if (!tag) >> tag = QCOM_ICC_TAG_ALWAYS; > > We should replace this with the RPM variant. Also, can you check which > header/file still includes qcom,icc.h? Don't think we should have it > included at all for RPM so that referencing the wrong things cannot > happen. Nice catch Konrad > > Thanks, > Stephan