Thermal control fixes for 5.16-rc2

- Prevent the previous high and low thermal zone trip values from
    being retained over a system suspend-resume cycle (Manaf
    Meethalavalappu Pallikunhi).
 
  - Prevent the int340x thermal driver from being built in 32-bit
    kernel configurations, because running it on 32-bit is
    questionable (Arnd Bergmann).
 -----BEGIN PGP SIGNATURE-----
 
 iQJGBAABCAAwFiEE4fcc61cGeeHD/fCwgsRv/nhiVHEFAmGWrd4SHHJqd0Byand5
 c29ja2kubmV0AAoJEILEb/54YlRxuW0P/3Hs020giTPFxtXX7dBdYI4zcP5gC1Fy
 fiWuhx1I1J8SLm1vd7SVWzGxSsey97+LTeg+feA0P0/LC8yNermd9J22YG2jrQ61
 DjyTC+1GPyZFGBLr1ayGwfnHyj1b9303lj/tFw8jcnUfH8mTk/tlMtlgFykv9IBm
 WVo7DvcboVr99j719hrjqZjl60goYy8O6nUyoDvZWZZw92p9bgI8J47yGT0OQm7s
 hDOygCpIwKLJA3xN614zfUf1tnmkNd9sg/4k5E7nkfTFn4sV8l/VZilPWz4zQ22s
 3Q70Ec/hBVjtdD70pkNZBwDl5n5XEP5G6rzipNHyibB+TuPD5MJDqHUf7af5m+el
 6R5xn/1OymTEhGMLYRsqA25mgf6L+ZAumVVlNV5/lGh3Vsw2pAx6ZNeJ9E3VccUV
 8WIgfRxo19cyNQQ7BlzmPLeRf4BZ4ZrJeJn7Xnt5h33pRLNdbCOO0Gbq+pQS26EY
 x1CfxZf0awJEsChQ45Y4DINoNHgkt+R709OXmqdVOe+ouWJd/rzI9ZmrEzuC93A/
 V/42hE6Iy5E8hdqgAiOSOW7+aNoAWJIUN7Knxnwx1JSqL6EseblTL0WnuAl6FPRA
 QMXQfQr82wiIx8oXIJSfew/C7dcvUPQV/rZEplwjfUCMGE4+YGdyHB/ex9JL8dVv
 YeglgERXyjH5
 =39M5
 -----END PGP SIGNATURE-----

Merge tag 'thermal-5.16-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull thermal control fixes from Rafael Wysocki:
 "These fix the handling of thermal zones during system resume and
  disable building of the int340x thermal driver on 32-bit.

  Specifics:

   - Prevent the previous high and low thermal zone trip values from
     being retained over a system suspend-resume cycle (Manaf
     Meethalavalappu Pallikunhi)

   - Prevent the int340x thermal driver from being built in 32-bit
     kernel configurations, because running it on 32-bit is questionable
     (Arnd Bergmann)"

* tag 'thermal-5.16-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  thermal: core: Reset previous low and high trip during thermal zone init
  thermal: int340x: Limit Kconfig to 64-bit
This commit is contained in:
Linus Torvalds 2021-11-18 14:52:24 -08:00
commit e26dd97658
2 changed files with 4 additions and 2 deletions

View File

@ -5,12 +5,12 @@
config INT340X_THERMAL config INT340X_THERMAL
tristate "ACPI INT340X thermal drivers" tristate "ACPI INT340X thermal drivers"
depends on X86 && ACPI && PCI depends on X86_64 && ACPI && PCI
select THERMAL_GOV_USER_SPACE select THERMAL_GOV_USER_SPACE
select ACPI_THERMAL_REL select ACPI_THERMAL_REL
select ACPI_FAN select ACPI_FAN
select INTEL_SOC_DTS_IOSF_CORE select INTEL_SOC_DTS_IOSF_CORE
select PROC_THERMAL_MMIO_RAPL if X86_64 && POWERCAP select PROC_THERMAL_MMIO_RAPL if POWERCAP
help help
Newer laptops and tablets that use ACPI may have thermal sensors and Newer laptops and tablets that use ACPI may have thermal sensors and
other devices with thermal control capabilities outside the core other devices with thermal control capabilities outside the core

View File

@ -421,6 +421,8 @@ static void thermal_zone_device_init(struct thermal_zone_device *tz)
{ {
struct thermal_instance *pos; struct thermal_instance *pos;
tz->temperature = THERMAL_TEMP_INVALID; tz->temperature = THERMAL_TEMP_INVALID;
tz->prev_low_trip = -INT_MAX;
tz->prev_high_trip = INT_MAX;
list_for_each_entry(pos, &tz->thermal_instances, tz_node) list_for_each_entry(pos, &tz->thermal_instances, tz_node)
pos->initialized = false; pos->initialized = false;
} }