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

Sudeep Holla <[email protected]> Mon, 13 Jul 2026 11:49:57 +0100
Newsgroups org.kernel.vger.arm-scmi,org.infradead.lists.linux-arm-kernel,org.kernel.vger.linux-kernel
Message-ID <178393970515.1814568.15303004507285404021.b4-ty@b4>
On Wed, 01 Jul 2026 15:59:20 -0400, [email protected] 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