[PATCH 1/2] firmware: arm_scmi: Fix frequency truncation by promoting multiplier to u64
Sudeep Holla
sudeep.holla at arm.com
Fri Dec 1 06:39:35 PST 2023
On Thu, Nov 30, 2023 at 08:43:42PM +0000, Sudeep Holla wrote:
> Fix the frequency truncation for all values equal to or greater 4GHz by
> updating the multiplier 'mult_factor' to u64 type. It is also possible
> that the multiplier itself can be greater than or equal to 2^32. So we need
> to also fix the equation computing the value of the multiplier.
>
> Fixes: a9e3fbfaa0ff ("firmware: arm_scmi: add initial support for performance protocol")
> Reported-by: Sibi Sankar <quic_sibis at quicinc.com>
> Closes: https://lore.kernel.org/all/20231129065748.19871-3-quic_sibis@quicinc.com/
> Cc: Cristian Marussi <cristian.marussi at arm.com>
> Signed-off-by: Sudeep Holla <sudeep.holla at arm.com>
> ---
> drivers/firmware/arm_scmi/perf.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/firmware/arm_scmi/perf.c b/drivers/firmware/arm_scmi/perf.c
> index 81dd5c5e5533..8ce449922e55 100644
> --- a/drivers/firmware/arm_scmi/perf.c
> +++ b/drivers/firmware/arm_scmi/perf.c
> @@ -152,7 +152,7 @@ struct perf_dom_info {
> u32 opp_count;
> u32 sustained_freq_khz;
> u32 sustained_perf_level;
> - u32 mult_factor;
> + u64 mult_factor;
I have now changed this to unsigned long instead of u64 to fix the 32-bit
build failure[1].
--
Regards,
Sudeep
[1] https://lore.kernel.org/all/20231201085914.4ad45eb2@canb.auug.org.au
More information about the linux-arm-kernel
mailing list