[PATCH 0/2] Fix clk-divider rates above 4.29 GHz on 64-bit

From: Carlo Caione

Date: Mon Nov 02 2026 - 16:07:49 EST


On 64-bit platforms, the clk-divider truncates requested rates above
4.29 GHz when computing a divisor. Fix it and add KUnit tests.

Sebastian Reichel fixed this in 2023 [1], but later versions moved to a
new generic macro and were never applied. Patch 1 resends his v1 with a
new commit message. It uses the existing DIV64_U64_ROUND_UP(), as
Stephen asked for then [2]. On 32-bit, the rate fits in 32 bits, so
div64_u64() does the same 64/32 division as today [3].

[1] https://lore.kernel.org/linux-clk/20230519190522.194729-3-sebastian.reichel@xxxxxxxxxxxxx/
[2] https://lore.kernel.org/linux-clk/5e9e776db6628d02d7081292b81ab102.sboyd@xxxxxxxxxx/
[3] https://lore.kernel.org/linux-clk/1b74d2ea2c3a458694c4c74f2381fcab@xxxxxxxxxxxxxxxx/

---
Carlo Caione (1):
clk: divider: test: Add tests for rates above 4.29 GHz

Sebastian Reichel (1):
clk: divider: Fix the divisor for rates above 4.29 GHz

drivers/clk/clk-divider.c | 6 +--
drivers/clk/clk-divider_test.c | 117 ++++++++++++++++++++++++++++++++++++++++-
2 files changed, 118 insertions(+), 5 deletions(-)
---
base-commit: ab94dbf302331eed3679e262e1d8d1a73f308640
change-id: 20261102-upstream-clk-divider-large-rates-872467864e39

Best regards,
--
Carlo Caione <ccaione@xxxxxxxxxxxx>