Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp597394rdb; Tue, 5 Dec 2023 14:14:35 -0800 (PST) X-Google-Smtp-Source: AGHT+IHT172u52bPuewLccUr/efJOuW/JHmuSoR7mINKoZO2gI9HmAAIR6e5LwDxZiCUMfwI3lLi X-Received: by 2002:a05:6a00:2403:b0:6ce:2731:c234 with SMTP id z3-20020a056a00240300b006ce2731c234mr1635086pfh.35.1701814474812; Tue, 05 Dec 2023 14:14:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701814474; cv=none; d=google.com; s=arc-20160816; b=yFTCNWTNmIH66EuwBt3nBbOoBWnblPXDQXw/slvXf7v5JBegt/m/72oZdFS56dftaj z4XAPBgd7ntqg5sJHTAE9nHeAzfxEPz2Pj/t2Nc1+fjdHo50xPleA/FHdRlktxEJxGqq qYeObvc9fEtG1zvvES4K9QcTctW+KbwY2Od3WvPw77P5lyuq2Js2V12miZ3YAaM7jnr8 dEXAohmgSI+L5+logWoOpNR6bXiLpqsm+1jLLKutMfGu4nor9sB2zzDXUWGo5r4kMo4d vEnb1x+9Gmgv+VkSTLAvEi9b8E0xmQk1ERw4FgzWkhfNM861Ge2pcPYZpg7ihuhHg9OQ gqNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:message-id:content-transfer-encoding :mime-version:subject:date:from:dkim-signature; bh=qHf8U2nrlOqnmtlM/j+8/wfCbRl6t44vzQQ63+6e53Q=; fh=3mHdsJzgN8SuxuhDylb6VGHMKX72qCv2v8ANhAQS4vQ=; b=z6Y1gNnEEs2Knxomxbi7huGDHtqm0Umw6qNTBDzqS6v3KHC1FQpmcL8Sh2QymOhNg2 Cx5bg9O0FvsBp/cmfFq7lDW4WiIkdWpGn/arRApJ2fe7UVsTU/8mlhvCVSCNrZaOnbcW 3hp4ecygnA2+DUQf04QNwcqjF/TjHfhsPGBBjzMqyTXrBnGOTbrEQntfc3ora8BUvC/Q SevldbNXXvVYxkxedO7KU9OXNbgkRBimYBKvFJggDtyTLrmoSSZOZ4aWXk3Yvi9VNy6D yTX4XqGA/WUSG/CmRS3JSCxErtRczlZb9sVz/inoueJDonsWuIFKCEokXLxmOo3BEgyc IxUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=ZBf3v6nh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id j4-20020a056a00130400b006cdcd785487si10267836pfu.304.2023.12.05.14.14.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 14:14:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=ZBf3v6nh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 6C4D48047E50; Tue, 5 Dec 2023 14:14:32 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346334AbjLEWOL (ORCPT + 99 others); Tue, 5 Dec 2023 17:14:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44398 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229591AbjLEWOJ (ORCPT ); Tue, 5 Dec 2023 17:14:09 -0500 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C254B137; Tue, 5 Dec 2023 14:14:15 -0800 (PST) Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3B5Lp4sT018700; Tue, 5 Dec 2023 22:14:12 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : date : subject : mime-version : content-type : content-transfer-encoding : message-id : to : cc; s=qcppdkim1; bh=qHf8U2nrlOqnmtlM/j+8/wfCbRl6t44vzQQ63+6e53Q=; b=ZBf3v6nhsdgTawJHYhiGf3LoAQ8cxSf8jrz0H0fyR6+vxjQyRr3r/fBvYGxspU446qTh hCYh1ddCbfddPX6BeDFogPSzgiMZZ10z0nH6KsKUXL7urnrUycm7uwS3wycnLadcDPhr y6dzoiqW2UlBUkMILZJ8vyzTjH0Ag1SF+vfVYDFXXydCiLfVIE8v1GLf+yl9nek45d88 XeDBfPCDL/pS7MIFv36107NharPwFy09HG8s97fdg2V6Jrkb5YUzam9VWFvjW6/GcwV5 iiHKyDv/sPxDhUulYeI/nDlNdauDFZFNh3t3+InJ+nVUcVLwMTnKo9SthR5pNWgMQ4vl Qw== Received: from nalasppmta05.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3utaq6r7gt-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 05 Dec 2023 22:14:11 +0000 Received: from nalasex01c.na.qualcomm.com (nalasex01c.na.qualcomm.com [10.47.97.35]) by NALASPPMTA05.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 3B5MEALE029675 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 5 Dec 2023 22:14:10 GMT Received: from [169.254.0.1] (10.49.16.6) by nalasex01c.na.qualcomm.com (10.47.97.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Tue, 5 Dec 2023 14:14:10 -0800 From: Bjorn Andersson Date: Tue, 5 Dec 2023 14:14:00 -0800 Subject: [PATCH RFT] interconnect: qcom: icc-rpm: Fix peak rate calculation MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-ID: <20231205-qcom_icc_calc_rate-typo-v1-1-9d4378dcf53e@quicinc.com> X-B4-Tracking: v=1; b=H4sIAKegb2UC/x2NQQrCMBAAv1L2bKBZ24sP8AHiTSRstxu7EJM2q aKU/t3gcQaG2aBIVilwajbI8taiKVawhwZ4ovgQo2NlwBaPFtveLJyeTpkdU2CXaRWzfudkyPY djr7ziAi1HqiIGTJFnmofXyFUOWfx+vnvbnA5X+G+7z8MoLTvgwAAAA== To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Georgi Djakov CC: , , , , Bjorn Andersson X-Mailer: b4 0.12.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1701814450; l=1406; i=quic_bjorande@quicinc.com; s=20230915; h=from:subject:message-id; bh=IOiUqa5MIxZI2ZQuYicHMxdfvzg1T0CI18L5cTZyuSs=; b=TFtFYGhlEV2KqgcMa0undO9RfnVIsMY9h4Wm2eEncSDVe9bj0eGuLsRmbp/O8Kt7NN7gn4PrN39E zEcHcZnqAeaiZaWR+vm2ruP7fyDlQ6KOFK8SarfcvzjgLnLSnpSa X-Developer-Key: i=quic_bjorande@quicinc.com; a=ed25519; pk=VkhObtljigy9k0ZUIE1Mvr0Y+E1dgBEH9WoLQnUtbIM= X-Originating-IP: [10.49.16.6] X-ClientProxiedBy: nalasex01c.na.qualcomm.com (10.47.97.35) To nalasex01c.na.qualcomm.com (10.47.97.35) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: 5HaCI60Er8S7KpgSfKcEGcesPQx7zYLk X-Proofpoint-ORIG-GUID: 5HaCI60Er8S7KpgSfKcEGcesPQx7zYLk X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-12-05_18,2023-12-05_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 malwarescore=0 suspectscore=0 mlxlogscore=906 bulkscore=0 adultscore=0 priorityscore=1501 spamscore=0 clxscore=1011 phishscore=0 impostorscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311290000 definitions=main-2312050172 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Tue, 05 Dec 2023 14:14:32 -0800 (PST) Per the commit message of commit 'dd014803f260 ("interconnect: qcom: icc-rpm: Add AB/IB calculations coefficients")', the peak rate should be 100/ib_percent. But, in what looks like a typical typo, the numerator value is discarded in the calculation. Update the implementation to match the described intention. Fixes: dd014803f260 ("interconnect: qcom: icc-rpm: Add AB/IB calculations coefficients") Cc: stable@vger.kernel.org Signed-off-by: Bjorn Andersson --- Spotted while reading the code, patch is untested. --- drivers/interconnect/qcom/icc-rpm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/interconnect/qcom/icc-rpm.c b/drivers/interconnect/qcom/icc-rpm.c index fb54e78f8fd7..a8ed435f696c 100644 --- a/drivers/interconnect/qcom/icc-rpm.c +++ b/drivers/interconnect/qcom/icc-rpm.c @@ -307,7 +307,7 @@ static u64 qcom_icc_calc_rate(struct qcom_icc_provider *qp, struct qcom_icc_node if (qn->ib_coeff) { agg_peak_rate = qn->max_peak[ctx] * 100; - agg_peak_rate = div_u64(qn->max_peak[ctx], qn->ib_coeff); + agg_peak_rate = div_u64(agg_peak_rate, qn->ib_coeff); } else { agg_peak_rate = qn->max_peak[ctx]; } --- base-commit: 0f5f12ac05f36f117e793656c3f560625e927f1b change-id: 20231205-qcom_icc_calc_rate-typo-a1542df4f222 Best regards, -- Bjorn Andersson