linux-stable/drivers/acpi
Rafael J. Wysocki 68f4f0378c ACPI: thermal: Carry out trip point updates under zone lock
There is a race condition between acpi_thermal_trips_update() and
acpi_thermal_check_fn(), because the trip points may get updated while
the latter is running which in theory may lead to inconsistent results.
For example, if two trips are updated together, using the temperature
value of one of them from before the update and the temperature value
of the other one from after the update may not lead to the expected
outcome.

Moreover, if thermal_get_trend() runs when a trip points update is in
progress, it may end up using stale trip point temperatures.

To address this, make acpi_thermal_trips_update() call
thermal_zone_device_exec() to carry out the trip points update and
use a new  acpi_thermal_adjust_thermal_zone() wrapper around
__acpi_thermal_trips_update() as the callback function for the latter.

While at it, change the acpi_thermal_trips_update() return data type
to void as that function always returns 0 anyway.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2023-08-17 11:24:27 +02:00
..
acpica ACPI: sleep: Avoid breaking S3 wakeup due to might_sleep() 2023-06-15 18:05:19 +02:00
apei APEI: GHES: correctly return NULL for ghes_get_devices() 2023-06-12 19:31:48 +02:00
arm64 Merge branches 'for-next/kpti', 'for-next/missing-proto-warn', 'for-next/iss2-decode', 'for-next/kselftest', 'for-next/misc', 'for-next/feat_mops', 'for-next/module-alloc', 'for-next/sysreg', 'for-next/cpucap', 'for-next/acpi', 'for-next/kdump', 'for-next/acpi-doc', 'for-next/doc' and 'for-next/tpidr2-fix', remote-tracking branch 'arm64/for-next/perf' into for-next/core 2023-06-23 18:32:20 +01:00
dptf ACPI: DPTF: Drop stale link from Kconfig help 2022-09-28 17:26:25 +02:00
nfit ACPI: NFIT: Remove unnecessary .remove callback 2023-07-14 18:58:35 +02:00
numa dax/hmem: Move hmem device registration to dax_hmem.ko 2023-02-10 17:33:34 -08:00
pmic ACPI: PMIC: Add comments with DSDT power opregion field names 2023-01-30 16:47:13 +01:00
riscv drivers/acpi: RISC-V: Add RHCT related code 2023-06-01 08:45:04 -07:00
x86 Power management updates for 6.5-rc1 2023-06-26 19:36:30 -07:00
ac.c ACPI: AC: Install Notify() handler directly 2023-07-14 18:58:34 +02:00
acpi_adxl.c
acpi_amba.c Merge branches 'acpi-ec', 'acpi-ac', 'acpi-fan', 'acpi-video' and 'acpi-amba' 2022-10-03 19:59:47 +02:00
acpi_apd.c ACPI: processor: Check for null return of devm_kzalloc() in fch_misc_setup() 2023-03-20 18:04:58 +01:00
acpi_cmos_rtc.c
acpi_configfs.c
acpi_dbg.c
acpi_extlog.c ACPI: extlog: Handle multiple records 2022-10-13 20:43:10 +02:00
acpi_ffh.c ACPI: FFH: Drop the inclusion of linux/arm-smccc.h 2023-06-12 19:28:20 +02:00
acpi_fpdt.c ACPI: tables: FPDT: Don't call acpi_os_map_memory() on invalid phys address 2022-09-10 18:18:34 +02:00
acpi_ipmi.c
acpi_lpat.c
acpi_lpit.c ACPI: LPIT: move to use bus_get_dev_root() 2023-03-22 20:25:18 +01:00
acpi_lpss.c ACPI: LPSS: Add pwm_lookup_table entry for second PWM on CHT/BSW devices 2023-05-19 20:17:10 +02:00
acpi_memhotplug.c
acpi_pad.c ACPI: PAD: mark Zhaoxin CPUs NONSTOP TSC correctly 2023-06-12 19:25:55 +02:00
acpi_pcc.c ACPI: PCC: Setup PCC Opregion handler only if platform interrupt is available 2022-11-23 19:06:56 +01:00
acpi_platform.c ACPI: platform: Move SMB0001 HID to the header and reuse 2023-07-04 19:28:20 +02:00
acpi_pnp.c ACPI: PNP: Introduce list of known non-PNP devices 2023-01-17 12:52:11 +01:00
acpi_processor.c ACPI: cpufreq: Use platform devices to load ACPI PPC and PCC drivers 2023-03-20 18:54:13 +01:00
acpi_tad.c
acpi_video.c ACPI: video: Install Notify() handler directly 2023-07-14 18:58:34 +02:00
acpi_watchdog.c
battery.c ACPI: battery: Install Notify() handler directly 2023-07-14 18:58:34 +02:00
bgrt.c
blacklist.c
bus.c ACPI: bus: Set driver_data to NULL every time .add() fails 2023-07-14 18:58:34 +02:00
button.c Merge branches 'acpi-thermal' and 'acpi-button' 2023-06-26 17:20:28 +02:00
container.c
cppc_acpi.c ACPI: CPPC: Add auto select register read/write support 2023-03-17 19:06:23 +01:00
custom_method.c
debugfs.c
device_pm.c PCI/ACPI: Account for _S0W of the target bridge in acpi_pci_bridge_d3() 2023-01-13 15:56:10 -06:00
device_sysfs.c ACPI: bus: Constify acpi_companion_match() returned value 2023-06-29 11:40:55 +02:00
dock.c
ec.c ACPI: EC: Fix acpi_ec_dispatch_gpe() 2023-06-27 17:06:51 +02:00
ec_sys.c
event.c
evged.c
fan.h
fan_attr.c ACPI: fan: Convert to use sysfs_emit_at() API 2022-12-06 12:44:14 +01:00
fan_core.c ACPI: fan: Bail out if extract package failed 2022-11-23 19:31:57 +01:00
glue.c ACPI: Fix selecting wrong ACPI fwnode for the iGPU on some Dell laptops 2023-01-10 20:23:48 +01:00
hed.c ACPI: HED: Install Notify() handler directly 2023-07-14 18:58:34 +02:00
internal.h Merge branches 'acpi-bus' and 'acpi-scan' 2023-07-06 19:24:06 +02:00
ioapic.c ACPI: Silence missing prototype warnings 2022-12-30 19:12:30 +01:00
irq.c ACPI: irq: Fix some kernel-doc issues 2022-11-10 20:21:35 +01:00
Kconfig LoongArch: Add SMT (Simultaneous Multi-Threading) support 2023-06-29 20:58:43 +08:00
Makefile drivers/acpi: RISC-V: Add RHCT related code 2023-06-01 08:45:04 -07:00
nvs.c
osi.c ACPI: OSI: Remove Linux-HPI-Hybrid-Graphics _OSI string 2022-08-25 20:18:17 +02:00
osl.c ACPI: OSL: Make should_use_kmap() 0 for RISC-V 2023-06-01 08:45:00 -07:00
pci_irq.c ACPI / PCI: fix LPIC IRQ model default PCI IRQ polarity 2022-11-26 12:57:18 +00:00
pci_link.c ACPI/PCI: Remove useless NULL pointer checks 2022-07-27 21:21:27 +02:00
pci_mcfg.c PCI: loongson: Add ACPI init support 2022-07-14 15:25:36 -05:00
pci_root.c PCI/CXL: Export native CXL error reporting control 2023-01-05 13:31:27 -08:00
pci_slot.c
pfr_telemetry.c mm: replace vma->vm_flags direct modifications with modifier calls 2023-02-09 16:51:39 -08:00
pfr_update.c iov_iter work; most of that is about getting rid of 2022-12-12 18:29:54 -08:00
platform_profile.c
power.c ACPI: PM: Do not turn of unused power resources on the Toshiba Click Mini 2023-04-27 18:44:43 +02:00
pptt.c ACPI: PPTT: Fix to avoid sleep in the atomic context when PPTT is absent 2023-03-14 20:34:38 +01:00
prmt.c ACPI: PRM: Check whether EFI runtime is available 2023-01-18 19:58:15 +01:00
proc.c
processor_core.c ACPI: processor_core: RISC-V: Enable mapping processor to the hartid 2023-06-01 08:45:02 -07:00
processor_driver.c ACPI: processor: Reorder acpi_processor_driver_init() 2023-03-22 15:20:38 +01:00
processor_idle.c x86/smpboot: Remove the CPU0 hotplug kludge 2023-05-15 13:44:49 +02:00
processor_pdc.c ACPI: processor: Fix evaluating _PDC method when running as Xen dom0 2023-03-22 19:36:31 +01:00
processor_perflib.c ACPI: processor: perflib: Avoid updating frequency QoS unnecessarily 2022-12-30 19:10:02 +01:00
processor_thermal.c ACPI: processor: thermal: Update CPU cooling devices on cpufreq policy changes 2023-03-22 15:20:38 +01:00
processor_throttling.c ACPI: processor: throttling: remove variable count 2022-10-28 19:02:45 +02:00
property.c ACPI: property: Refactor acpi_data_prop_read_single() 2023-03-27 20:48:36 +02:00
reboot.c
resource.c ACPI: resource: Remove "Zen" specific match and quirks 2023-06-05 19:20:33 +02:00
sbs.c ACPI: SBS: Fix handling of Smart Battery Selectors 2023-03-30 19:01:05 +02:00
sbshc.c ACPI: make remove callback of ACPI driver void 2022-11-23 19:11:22 +01:00
sbshc.h
scan.c ACPI: scan: Use the acpi_match_acpi_device() helper 2023-07-04 19:28:20 +02:00
sleep.c Merge branches 'acpi-scan', 'acpi-pm', 'acpi-resource' and 'acpi-ec' 2023-06-26 16:54:10 +02:00
sleep.h ACPI: s2idle: Add a new ->check() callback for platform_s2idle_ops 2022-09-09 17:37:40 +02:00
spcr.c ACPI: SPCR: Amend indentation 2023-03-27 20:50:28 +02:00
sysfs.c ACPI: sysfs: Enable ACPI sysfs support for CCEL records 2023-03-27 20:43:58 +02:00
tables.c ACPI: tables: Print RINTC information when MADT is parsed 2023-06-01 08:44:59 -07:00
thermal.c ACPI: thermal: Carry out trip point updates under zone lock 2023-08-17 11:24:27 +02:00
tiny-power-button.c ACPI: tiny-power-button: Eliminate the driver notify callback 2023-06-16 19:48:09 +02:00
utils.c Merge branch 'acpi-uid' 2022-10-03 20:09:22 +02:00
video_detect.c ACPI: video: Add backlight=native DMI quirk for Dell Studio 1569 2023-06-22 17:54:45 +02:00
viot.c ACPI: VIOT: Initialize the correct IOMMU fwspec 2023-03-30 19:20:42 +02:00
wakeup.c