Message ID | 20230811204818.30928-1-quic_sibis@quicinc.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b824:0:b0:3f2:4152:657d with SMTP id z4csp1403027vqi; Fri, 11 Aug 2023 15:59:36 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFOo3jkyjoA2ZMaAqtQKzkfXERkiAGLwLykq/1p1xF1dB7CXfispJDJlp3AShKNw/Wkfbb1 X-Received: by 2002:a05:6a20:d5:b0:13e:427e:ff18 with SMTP id 21-20020a056a2000d500b0013e427eff18mr3867615pzh.62.1691794775839; Fri, 11 Aug 2023 15:59:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691794775; cv=none; d=google.com; s=arc-20160816; b=IuM0UN9pQC3EzMMui8aopPzoHx9zMDyVNEAAJUWJ4kc4rwtSAladl31DaV4QdNQphY x7qYh8t5bBSa26X+RJhnxD9CNDP+ll2j38NCNMEg1+Tb3Y0enYFTLHHrypMt8ahSG8re v+ZFX4ez74oLKJw4poQFHmn4yDSZ8i5i9uMJhWLi9Y8jvBRwU75MlYUWnw2ZALJ2WjPP AVfoYF4HWhtjjJ83TeILWxz7BC0oJCa9zJXhHkshbYcZkyya0r5oFyZ19U/PB7oc1Hy/ fN5p9rwcjXC/IaU2dtX5YVrH/4/5BwirW/oWDeLtv2CgL4kBjIINBt56YL48CmPk/IP+ qLhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from :dkim-signature; bh=cflUzEaWx29nL/vxxURuqfdfo+2qrB5uMsLChz0yjS0=; fh=DBxf6osa4s9RWu5yPm25gmAEycRXH8xyMwcik2crKpI=; b=ryDmdhNjEnaM7l5FMt/RUHWdCjYbqECdASYMizLVy5tyNTsQJNJd65YR+pdSd4ZP9B IMjcFLr7yVAVJbsadi6aPFyL1hgiBR1bkeNw88ffnfML5LmOW3IF1LKm5gz4FHCuQ6Y1 ui1vEuMiALVuYw5EojQLjRQrsQDNlLzcLjY9Ldsrx2jmCEkMoEGv2VL90Bc1mUBcntxE +fqZODQUJuPgJ3zvcz9sreZomQ3UkP3SU5ybo7vH+dScwEOa72xp3ni3o2yn35OUscpC sEVO5otTpF/hw64i9ap6mAlqQhIn8YoIDw5TfolTVNxWxv4LY7OBrPEB31gSmUSJrepW rkXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=JZ0UYZ1F; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b10-20020a630c0a000000b00563ef54582bsi4005875pgl.105.2023.08.11.15.59.23; Fri, 11 Aug 2023 15:59:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=JZ0UYZ1F; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236021AbjHKUtX (ORCPT <rfc822;lanlanxiyiji@gmail.com> + 99 others); Fri, 11 Aug 2023 16:49:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40854 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236903AbjHKUs7 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 11 Aug 2023 16:48:59 -0400 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8245330DF; Fri, 11 Aug 2023 13:48:58 -0700 (PDT) Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 37BKbeCK024125; Fri, 11 Aug 2023 20:48:50 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id : mime-version : content-type; s=qcppdkim1; bh=cflUzEaWx29nL/vxxURuqfdfo+2qrB5uMsLChz0yjS0=; b=JZ0UYZ1FpdXf436ZjtQUohAeIR/YZ7jhUJJYhvmPuBEOKkb+BusuS9m8/ygZlRRW5isw aYRlI2edO5Q9yMwa5hHXmzdaIjr9qt9jkPJiqN2XmuyOC3f5RbuKDypqZjXPZx2oQmnA yAEu0vTzjLaUHONpA6gXtnFUQwmzQcaqGHzNqH+BobxZHrLH6N4vNrvyb7vbgXWiAy2y 4rdGi4rrA+Qo9H0t7ThRwRd/r71SdtwdpAqFmS4yfcxpgSeFPJTHueAbAG2M1GRYRQKY X5Kt/hphl468HtazZHEtliWO15hzQKxzOpWjauTzSPRlBBcNEnTNdZF3LR/hZRJuHApS Gw== Received: from nalasppmta01.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3sd9062qyc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 11 Aug 2023 20:48:49 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 37BKmm5Y007231 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 11 Aug 2023 20:48:48 GMT Received: from blr-ubuntu-87.ap.qualcomm.com (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.30; Fri, 11 Aug 2023 13:48:45 -0700 From: Sibi Sankar <quic_sibis@quicinc.com> To: <sudeep.holla@arm.com>, <cristian.marussi@arm.com>, <lukasz.luba@arm.com> CC: <linux-arm-msm@vger.kernel.org>, <linux-kernel@vger.kernel.org>, <linux-arm-kernel@lists.infradead.org>, <quic_rjendra@quicinc.com>, <srinivas.kandagatla@linaro.org>, Sibi Sankar <quic_sibis@quicinc.com>, Chandra Sekhar Lingutla <quic_lingutla@quicinc.com> Subject: [PATCH] firmware: arm_scmi: Fixup perf microwatt support Date: Sat, 12 Aug 2023 02:18:18 +0530 Message-ID: <20230811204818.30928-1-quic_sibis@quicinc.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain 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: fUGMSjhW--y1csfsf7jrO3m2f6kGQiPf X-Proofpoint-ORIG-GUID: fUGMSjhW--y1csfsf7jrO3m2f6kGQiPf X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-08-11_12,2023-08-10_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 phishscore=0 impostorscore=0 lowpriorityscore=0 priorityscore=1501 adultscore=0 suspectscore=0 malwarescore=0 mlxscore=0 clxscore=1011 spamscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2306200000 definitions=main-2308110191 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773975398690485599 X-GMAIL-MSGID: 1773975398690485599 |
Series |
firmware: arm_scmi: Fixup perf microwatt support
|
|
Commit Message
Sibi Sankar
Aug. 11, 2023, 8:48 p.m. UTC
The perf power scale value would currently be reported as bogowatts if the
platform firmware supports microwatt power scale and meets the perf major
version requirements. Fix this by populating version information in the
driver private data before the call to protocol attributes is made.
CC: Chandra Sekhar Lingutla <quic_lingutla@quicinc.com>
Fixes: 3630cd8130ce ("firmware: arm_scmi: Add SCMI v3.1 perf power-cost in microwatts")
Signed-off-by: Sibi Sankar <quic_sibis@quicinc.com>
---
drivers/firmware/arm_scmi/perf.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Comments
On Sat, Aug 12, 2023 at 02:18:18AM +0530, Sibi Sankar wrote: > The perf power scale value would currently be reported as bogowatts if the > platform firmware supports microwatt power scale and meets the perf major > version requirements. Fix this by populating version information in the > driver private data before the call to protocol attributes is made. > > CC: Chandra Sekhar Lingutla <quic_lingutla@quicinc.com> > Fixes: 3630cd8130ce ("firmware: arm_scmi: Add SCMI v3.1 perf power-cost in microwatts") > Signed-off-by: Sibi Sankar <quic_sibis@quicinc.com> > --- > drivers/firmware/arm_scmi/perf.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > Hi, LGTM. Reviewed-by: Cristian Marussi <cristian.marussi@arm.com> Thanks, Cristian > diff --git a/drivers/firmware/arm_scmi/perf.c b/drivers/firmware/arm_scmi/perf.c > index c0cd556fbaae..30dedd6ebfde 100644 > --- a/drivers/firmware/arm_scmi/perf.c > +++ b/drivers/firmware/arm_scmi/perf.c > @@ -1080,6 +1080,8 @@ static int scmi_perf_protocol_init(const struct scmi_protocol_handle *ph) > if (!pinfo) > return -ENOMEM; > > + pinfo->version = version; > + > ret = scmi_perf_attributes_get(ph, pinfo); > if (ret) > return ret; > @@ -1104,8 +1106,6 @@ static int scmi_perf_protocol_init(const struct scmi_protocol_handle *ph) > if (ret) > return ret; > > - pinfo->version = version; > - > return ph->set_priv(ph, pinfo); > } > > -- > 2.17.1 >
On Sat, Aug 12, 2023 at 02:18:18AM +0530, Sibi Sankar wrote: > The perf power scale value would currently be reported as bogowatts if the > platform firmware supports microwatt power scale and meets the perf major > version requirements. Fix this by populating version information in the > driver private data before the call to protocol attributes is made. > > CC: Chandra Sekhar Lingutla <quic_lingutla@quicinc.com> > Fixes: 3630cd8130ce ("firmware: arm_scmi: Add SCMI v3.1 perf power-cost in microwatts") > Signed-off-by: Sibi Sankar <quic_sibis@quicinc.com> > --- > drivers/firmware/arm_scmi/perf.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/firmware/arm_scmi/perf.c b/drivers/firmware/arm_scmi/perf.c > index c0cd556fbaae..30dedd6ebfde 100644 > --- a/drivers/firmware/arm_scmi/perf.c > +++ b/drivers/firmware/arm_scmi/perf.c > @@ -1080,6 +1080,8 @@ static int scmi_perf_protocol_init(const struct scmi_protocol_handle *ph) Please rebase any patch when posting upstream on upstream kernel tree. This definitely looks like some downstream tree. I will adjust and apply this time. This file never crossed 1000 line and this patch indicates otherwise, so I am sure Qcom has some downstream changes in this file now.
Hey Sudeep, On 8/14/23 14:55, Sudeep Holla wrote: > On Sat, Aug 12, 2023 at 02:18:18AM +0530, Sibi Sankar wrote: >> The perf power scale value would currently be reported as bogowatts if the >> platform firmware supports microwatt power scale and meets the perf major >> version requirements. Fix this by populating version information in the >> driver private data before the call to protocol attributes is made. >> >> CC: Chandra Sekhar Lingutla <quic_lingutla@quicinc.com> >> Fixes: 3630cd8130ce ("firmware: arm_scmi: Add SCMI v3.1 perf power-cost in microwatts") >> Signed-off-by: Sibi Sankar <quic_sibis@quicinc.com> >> --- >> drivers/firmware/arm_scmi/perf.c | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/drivers/firmware/arm_scmi/perf.c b/drivers/firmware/arm_scmi/perf.c >> index c0cd556fbaae..30dedd6ebfde 100644 >> --- a/drivers/firmware/arm_scmi/perf.c >> +++ b/drivers/firmware/arm_scmi/perf.c >> @@ -1080,6 +1080,8 @@ static int scmi_perf_protocol_init(const struct scmi_protocol_handle *ph) > > Please rebase any patch when posting upstream on upstream kernel tree. > This definitely looks like some downstream tree. I will adjust and apply > this time. This file never crossed 1000 line and this patch indicates > otherwise, so I am sure Qcom has some downstream changes in this file now. Thanks for taking time to review the patch but zero points for the ^^ deduction lol. The correct phrasing would be v6.5 rc6 hasn't crossed 1k lines but the patch was based on next-20230809 which has the perf level indexing mode support in addition :) - Sibi >
On Mon, Aug 14, 2023 at 09:43:37PM +0530, Sibi Sankar wrote: > Hey Sudeep, > > On 8/14/23 14:55, Sudeep Holla wrote: > > On Sat, Aug 12, 2023 at 02:18:18AM +0530, Sibi Sankar wrote: > > > The perf power scale value would currently be reported as bogowatts if the > > > platform firmware supports microwatt power scale and meets the perf major > > > version requirements. Fix this by populating version information in the > > > driver private data before the call to protocol attributes is made. > > > > > > CC: Chandra Sekhar Lingutla <quic_lingutla@quicinc.com> > > > Fixes: 3630cd8130ce ("firmware: arm_scmi: Add SCMI v3.1 perf power-cost in microwatts") > > > Signed-off-by: Sibi Sankar <quic_sibis@quicinc.com> > > > --- > > > drivers/firmware/arm_scmi/perf.c | 4 ++-- > > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > > > diff --git a/drivers/firmware/arm_scmi/perf.c b/drivers/firmware/arm_scmi/perf.c > > > index c0cd556fbaae..30dedd6ebfde 100644 > > > --- a/drivers/firmware/arm_scmi/perf.c > > > +++ b/drivers/firmware/arm_scmi/perf.c > > > @@ -1080,6 +1080,8 @@ static int scmi_perf_protocol_init(const struct scmi_protocol_handle *ph) > > > > Please rebase any patch when posting upstream on upstream kernel tree. > > This definitely looks like some downstream tree. I will adjust and apply > > this time. This file never crossed 1000 line and this patch indicates > > otherwise, so I am sure Qcom has some downstream changes in this file now. > > Thanks for taking time to review the patch but zero points for the ^^ > deduction lol. The correct phrasing would be v6.5 rc6 hasn't crossed 1k > lines but the patch was based on next-20230809 which has the perf level > indexing mode support in addition :) You are right. Cristian reminded me about v3.2 perf changes in -next after I replied on this thread. I saw this as fix and was looking at only upstream tree and this didn't apply cleanly.
On Sat, 12 Aug 2023 02:18:18 +0530, Sibi Sankar wrote: > The perf power scale value would currently be reported as bogowatts if the > platform firmware supports microwatt power scale and meets the perf major > version requirements. Fix this by populating version information in the > driver private data before the call to protocol attributes is made. > Applied to sudeep.holla/linux (for-next/scmi/fixes), thanks! [1/1] firmware: arm_scmi: Fixup perf microwatt support https://git.kernel.org/sudeep.holla/c/c3638b851bc1 -- Regards, Sudeep
diff --git a/drivers/firmware/arm_scmi/perf.c b/drivers/firmware/arm_scmi/perf.c index c0cd556fbaae..30dedd6ebfde 100644 --- a/drivers/firmware/arm_scmi/perf.c +++ b/drivers/firmware/arm_scmi/perf.c @@ -1080,6 +1080,8 @@ static int scmi_perf_protocol_init(const struct scmi_protocol_handle *ph) if (!pinfo) return -ENOMEM; + pinfo->version = version; + ret = scmi_perf_attributes_get(ph, pinfo); if (ret) return ret; @@ -1104,8 +1106,6 @@ static int scmi_perf_protocol_init(const struct scmi_protocol_handle *ph) if (ret) return ret; - pinfo->version = version; - return ph->set_priv(ph, pinfo); }