linux/drivers
Rafael J. Wysocki 77451ef587 thermal: core: Store trip pointer in struct thermal_instance
[ Upstream commit 2c7b4bfade ]

Replace the integer trip number stored in struct thermal_instance with
a pointer to the relevant trip and adjust the code using the structure
in question accordingly.

The main reason for making this change is to allow the trip point to
cooling device binding code more straightforward, as illustrated by
subsequent modifications of the ACPI thermal driver, but it also helps
to clarify the overall design and allows the governor code overhead to
be reduced (through subsequent modifications).

The only case in which it adds complexity is trip_point_show() that
needs to walk the trips[] table to find the index of the given trip
point, but this is not a critical path and the interface that
trip_point_show() belongs to is problematic anyway (for instance, it
doesn't cover the case when the same cooling devices is associated
with multiple trip points).

This is a preliminary change and the affected code will be refined by
a series of subsequent modifications of thermal governors, the core and
the ACPI thermal driver.

The general functionality is not expected to be affected by this change.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Stable-dep-of: e95fa74047 ("thermal: gov_power_allocator: avoid inability to reset a cdev")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-01-31 16:19:10 -08:00
..
accel accel/habanalabs: fix information leak in sec_attest_info() 2024-01-25 15:35:38 -08:00
accessibility
acpi acpi: property: Let args be NULL in __acpi_node_get_property_reference 2024-01-25 15:35:51 -08:00
amba
android binder: fix race between mmput() and do_exit() 2024-01-25 15:35:42 -08:00
ata scsi: sd: Fix system start for ATA devices 2023-12-08 08:52:17 +01:00
atm atm: solos-pci: Fix potential deadlock on &tx_queue_lock 2023-12-20 17:01:46 +01:00
auxdisplay
base rtc: Extend timeout for waiting for UIP to clear to 1s 2024-01-31 16:18:56 -08:00
bcma
block rbd: don't move requests to the running list on errors 2024-01-31 16:19:06 -08:00
bluetooth Bluetooth: btmtkuart: fix recv_buf() return value 2024-01-25 15:35:29 -08:00
bus bus: mhi: host: Add spinlock to protect WP access when queueing TREs 2024-01-31 16:18:52 -08:00
cache riscv: RISCV_NONSTANDARD_CACHE_OPS shouldn't depend on RISCV_DMA_NONCOHERENT 2023-10-26 09:42:37 +02:00
cdrom
cdx
char hwrng: core - Fix page fault dead lock on mmap-ed hwrng 2024-01-31 16:18:50 -08:00
clk clk: qcom: dispcc-sm8550: Update disp PLL settings 2024-01-25 15:35:38 -08:00
clocksource clocksource/drivers/timer-ti-dm: Fix make W=n kerneldoc warnings 2024-01-25 15:35:42 -08:00
comedi
connector connector: Fix proc_event_num_listeners count not cleared 2024-01-20 11:51:47 +01:00
counter First set of Counter fixes for 6.6 2023-10-02 13:13:15 +02:00
cpufreq cpufreq: intel_pstate: Refine computation of P-state for given frequency 2024-01-31 16:19:07 -08:00
cpuidle cpuidle: haltpoll: Do not enable interrupts when entering idle 2024-01-25 15:35:15 -08:00
crypto crypto: sahara - do not resize req->src when doing hash operations 2024-01-25 15:35:18 -08:00
cxl cxl/port: Fix missing target list lock 2024-01-25 15:35:55 -08:00
dax
dca
devfreq PM / devfreq: Fix buffer overflow in trans_stat_show 2024-01-31 16:18:50 -08:00
dio
dma dmaengine: idxd: Move dma_free_coherent() out of spinlocked context 2024-01-31 16:18:47 -08:00
dma-buf dma-buf: fix check in dma_resv_add_fence 2023-12-08 08:52:19 +01:00
edac EDAC/thunderx: Fix possible out-of-bounds string access 2024-01-25 15:35:12 -08:00
eisa
extcon
firewire firewire: ohci: suppress unexpected system reboot in AMD Ryzen machines and ASM108x/VT630x PCIe cards 2024-01-10 17:17:00 +01:00
firmware Revert "drivers/firmware: Move sysfb_init() from device_initcall to subsys_initcall_sync" 2024-01-31 16:19:07 -08:00
fpga fpga: Fix memory leak for fpga_region_test_class_find() 2023-10-24 19:32:39 +02:00
fsi
gnss
gpio gpiolib: acpi: Ignore touchpad wakeup on GPD G1619-04 2024-01-31 16:19:07 -08:00
gpu drm/amd/display: Fix uninitialized variable usage in core_link_ 'read_dpcd() & write_dpcd()' functions 2024-01-31 16:19:09 -08:00
greybus
hid HID: wacom: Correct behavior when processing some confidence == false touches 2024-01-25 15:35:48 -08:00
hsi
hte hte: tegra: Fix missing error code in tegra_hte_test_probe() 2023-11-20 11:59:08 +01:00
hv
hwmon hwmon: (corsair-psu) Fix probe when built-in 2024-01-20 11:51:42 +01:00
hwspinlock
hwtracing coresight: etm4x: Fix width of CCITMIN field 2024-01-20 11:51:49 +01:00
i2c i2c: s3c24xx: fix transferring more than one message in polling mode 2024-01-25 15:36:01 -08:00
i3c i3c: master: svc: fix random hot join failure since timeout error 2023-11-28 17:20:06 +00:00
idle x86: Fix CPUIDLE_FLAG_IRQ_ENABLE leaking timer reprogram 2024-01-25 15:35:12 -08:00
iio iio: adc: ad7091r: Enable internal vref if external vref is not supplied 2024-01-31 16:18:47 -08:00
infiniband IB/iser: Prevent invalidating wrong MR 2024-01-25 15:35:40 -08:00
input Input: atkbd - use ab83 as id when skipping the getid command 2024-01-25 15:35:41 -08:00
interconnect interconnect: qcom: sm8250: Enable sync_state 2024-01-01 12:42:36 +00:00
iommu iommu: Don't reserve 0-length IOVA region 2024-01-25 15:35:54 -08:00
ipack
irqchip irqchip/gic-v3-its: Flush ITS tables correctly in non-coherent GIC designs 2023-12-03 07:33:02 +01:00
isdn isdn: mISDN: hfcsusb: Spelling fix in comment 2023-10-23 09:39:46 +01:00
leds leds: aw200xx: Fix write to DIM parameter 2024-01-25 15:35:49 -08:00
macintosh
mailbox
mcb mcb: fix error handling for different scenarios when parsing 2023-11-28 17:20:05 +00:00
md Revert "Revert "md/raid5: Wait for MD_SB_CHANGE_PENDING in raid5d"" 2024-01-25 15:36:01 -08:00
media media: i2c: imx290: Properly encode registers as little-endian 2024-01-31 16:19:10 -08:00
memory memory: tegra: Set BPMP msg flags to reset IPC channels 2023-11-20 11:59:17 +01:00
memstick
message
mfd mfd: intel-lpss: Fix the fractional clock divider flags 2024-01-25 15:35:49 -08:00
misc misc: mei: client.c: fix problem of return '-EOVERFLOW' in mei_cl_write 2023-12-13 18:45:29 +01:00
mmc mmc: mmc_spi: remove custom DMA mapped buffers 2024-01-31 16:18:55 -08:00
most
mtd mtd: rawnand: Clarify conditions to enable continuous reads 2024-01-31 16:18:50 -08:00
mux
net hv_netvsc: Calculate correct ring size when PAGE_SIZE is not 4 Kbytes 2024-01-31 16:19:06 -08:00
nfc nfc: virtual_ncidev: Add variable to check if ndev is running 2023-12-20 17:01:59 +01:00
ntb
nubus
nvdimm nd_btt: Make BTT lanes preemptible 2023-11-20 11:59:19 +01:00
nvme nvmet-tcp: Fix the H2C expected PDU len calculation 2024-01-25 15:35:55 -08:00
nvmem nvmem: brcm_nvram: store a copy of NVRAM content 2024-01-01 12:42:44 +00:00
of of: unittest: Fix of_count_phandle_with_args() expected value message 2024-01-25 15:35:40 -08:00
opp OPP: Pass rounded rate to _set_opp() 2024-01-31 16:18:49 -08:00
parisc parisc/power: Fix power soft-off button emulation on qemu 2024-01-31 16:18:52 -08:00
parport parport: parport_serial: Add Brainboxes device IDs and geometry 2024-01-20 11:51:48 +01:00
pci PCI: mediatek-gen3: Fix translation window size calculation 2024-01-25 15:35:55 -08:00
pcmcia pcmcia: ds: fix possible name leak in error path in pcmcia_device_add() 2023-11-20 11:59:31 +01:00
peci
perf drivers/perf: hisi: Fix some event id for HiSilicon UC pmu 2024-01-25 15:35:13 -08:00
phy phy: sunplus: return negative error code in sp_usb_phy_probe 2024-01-10 17:16:57 +01:00
pinctrl pinctrl: cy8c95x0: Fix get_pincfg 2024-01-20 11:51:46 +01:00
platform platform/x86: p2sb: Allow p2sb_bar() calls during PCI device probe 2024-01-31 16:19:07 -08:00
pmdomain pmdomain: imx: Make imx pgc power domain also set the fwnode 2023-11-28 17:20:00 +00:00
pnp
power power: supply: Fix null pointer dereference in smb2_probe 2024-01-25 15:35:54 -08:00
powercap powercap: DTPM: Fix missing cpufreq_cpu_put() calls 2023-12-13 18:45:25 +01:00
pps
ps3
ptp ptp: annotate data-race around q->head and q->tail 2023-11-28 17:19:51 +00:00
pwm pwm: Fix out-of-bounds access in of_pwm_single_xlate() 2024-01-25 15:35:46 -08:00
rapidio
ras
regulator regulator: qcom-rpmh: Fix smps4 regulator for pm8550ve 2023-11-20 11:59:07 +01:00
remoteproc
reset reset: hisilicon: hi6220: fix Wvoid-pointer-to-enum-cast warning 2024-01-20 11:51:44 +01:00
rpmsg rpmsg: virtio: Free driver_override when rpmsg_remove() 2024-01-31 16:18:50 -08:00
rtc rtc: Extend timeout for waiting for UIP to clear to 1s 2024-01-31 16:18:56 -08:00
s390 s390/vfio-ap: do not reset queue removed from host config 2024-01-31 16:18:51 -08:00
sbus
scsi scsi: core: Kick the requeue list after inserting when flushing 2024-01-31 16:18:48 -08:00
sh
siox
slimbus
soc soc: fsl: cpm1: qmc: Fix rx channel reset 2024-01-31 16:18:51 -08:00
soundwire soundwire: fix initializing sysfs for same devices on different buses 2024-01-31 16:18:47 -08:00
spi spi: coldfire-qspi: Remove an erroneous clk_disable_unprepare() from the remove function 2024-01-25 15:35:55 -08:00
spmi spmi: mtk-pmif: Serialize PMIF status check and command submission 2024-01-25 15:35:53 -08:00
ssb
staging media: rkvdec: Hook the (TRY_)DECODER_CMD stateless ioctls 2024-01-25 15:35:32 -08:00
target scsi: target: core: add missing file_{start,end}_write() 2024-01-25 15:35:45 -08:00
tc
tee tee: optee: Fix supplicant based device enumeration 2023-12-13 18:45:11 +01:00
thermal thermal: core: Store trip pointer in struct thermal_instance 2024-01-31 16:19:10 -08:00
thunderbolt thunderbolt: Fix memory leak in margining_port_remove() 2024-01-01 12:42:46 +00:00
tty serial: Do not hold the port lock when setting rx-during-tx GPIO 2024-01-31 16:18:58 -08:00
ufs scsi: ufs: core: Remove the ufshcd_hba_exit() call from ufshcd_async_scan() 2024-01-31 16:18:48 -08:00
uio uio: Fix use-after-free in uio_open 2024-01-20 11:51:48 +01:00
usb usb: xhci-mtk: fix a short packet issue of gen1 isoc-in transfer 2024-01-25 15:35:54 -08:00
vdpa vdpa: Fix an error handling path in eni_vdpa_probe() 2024-01-25 15:35:54 -08:00
vfio hisi_acc_vfio_pci: Update migration data pointer correctly on saving/resume 2024-01-25 15:35:55 -08:00
vhost virtio/vsock: send credit update during setting SO_RCVLOWAT 2024-01-25 15:35:26 -08:00
video fbdev: flush deferred IO before closing 2024-01-25 15:35:45 -08:00
virt virt: sevguest: Fix passing a stack buffer as a scatterlist target 2023-11-20 11:59:30 +01:00
virtio virtio_ring: fix syncs DMA memory with different direction 2024-01-05 15:19:41 +01:00
vlynq
w1
watchdog watchdog: rti_wdt: Drop runtime pm reference count when watchdog is unused 2024-01-25 15:35:37 -08:00
xen swiotlb-xen: provide the "max_mapping_size" method 2023-12-03 07:33:07 +01:00
zorro
Kconfig
Makefile