* [PATCH] firmware: arm_scmi: Fixup perf microwatt support
@ 2023-08-11 20:48 Sibi Sankar
2023-08-14 7:54 ` Cristian Marussi
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Sibi Sankar @ 2023-08-11 20:48 UTC (permalink / raw)
To: sudeep.holla, cristian.marussi, lukasz.luba
Cc: linux-arm-msm, linux-kernel, linux-arm-kernel, quic_rjendra,
srinivas.kandagatla, Sibi Sankar, Chandra Sekhar Lingutla
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)
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
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] firmware: arm_scmi: Fixup perf microwatt support
2023-08-11 20:48 [PATCH] firmware: arm_scmi: Fixup perf microwatt support Sibi Sankar
@ 2023-08-14 7:54 ` Cristian Marussi
2023-08-14 9:25 ` Sudeep Holla
2023-09-20 13:42 ` Sudeep Holla
2 siblings, 0 replies; 6+ messages in thread
From: Cristian Marussi @ 2023-08-14 7:54 UTC (permalink / raw)
To: Sibi Sankar
Cc: sudeep.holla, lukasz.luba, linux-arm-msm, linux-kernel,
linux-arm-kernel, quic_rjendra, srinivas.kandagatla,
Chandra Sekhar Lingutla
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
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] firmware: arm_scmi: Fixup perf microwatt support
2023-08-11 20:48 [PATCH] firmware: arm_scmi: Fixup perf microwatt support Sibi Sankar
2023-08-14 7:54 ` Cristian Marussi
@ 2023-08-14 9:25 ` Sudeep Holla
2023-08-14 16:13 ` Sibi Sankar
2023-09-20 13:42 ` Sudeep Holla
2 siblings, 1 reply; 6+ messages in thread
From: Sudeep Holla @ 2023-08-14 9:25 UTC (permalink / raw)
To: Sibi Sankar
Cc: cristian.marussi, lukasz.luba, Sudeep Holla, linux-arm-msm,
linux-kernel, linux-arm-kernel, quic_rjendra, srinivas.kandagatla,
Chandra Sekhar Lingutla
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.
--
Regards,
Sudeep
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] firmware: arm_scmi: Fixup perf microwatt support
2023-08-14 9:25 ` Sudeep Holla
@ 2023-08-14 16:13 ` Sibi Sankar
2023-08-15 8:48 ` Sudeep Holla
0 siblings, 1 reply; 6+ messages in thread
From: Sibi Sankar @ 2023-08-14 16:13 UTC (permalink / raw)
To: Sudeep Holla
Cc: cristian.marussi, lukasz.luba, linux-arm-msm, linux-kernel,
linux-arm-kernel, quic_rjendra, srinivas.kandagatla,
Chandra Sekhar Lingutla
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
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] firmware: arm_scmi: Fixup perf microwatt support
2023-08-14 16:13 ` Sibi Sankar
@ 2023-08-15 8:48 ` Sudeep Holla
0 siblings, 0 replies; 6+ messages in thread
From: Sudeep Holla @ 2023-08-15 8:48 UTC (permalink / raw)
To: Sibi Sankar
Cc: cristian.marussi, lukasz.luba, Sudeep Holla, linux-arm-msm,
linux-kernel, linux-arm-kernel, quic_rjendra, srinivas.kandagatla,
Chandra Sekhar Lingutla
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.
--
Regards,
Sudeep
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] firmware: arm_scmi: Fixup perf microwatt support
2023-08-11 20:48 [PATCH] firmware: arm_scmi: Fixup perf microwatt support Sibi Sankar
2023-08-14 7:54 ` Cristian Marussi
2023-08-14 9:25 ` Sudeep Holla
@ 2023-09-20 13:42 ` Sudeep Holla
2 siblings, 0 replies; 6+ messages in thread
From: Sudeep Holla @ 2023-09-20 13:42 UTC (permalink / raw)
To: cristian.marussi, lukasz.luba, Sibi Sankar
Cc: Sudeep Holla, linux-arm-msm, linux-kernel, linux-arm-kernel,
quic_rjendra, srinivas.kandagatla, Chandra Sekhar Lingutla
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
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-09-20 13:42 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-11 20:48 [PATCH] firmware: arm_scmi: Fixup perf microwatt support Sibi Sankar
2023-08-14 7:54 ` Cristian Marussi
2023-08-14 9:25 ` Sudeep Holla
2023-08-14 16:13 ` Sibi Sankar
2023-08-15 8:48 ` Sudeep Holla
2023-09-20 13:42 ` Sudeep Holla
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).