Received: by 2002:a05:7412:6592:b0:d7:7d3a:4fe2 with SMTP id m18csp2408784rdg; Mon, 14 Aug 2023 01:11:57 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFBPSHgOu1Vke2WEupOhpOZvyDUcV/XN2XiJh8X/kYNTrRWPD0jOhTBrUMwXNk3yX5gPWzc X-Received: by 2002:a05:6a20:be1b:b0:133:3682:3cdf with SMTP id ge27-20020a056a20be1b00b0013336823cdfmr5852845pzb.11.1692000717542; Mon, 14 Aug 2023 01:11:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692000717; cv=none; d=google.com; s=arc-20160816; b=eyNPeF9ZMC9lQxKD7Vq3roIA6ck/503C488eVy5kwjGr/gif24qF2sr1i7WSV/qUJP WTaBaWKEjw+hP2VgdpGnJhxIXiTuyOPsfvCCNIr/4/1d05Y0r5szy45EK5Rc4+ppKTky Jmq+StosTXeB8Ryqd1ADDcy4mQU4tw5P67/AQjgRhqJkt9+qMTp2JGzWgsRC929pRE5+ /5u/IIUjcrpiWjWtJ7nXIGWc6XJhkL9Z66QcGqSi1p7PaY/ah/NIAHPqxylEH0Q7EK/Y zk9RwpwAK9xeqxwUZdvKEhZGVt615oo6Rmhuc3JEiF/vEDs2p7haiDQcklaXUSH7f2X7 sDMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=PH91XmqUN1fI9DurDEMHYEuhnWA8BRoqPYjP8RISXQc=; fh=CMB4tC2+DcmBbUi8nEOSGPRH7Ga/Y9fM+m8NdkHhHxU=; b=OygNLporReYjzrqqRpx7CZ43XOF3nrGgOkmX48XLzA1+MtQGL15CGUu2tPBvjOjDc+ TixN0AyOkQCiv8sY8inzdYN2UEA1MB5vE8WxeGtVQLxiNBKOVdQ/6NDApwqCoBPicgmg HrYmmFKIh3r67WZfYyRB2VXpnO7hfeS1wts6q2q9MD5usAjL8FhnReneHSY6IvkivzxR xikVRIyhTVn4ymiBPvp/TsfyJ8xEpk5sfqGgw53U4Nw1M6sbEL/LMNxIC7CLaf93S932 FLWL8kW1j82iN5zPM4sHZmVqwMJFenD83GPjEGJ/qoHcesQB60YFX+oxObI9czQB3pWe l+XQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cd11-20020a056a00420b00b006870ae2d479si7563059pfb.354.2023.08.14.01.11.45; Mon, 14 Aug 2023 01:11:57 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232950AbjHNHzG (ORCPT + 99 others); Mon, 14 Aug 2023 03:55:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41900 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234387AbjHNHyo (ORCPT ); Mon, 14 Aug 2023 03:54:44 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id A00F210CE; Mon, 14 Aug 2023 00:54:35 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id AC2072F4; Mon, 14 Aug 2023 00:55:17 -0700 (PDT) Received: from pluto (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 12ABC3F6C4; Mon, 14 Aug 2023 00:54:33 -0700 (PDT) Date: Mon, 14 Aug 2023 08:54:23 +0100 From: Cristian Marussi To: Sibi Sankar Cc: sudeep.holla@arm.com, lukasz.luba@arm.com, 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, Chandra Sekhar Lingutla Subject: Re: [PATCH] firmware: arm_scmi: Fixup perf microwatt support Message-ID: References: <20230811204818.30928-1-quic_sibis@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230811204818.30928-1-quic_sibis@quicinc.com> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_NONE 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: X-Mailing-List: linux-kernel@vger.kernel.org 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 > Fixes: 3630cd8130ce ("firmware: arm_scmi: Add SCMI v3.1 perf power-cost in microwatts") > Signed-off-by: Sibi Sankar > --- > drivers/firmware/arm_scmi/perf.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > Hi, LGTM. Reviewed-by: Cristian Marussi 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 >