linux/drivers/interconnect
Stephan Gerhold a7d9436a6c interconnect: qcom: rpm: Prevent integer overflow in rate
Using icc-rpm on ARM32 currently results in clk_set_rate() errors during
boot, e.g. "bus clk_set_rate error: -22". This is very similar to commit
7381e27b1e ("interconnect: qcom: msm8974: Prevent integer overflow in rate")
where the u64 is converted to a signed long during clock rate rounding,
resulting in an overflow on 32-bit platforms.

Let's fix it similarly by making sure that the rate does not exceed
LONG_MAX. Such high clock rates will surely result in the maximum
frequency of the bus anyway.

Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
Link: https://lore.kernel.org/r/20211206114542.45325-1-stephan@gerhold.net
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2021-12-06 19:52:19 +02:00
..
imx interconnect: imx8mq: Use icc_sync_state 2020-12-28 14:03:02 +02:00
qcom interconnect: qcom: rpm: Prevent integer overflow in rate 2021-12-06 19:52:19 +02:00
samsung interconnect: samsung: describe drivers in KConfig 2021-10-04 16:03:33 +03:00
bulk.c interconnect: Fix kerneldoc warning 2021-03-18 23:46:21 +02:00
core.c interconnect changes for 5.15 2021-08-24 15:33:04 +02:00
internal.h interconnect: Add helpers for enabling/disabling a path 2020-05-10 18:30:37 +03:00
Kconfig interconnect: Add generic interconnect driver for Exynos SoCs 2020-11-30 17:26:22 +02:00
Makefile interconnect: Add generic interconnect driver for Exynos SoCs 2020-11-30 17:26:22 +02:00
trace.h interconnect: Add basic tracepoints 2019-12-16 09:25:23 +02:00