linux-stable/drivers/thermal
Srinivas Pandruvada cf2328c333 thermal: intel: powerclamp: Fix cur_state for multi package system
commit 8e47363588 upstream.

The powerclamp cooling device cur_state shows actual idle observed by
package C-state idle counters. But the implementation is not sufficient
for multi package or multi die system. The cur_state value is incorrect.
On these systems, these counters must be read from each package/die and
somehow aggregate them. But there is no good method for aggregation.

It was not a problem when explicit CPU model addition was required to
enable intel powerclamp. In this way certain CPU models could have
been avoided. But with the removal of CPU model check with the
availability of Package C-state counters, the driver is loaded on most
of the recent systems.

For multi package/die systems, just show the actual target idle state,
the system is trying to achieve. In powerclamp this is the user set
state minus one.

Also there is no use of starting a worker thread for polling package
C-state counters and applying any compensation for multiple package
or multiple die systems.

Fixes: b721ca0d19 ("thermal/powerclamp: remove cpu whitelist")
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Cc: 4.14+ <stable@vger.kernel.org> # 4.14+
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-03-11 16:32:02 +01:00
..
broadcom
int340x_thermal thermal: intel: int340x: Add locking to int340x_thermal_get_trip_type() 2023-02-22 12:47:16 +01:00
qcom
samsung
st
tegra
ti-soc-thermal
Kconfig
Makefile
armada_thermal.c
clock_cooling.c
cpu_cooling.c
da9062-thermal.c
db8500_thermal.c
devfreq_cooling.c
dove_thermal.c
fair_share.c
gov_bang_bang.c
hisi_thermal.c
imx_thermal.c
intel_bxt_pmic_thermal.c
intel_pch_thermal.c
intel_powerclamp.c thermal: intel: powerclamp: Fix cur_state for multi package system 2023-03-11 16:32:02 +01:00
intel_quark_dts_thermal.c thermal: intel: quark_dts: fix error pointer dereference 2023-03-11 16:31:59 +01:00
intel_soc_dts_iosf.c thermal: intel: Fix unsigned comparison with less than zero 2023-03-11 16:31:45 +01:00
intel_soc_dts_iosf.h
intel_soc_dts_thermal.c
kirkwood_thermal.c
max77620_thermal.c
mtk_thermal.c
of-thermal.c
power_allocator.c
qcom-spmi-temp-alarm.c
qoriq_thermal.c
rcar_gen3_thermal.c
rcar_thermal.c
rockchip_thermal.c
spear_thermal.c
step_wise.c
tango_thermal.c
thermal-generic-adc.c
thermal_core.c thermal: core: Reset previous low and high trip during thermal zone init 2021-12-08 08:50:11 +01:00
thermal_core.h
thermal_helpers.c
thermal_hwmon.c
thermal_hwmon.h
thermal_sysfs.c thermal: sysfs: Fix cooling_device_stats_setup() error code path 2022-08-25 11:14:53 +02:00
uniphier_thermal.c
user_space.c
x86_pkg_temp_thermal.c
zx2967_thermal.c