linux/drivers/interconnect/qcom
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
..
bcm-voter.c interconnect: qcom: Add missing MODULE_DEVICE_TABLE 2021-05-11 07:26:31 +03:00
bcm-voter.h interconnect: qcom: Consolidate interconnect RPMh support 2020-02-28 12:11:40 +02:00
icc-rpm.c interconnect: qcom: rpm: Prevent integer overflow in rate 2021-12-06 19:52:19 +02:00
icc-rpm.h interconnect: qcom: drop DEFINE_QNODE macro 2021-10-04 14:13:58 +03:00
icc-rpmh.c interconnect: qcom: icc-rpmh: Add BCMs to commit list in pre_aggregate 2021-11-30 14:14:19 +02:00
icc-rpmh.h interconnect: qcom: icc-rpmh: Consolidate probe functions 2021-07-22 10:05:24 +03:00
Kconfig interconnect: qcom: Add SC8180x providers 2021-08-09 15:16:53 +03:00
Makefile interconnect: qcom: Add SC8180x providers 2021-08-09 15:16:53 +03:00
msm8916.c interconnect: msm8916: add support for AP-owned nodes 2021-10-04 14:13:58 +03:00
msm8939.c interconnect: msm8939: add support for AP-owned nodes 2021-10-04 14:13:58 +03:00
msm8974.c interconnect: qcom: msm8974: Don't boost the NoC rate during boot 2020-11-18 00:21:47 +02:00
osm-l3.c interconnect: qcom: osm-l3: Use driver-specific naming 2021-08-09 20:10:19 +03:00
qcs404.c interconnect: qcs404: expand DEFINE_QNODE macros 2021-10-04 14:13:58 +03:00
sc7180.c interconnect: qcom: icc-rpmh: Consolidate probe functions 2021-07-22 10:05:24 +03:00
sc7180.h interconnect: qcom: Add OSM L3 support on SC7180 2020-03-03 19:02:52 +02:00
sc7280.c interconnect: qcom: icc-rpmh: Consolidate probe functions 2021-07-22 10:05:24 +03:00
sc7280.h interconnect: qcom: Add SC7280 interconnect provider driver 2021-05-11 11:53:31 +03:00
sc8180x.c interconnect: qcom: Add SC8180x providers 2021-08-09 15:16:53 +03:00
sc8180x.h interconnect: qcom: osm-l3: Add sc8180x support 2021-08-09 15:17:25 +03:00
sdm660.c interconnect: sdm660: merge common code into icc-rpm 2021-10-04 14:13:57 +03:00
sdm845.c interconnect: qcom: icc-rpmh: Consolidate probe functions 2021-07-22 10:05:24 +03:00
sdm845.h interconnect: qcom: Add OSM L3 interconnect provider support 2020-03-03 19:02:52 +02:00
sdx55.c interconnect: qcom: icc-rpmh: Consolidate probe functions 2021-07-22 10:05:24 +03:00
sdx55.h interconnect: qcom: Add SDX55 interconnect provider driver 2021-01-27 13:11:33 +02:00
sm8150.c interconnect: qcom: icc-rpmh: Add BCMs to commit list in pre_aggregate 2021-11-30 14:14:19 +02:00
sm8150.h interconnect: qcom: Add OSM L3 support on SM8150 2020-09-08 16:29:01 +03:00
sm8250.c interconnect: qcom: icc-rpmh: Add BCMs to commit list in pre_aggregate 2021-11-30 14:14:19 +02:00
sm8250.h interconnect: qcom: Add EPSS L3 support on SM8250 2020-09-08 16:29:01 +03:00
sm8350.c interconnect: qcom: icc-rpmh: Add BCMs to commit list in pre_aggregate 2021-11-30 14:14:19 +02:00
sm8350.h interconnect: qcom: Add SM8350 interconnect provider driver 2021-03-27 14:34:12 +02:00
smd-rpm.c interconnect: qcom: Add interconnect RPM over SMD driver 2019-08-13 23:06:40 +03:00
smd-rpm.h interconnect: qcom: Add interconnect RPM over SMD driver 2019-08-13 23:06:40 +03:00