diff options
author | Olof Johansson <olof@lixom.net> | 2018-09-25 20:30:47 +0200 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2018-09-25 20:30:47 +0200 |
commit | cdddeefc39cc26b2d429f8f7ea3c35bf8cb8c6a1 (patch) | |
tree | 2628d4922d0675df5659439f22f5ebda9c4b302a /drivers/firmware | |
parent | Merge tag 'amlogic-drivers' of https://git.kernel.org/pub/scm/linux/kernel/gi... (diff) | |
parent | Linux 4.19-rc3 (diff) | |
download | linux-cdddeefc39cc26b2d429f8f7ea3c35bf8cb8c6a1.tar.xz linux-cdddeefc39cc26b2d429f8f7ea3c35bf8cb8c6a1.zip |
Merge tag 'v4.19-rc3' into next/drivers
Linux 4.19-rc3
Diffstat (limited to 'drivers/firmware')
-rw-r--r-- | drivers/firmware/arm_scmi/perf.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/firmware/arm_scmi/perf.c b/drivers/firmware/arm_scmi/perf.c index 721e6c57beae..64342944d917 100644 --- a/drivers/firmware/arm_scmi/perf.c +++ b/drivers/firmware/arm_scmi/perf.c @@ -166,7 +166,13 @@ scmi_perf_domain_attributes_get(const struct scmi_handle *handle, u32 domain, le32_to_cpu(attr->sustained_freq_khz); dom_info->sustained_perf_level = le32_to_cpu(attr->sustained_perf_level); - dom_info->mult_factor = (dom_info->sustained_freq_khz * 1000) / + if (!dom_info->sustained_freq_khz || + !dom_info->sustained_perf_level) + /* CPUFreq converts to kHz, hence default 1000 */ + dom_info->mult_factor = 1000; + else + dom_info->mult_factor = + (dom_info->sustained_freq_khz * 1000) / dom_info->sustained_perf_level; memcpy(dom_info->name, attr->name, SCMI_MAX_STR_SIZE); } |