aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/exported-sql-viewer.py
diff options
context:
space:
mode:
authorDevi Priya <quic_devipriy@quicinc.com>2023-09-01 13:06:40 +0530
committerBjorn Andersson <andersson@kernel.org>2023-09-19 20:04:15 -0700
commitf7b7d30158cff246667273bd2a62fc93ee0725d2 (patch)
treed2907cc1e8922b9ed7aa09d75118011b78d3c70d /tools/perf/scripts/python/exported-sql-viewer.py
parent4afda5f6bcdf673ef2556fcfa458daf3a5a648d8 (diff)
clk: qcom: clk-rcg2: Fix clock rate overflow for high parent frequencies
If the parent clock rate is greater than unsigned long max/2 then integer overflow happens when calculating the clock rate on 32-bit systems. As RCG2 uses half integer dividers, the clock rate is first being multiplied by 2 which will overflow the unsigned long max value. Hence, replace the common pattern of doing 64-bit multiplication and then a do_div() call with simpler mult_frac call. Fixes: bcd61c0f535a ("clk: qcom: Add support for root clock generators (RCGs)") Signed-off-by: Devi Priya <quic_devipriy@quicinc.com> Reviewed-by: Marijn Suijten <marijn.suijten@somainline.org> Link: https://lore.kernel.org/r/20230901073640.4973-1-quic_devipriy@quicinc.com [bjorn: Also drop unnecessary {} around single statements] Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions