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

Sudeep Holla sudeep.holla at kernel.org
Mon Jul 13 03:49:57 PDT 2026


On Wed, 01 Jul 2026 15:59:20 -0400, sdunnaga at redhat.com 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




More information about the linux-arm-kernel mailing list