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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 02DE1C48260 for ; Tue, 13 Feb 2024 08:30:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:From:References:CC:To:Subject: MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=EsMv/qLgnjxNGpXxFfPKFor+/dRyQT/cWEJ9zwvnVCM=; b=KJE3yYYdFA2xSn 9vgJiAUJSQQkWifT5QjEhVO+4yxzjc6ZhWmzkPChEhc4Jae6zY9yu9iA+akD4n/b//N8M4ZqWNR8J KqK3UecBLkgY+Bp5wTW13BNLLpyxSGx9bVuZ/EQ2va266A/jQotqlj9Eg38z4X7CPmgqdUtXQeto/ nkEqk/oOa+2zdXf1jKuml7Fpkq7fPX+E/ue2jqybDJuL+6PTBHeO/wVrd7f7xFjpf3LiGjD6AGpFh O6AaB5aSWdB5W6PZs2RgqrerQIfSemW8oyblZEQ+DBtdhFFiD3UOZt66Aci46K97UrulP7L7pDUJq GHIxZShQiF4o3pqk5k7g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rZoBN-00000008RO3-2AfE; Tue, 13 Feb 2024 08:30:25 +0000 Received: from mx0a-0031df01.pphosted.com ([205.220.168.131]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rZoBK-00000008RMp-1tjx for linux-arm-kernel@lists.infradead.org; Tue, 13 Feb 2024 08:30:23 +0000 Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 41D7sqBM021912; Tue, 13 Feb 2024 08:30:17 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= message-id:date:mime-version:subject:to:cc:references:from :in-reply-to:content-type:content-transfer-encoding; s= qcppdkim1; bh=G67nKLCfr69ua9V5FD95/88WYmttYaFQ1WldH+6JbI0=; b=SQ DdGGw8OFWs1sbi1pnkn+ZCMg+C2jy3WTJ/wgN/VMEfmsEbgSaKt8yrCyePn3z6V5 cp1A7s2lVlHDiBDocsg/k6teuzbB4DTDaMaqazA90bVep1AxkAENMTNuoNLO1rDv xYx1visa/BiluY2RO+0kVV4Jc3TZB1Z/6Bwb9A7CbyKIaKSFFhr0zXnxa6lUAkDX cTdYQipPhCCOGdxMplwes3MLUE6uQT6lJB3lqktVjfQ6EgJv4IT6YiI0fXmof++A RTmjH3daHVb8A1LdLA2rXdeB2R/v+V/B2Kys4KXIbwEGycz8/sgkSzsqwkW1Dw5h 75nnbcUF1LTlljGbT1YQ== Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3w7tans216-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 13 Feb 2024 08:30:17 +0000 (GMT) Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA04.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 41D8UFXa017426 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 13 Feb 2024 08:30:15 GMT Received: from [10.131.33.37] (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Tue, 13 Feb 2024 00:30:11 -0800 Message-ID: Date: Tue, 13 Feb 2024 14:00:07 +0530 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [PATCH 2/3] firmware: arm_scmi: Add support for marking certain frequencies as boost Content-Language: en-US To: Sudeep Holla CC: , , , , , , , , , , , , References: <20240117110443.2060704-1-quic_sibis@quicinc.com> <20240117110443.2060704-3-quic_sibis@quicinc.com> <20240131112507.fu355wnolbsoiqxn@bogus> From: Sibi Sankar In-Reply-To: <20240131112507.fu355wnolbsoiqxn@bogus> X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: 0BgYND4qgUQPRb4w_MYqK9jjanG_uF7u X-Proofpoint-ORIG-GUID: 0BgYND4qgUQPRb4w_MYqK9jjanG_uF7u X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-02-13_04,2024-02-12_03,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 malwarescore=0 clxscore=1015 lowpriorityscore=0 spamscore=0 impostorscore=0 mlxlogscore=999 bulkscore=0 priorityscore=1501 suspectscore=0 adultscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2401310000 definitions=main-2402130065 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240213_003022_580464_2AD3020D X-CRM114-Status: GOOD ( 25.05 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 1/31/24 16:55, Sudeep Holla wrote: > On Wed, Jan 17, 2024 at 04:34:42PM +0530, Sibi Sankar wrote: >> All opps above the sustained level/frequency are treated as boost, so mark >> them accordingly. >> >> Suggested-by: Sudeep Holla >> Signed-off-by: Sibi Sankar >> --- >> drivers/firmware/arm_scmi/perf.c | 11 ++++++++++- >> 1 file changed, 10 insertions(+), 1 deletion(-) >> >> diff --git a/drivers/firmware/arm_scmi/perf.c b/drivers/firmware/arm_scmi/perf.c >> index e286f04ee6e3..d3fb8c804b3d 100644 >> --- a/drivers/firmware/arm_scmi/perf.c >> +++ b/drivers/firmware/arm_scmi/perf.c >> @@ -811,7 +811,7 @@ static int scmi_dvfs_device_opps_add(const struct scmi_protocol_handle *ph, >> struct device *dev, u32 domain) >> { >> int idx, ret; >> - unsigned long freq; >> + unsigned long freq, sustained_freq; >> struct dev_pm_opp_data data = {}; >> struct perf_dom_info *dom; >> >> @@ -819,12 +819,21 @@ static int scmi_dvfs_device_opps_add(const struct scmi_protocol_handle *ph, >> if (IS_ERR(dom)) >> return PTR_ERR(dom); >> >> + if (!dom->level_indexing_mode) >> + sustained_freq = dom->sustained_perf_level * dom->mult_factor; >> + else >> + sustained_freq = dom->sustained_freq_khz * dom->mult_factor; >> + > > Can't we just use dom->sustained_freq_khz * 1000UL in both the cases ? sure, I retained sustained_perf_level because I wasn't sure how the sustained_perf_level would be populated in systems not using level indexing mode. > > Other than that this series looks good to me but it would be good to > explain how you would use this. Since it is enabled by default, do you > plan to disable boost at time and when ? If it is for thermal reasons, > why your other series handling thermal and limits notification from the > firmware not sufficient. Boost frequencies defined in X1E are achievable by only one CPU in a cluster i.e. either the other CPUs in the same cluster should be in low power mode or offline. So it's mostly for book keeping i.e. we wouldn't to intimate incorrectly that the CPUs are running at max possible frequency when it's actually running at a lower frequency. -Sibi > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel