Re: [PATCH] firmware: arm_scmi: Use 64-bit division for clock rate rounding

From: Sudeep Holla

Date: Mon Jul 13 2026 - 06:51:07 EST


On Wed, 01 Jul 2026 15:59:20 -0400, sdunnaga@xxxxxxxxxx wrote:
> SCMI clock range descriptors report rates as 64-bit values. When handling
> a range clock, scmi_clock_determine_rate() rounds the requested rate up to
> the next supported step using the SCMI RATE_STEP value.
>
> The current code uses div64_ul() for this calculation. Since div64_ul()
> takes an unsigned long divisor, the 64-bit RATE_STEP value can be truncated
> on 32-bit builds. In the worst case, a non-zero 64-bit step can be narrowed
> to zero before the division.
>
> [...]

Applied to sudeep.holla/linux (for-next/scmi/fixes), thanks!

[1/1] firmware: arm_scmi: Use 64-bit division for clock rate rounding
https://git.kernel.org/sudeep.holla/c/bf1deecccf21
--
Regards,
Sudeep