WSL2-Linux-Kernel/drivers/firmware/arm_scmi
Sudeep Holla 96d529bac5 firmware: arm_scmi: fix divide by zero when sustained_perf_level is zero
Firmware can provide zero as values for sustained performance level and
corresponding sustained frequency in kHz in order to hide the actual
frequencies and provide only abstract values. It may endup with divide
by zero scenario resulting in kernel panic.

Let's set the multiplication factor to one if either one or both of them
(sustained_perf_level and sustained_freq) are set to zero.

Fixes: a9e3fbfaa0 ("firmware: arm_scmi: add initial support for performance protocol")
Reported-by: Ionela Voinescu <ionela.voinescu@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
2018-09-06 09:59:40 -07:00
..
Makefile firmware: arm_scmi: add device power domain support using genpd 2018-02-28 16:37:57 +00:00
base.c firmware: arm_scmi: rename scmi_xfer_{init,get,put} 2018-05-10 10:51:57 +01:00
bus.c firmware: arm_scmi: improve exit paths and code readability 2018-05-10 10:51:59 +01:00
clock.c SCMI cleanups for v4.18 2018-05-15 13:48:46 -07:00
common.h firmware: arm_scmi: drop unused `con_priv` structure member 2018-05-10 10:51:58 +01:00
driver.c ARM: SoC driver updates 2018-06-11 18:15:22 -07:00
perf.c firmware: arm_scmi: fix divide by zero when sustained_perf_level is zero 2018-09-06 09:59:40 -07:00
power.c firmware: arm_scmi: rename scmi_xfer_{init,get,put} 2018-05-10 10:51:57 +01:00
scmi_pm_domain.c firmware: arm_scmi: add device power domain support using genpd 2018-02-28 16:37:57 +00:00
sensors.c firmware: arm_scmi: rename scmi_xfer_{init,get,put} 2018-05-10 10:51:57 +01:00