summaryrefslogtreecommitdiff
path: root/include/trace
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2023-04-25 18:32:43 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2023-04-25 18:32:43 -0700
commit5e0ca0bfc33b7196ae3a5cbe26289a4025618f5a (patch)
tree8217d81a7f1f869c42753d254b60141db7eada6d /include/trace
parent4173cf6fb6b7d1b4569cca08af318c4561356fb5 (diff)
parent5bc6b1df65c87f8dd7d0afe494a2c0b9d5c73140 (diff)
Merge tag 'thermal-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull thermal control updates from Rafael Wysocki: "These mostly continue to prepare the thermal control subsystem for using unified representation of trip points, which includes cleanups, code refactoring and similar and update several drivers (for other reasons), which includes new hardware support. Specifics: - Add a thermal zone 'devdata' accessor and modify several drivers to use it (Daniel Lezcano) - Prevent drivers from using the 'device' internal thermal zone structure field directly (Daniel Lezcano) - Clean up the hwmon thermal driver (Daniel Lezcano) - Add thermal zone id accessor and thermal zone type accessor and prevent drivers from using thermal zone fields directly (Daniel Lezcano) - Clean up the acerhdf and tegra thermal drivers (Daniel Lezcano) - Add lower bound check for sysfs input to the x86_pkg_temp_thermal Intel thermal driver (Zhang Rui) - Add more thermal zone device encapsulation: prevent setting structure field directly, access the sensor device instead the thermal zone's device for trace, relocate the traces in drivers/thermal (Daniel Lezcano) - Use the generic trip point for the i.MX and remove the get_trip_temp ops (Daniel Lezcano) - Use the devm_platform_ioremap_resource() in the Hisilicon driver (Yang Li) - Remove R-Car H3 ES1.* handling as public has only access to the ES2 version and the upstream support for the ES1 has been shutdown (Wolfram Sang) - Add a delay after initializing the bank in order to let the time to the hardware to initialze itself before reading the temperature (Amjad Ouled-Ameur) - Add MT8365 support (Amjad Ouled-Ameur) - Preparational cleanup and DT bindings for RK3588 support (Sebastian Reichel) - Add driver support for RK3588 (Finley Xiao) - Use devm_reset_control_array_get_exclusive() for the Rockchip driver (Ye Xingchen) - Detect power gated thermal zones and return -EAGAIN when reading the temperature (Mikko Perttunen) - Remove thermal_bind_params structure as it is unused (Zhang Rui) - Drop unneeded quotes in DT bindings allowing to run yamllint (Rob Herring) - Update the power allocator documentation according to the thermal trace relocation (Lukas Bulwahn) - Fix sensor 1 interrupt status bitmask for the Mediatek LVTS sensor (Chen-Yu Tsai) - Use the dev_err_probe() helper in the Amlogic driver (Ye Xingchen) - Add AP domain support to LVTS thermal controllers for mt8195 (Balsam CHIHI) - Remove buggy call to thermal_of_zone_unregister() (Daniel Lezcano) - Make thermal_of_zone_[un]register() private to the thermal OF code (Daniel Lezcano) - Create a private copy of the thermal zone device parameters structure when registering a thermal zone (Daniel Lezcano) - Fix a kernel NULL pointer dereference in thermal_hwmon (Zhang Rui) - Revert recent message adjustment in thermal_hwmon (Rafael Wysocki) - Use of_property_present() for testing DT property presence in thermal control code (Rob Herring) - Clean up thermal_list_lock locking in the thermal core (Rafael Wysocki) - Add DLVR support for RFIM control in the int340x Intel thermal driver (Srinivas Pandruvada)" * tag 'thermal-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (55 commits) thermal: intel: int340x: Add DLVR support for RFIM control thermal/core: Alloc-copy-free the thermal zone parameters structure thermal/of: Unexport unused OF functions thermal/drivers/bcm2835: Remove buggy call to thermal_of_zone_unregister thermal/drivers/mediatek/lvts_thermal: Add AP domain for mt8195 dt-bindings: thermal: mediatek: Add AP domain to LVTS thermal controllers for mt8195 thermal: amlogic: Use dev_err_probe() thermal/drivers/mediatek/lvts_thermal: Fix sensor 1 interrupt status bitmask MAINTAINERS: adjust entry in THERMAL/POWER_ALLOCATOR after header movement dt-bindings: thermal: Drop unneeded quotes thermal/core: Remove thermal_bind_params structure thermal/drivers/tegra-bpmp: Handle offline zones thermal/drivers/rockchip: use devm_reset_control_array_get_exclusive() dt-bindings: rockchip-thermal: Support the RK3588 SoC compatible thermal/drivers/rockchip: Support RK3588 SoC in the thermal driver thermal/drivers/rockchip: Support dynamic sized sensor array thermal/drivers/rockchip: Simplify channel id logic thermal/drivers/rockchip: Use dev_err_probe thermal/drivers/rockchip: Simplify clock logic thermal/drivers/rockchip: Simplify getting match data ...
Diffstat (limited to 'include/trace')
-rw-r--r--include/trace/events/thermal.h199
-rw-r--r--include/trace/events/thermal_power_allocator.h88
2 files changed, 0 insertions, 287 deletions
diff --git a/include/trace/events/thermal.h b/include/trace/events/thermal.h
deleted file mode 100644
index e58bf3072f32..000000000000
--- a/include/trace/events/thermal.h
+++ /dev/null
@@ -1,199 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-#undef TRACE_SYSTEM
-#define TRACE_SYSTEM thermal
-
-#if !defined(_TRACE_THERMAL_H) || defined(TRACE_HEADER_MULTI_READ)
-#define _TRACE_THERMAL_H
-
-#include <linux/devfreq.h>
-#include <linux/thermal.h>
-#include <linux/tracepoint.h>
-
-TRACE_DEFINE_ENUM(THERMAL_TRIP_CRITICAL);
-TRACE_DEFINE_ENUM(THERMAL_TRIP_HOT);
-TRACE_DEFINE_ENUM(THERMAL_TRIP_PASSIVE);
-TRACE_DEFINE_ENUM(THERMAL_TRIP_ACTIVE);
-
-#define show_tzt_type(type) \
- __print_symbolic(type, \
- { THERMAL_TRIP_CRITICAL, "CRITICAL"}, \
- { THERMAL_TRIP_HOT, "HOT"}, \
- { THERMAL_TRIP_PASSIVE, "PASSIVE"}, \
- { THERMAL_TRIP_ACTIVE, "ACTIVE"})
-
-TRACE_EVENT(thermal_temperature,
-
- TP_PROTO(struct thermal_zone_device *tz),
-
- TP_ARGS(tz),
-
- TP_STRUCT__entry(
- __string(thermal_zone, tz->type)
- __field(int, id)
- __field(int, temp_prev)
- __field(int, temp)
- ),
-
- TP_fast_assign(
- __assign_str(thermal_zone, tz->type);
- __entry->id = tz->id;
- __entry->temp_prev = tz->last_temperature;
- __entry->temp = tz->temperature;
- ),
-
- TP_printk("thermal_zone=%s id=%d temp_prev=%d temp=%d",
- __get_str(thermal_zone), __entry->id, __entry->temp_prev,
- __entry->temp)
-);
-
-TRACE_EVENT(cdev_update,
-
- TP_PROTO(struct thermal_cooling_device *cdev, unsigned long target),
-
- TP_ARGS(cdev, target),
-
- TP_STRUCT__entry(
- __string(type, cdev->type)
- __field(unsigned long, target)
- ),
-
- TP_fast_assign(
- __assign_str(type, cdev->type);
- __entry->target = target;
- ),
-
- TP_printk("type=%s target=%lu", __get_str(type), __entry->target)
-);
-
-TRACE_EVENT(thermal_zone_trip,
-
- TP_PROTO(struct thermal_zone_device *tz, int trip,
- enum thermal_trip_type trip_type),
-
- TP_ARGS(tz, trip, trip_type),
-
- TP_STRUCT__entry(
- __string(thermal_zone, tz->type)
- __field(int, id)
- __field(int, trip)
- __field(enum thermal_trip_type, trip_type)
- ),
-
- TP_fast_assign(
- __assign_str(thermal_zone, tz->type);
- __entry->id = tz->id;
- __entry->trip = trip;
- __entry->trip_type = trip_type;
- ),
-
- TP_printk("thermal_zone=%s id=%d trip=%d trip_type=%s",
- __get_str(thermal_zone), __entry->id, __entry->trip,
- show_tzt_type(__entry->trip_type))
-);
-
-#ifdef CONFIG_CPU_THERMAL
-TRACE_EVENT(thermal_power_cpu_get_power_simple,
- TP_PROTO(int cpu, u32 power),
-
- TP_ARGS(cpu, power),
-
- TP_STRUCT__entry(
- __field(int, cpu)
- __field(u32, power)
- ),
-
- TP_fast_assign(
- __entry->cpu = cpu;
- __entry->power = power;
- ),
-
- TP_printk("cpu=%d power=%u", __entry->cpu, __entry->power)
-);
-
-TRACE_EVENT(thermal_power_cpu_limit,
- TP_PROTO(const struct cpumask *cpus, unsigned int freq,
- unsigned long cdev_state, u32 power),
-
- TP_ARGS(cpus, freq, cdev_state, power),
-
- TP_STRUCT__entry(
- __bitmask(cpumask, num_possible_cpus())
- __field(unsigned int, freq )
- __field(unsigned long, cdev_state)
- __field(u32, power )
- ),
-
- TP_fast_assign(
- __assign_bitmask(cpumask, cpumask_bits(cpus),
- num_possible_cpus());
- __entry->freq = freq;
- __entry->cdev_state = cdev_state;
- __entry->power = power;
- ),
-
- TP_printk("cpus=%s freq=%u cdev_state=%lu power=%u",
- __get_bitmask(cpumask), __entry->freq, __entry->cdev_state,
- __entry->power)
-);
-#endif /* CONFIG_CPU_THERMAL */
-
-#ifdef CONFIG_DEVFREQ_THERMAL
-TRACE_EVENT(thermal_power_devfreq_get_power,
- TP_PROTO(struct thermal_cooling_device *cdev,
- struct devfreq_dev_status *status, unsigned long freq,
- u32 power),
-
- TP_ARGS(cdev, status, freq, power),
-
- TP_STRUCT__entry(
- __string(type, cdev->type )
- __field(unsigned long, freq )
- __field(u32, busy_time)
- __field(u32, total_time)
- __field(u32, power)
- ),
-
- TP_fast_assign(
- __assign_str(type, cdev->type);
- __entry->freq = freq;
- __entry->busy_time = status->busy_time;
- __entry->total_time = status->total_time;
- __entry->power = power;
- ),
-
- TP_printk("type=%s freq=%lu load=%u power=%u",
- __get_str(type), __entry->freq,
- __entry->total_time == 0 ? 0 :
- (100 * __entry->busy_time) / __entry->total_time,
- __entry->power)
-);
-
-TRACE_EVENT(thermal_power_devfreq_limit,
- TP_PROTO(struct thermal_cooling_device *cdev, unsigned long freq,
- unsigned long cdev_state, u32 power),
-
- TP_ARGS(cdev, freq, cdev_state, power),
-
- TP_STRUCT__entry(
- __string(type, cdev->type)
- __field(unsigned int, freq )
- __field(unsigned long, cdev_state)
- __field(u32, power )
- ),
-
- TP_fast_assign(
- __assign_str(type, cdev->type);
- __entry->freq = freq;
- __entry->cdev_state = cdev_state;
- __entry->power = power;
- ),
-
- TP_printk("type=%s freq=%u cdev_state=%lu power=%u",
- __get_str(type), __entry->freq, __entry->cdev_state,
- __entry->power)
-);
-#endif /* CONFIG_DEVFREQ_THERMAL */
-#endif /* _TRACE_THERMAL_H */
-
-/* This part must be outside protection */
-#include <trace/define_trace.h>
diff --git a/include/trace/events/thermal_power_allocator.h b/include/trace/events/thermal_power_allocator.h
deleted file mode 100644
index 1c8fb95544f9..000000000000
--- a/include/trace/events/thermal_power_allocator.h
+++ /dev/null
@@ -1,88 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-#undef TRACE_SYSTEM
-#define TRACE_SYSTEM thermal_power_allocator
-
-#if !defined(_TRACE_THERMAL_POWER_ALLOCATOR_H) || defined(TRACE_HEADER_MULTI_READ)
-#define _TRACE_THERMAL_POWER_ALLOCATOR_H
-
-#include <linux/tracepoint.h>
-
-TRACE_EVENT(thermal_power_allocator,
- TP_PROTO(struct thermal_zone_device *tz, u32 *req_power,
- u32 total_req_power, u32 *granted_power,
- u32 total_granted_power, size_t num_actors,
- u32 power_range, u32 max_allocatable_power,
- int current_temp, s32 delta_temp),
- TP_ARGS(tz, req_power, total_req_power, granted_power,
- total_granted_power, num_actors, power_range,
- max_allocatable_power, current_temp, delta_temp),
- TP_STRUCT__entry(
- __field(int, tz_id )
- __dynamic_array(u32, req_power, num_actors )
- __field(u32, total_req_power )
- __dynamic_array(u32, granted_power, num_actors)
- __field(u32, total_granted_power )
- __field(size_t, num_actors )
- __field(u32, power_range )
- __field(u32, max_allocatable_power )
- __field(int, current_temp )
- __field(s32, delta_temp )
- ),
- TP_fast_assign(
- __entry->tz_id = tz->id;
- memcpy(__get_dynamic_array(req_power), req_power,
- num_actors * sizeof(*req_power));
- __entry->total_req_power = total_req_power;
- memcpy(__get_dynamic_array(granted_power), granted_power,
- num_actors * sizeof(*granted_power));
- __entry->total_granted_power = total_granted_power;
- __entry->num_actors = num_actors;
- __entry->power_range = power_range;
- __entry->max_allocatable_power = max_allocatable_power;
- __entry->current_temp = current_temp;
- __entry->delta_temp = delta_temp;
- ),
-
- TP_printk("thermal_zone_id=%d req_power={%s} total_req_power=%u granted_power={%s} total_granted_power=%u power_range=%u max_allocatable_power=%u current_temperature=%d delta_temperature=%d",
- __entry->tz_id,
- __print_array(__get_dynamic_array(req_power),
- __entry->num_actors, 4),
- __entry->total_req_power,
- __print_array(__get_dynamic_array(granted_power),
- __entry->num_actors, 4),
- __entry->total_granted_power, __entry->power_range,
- __entry->max_allocatable_power, __entry->current_temp,
- __entry->delta_temp)
-);
-
-TRACE_EVENT(thermal_power_allocator_pid,
- TP_PROTO(struct thermal_zone_device *tz, s32 err, s32 err_integral,
- s64 p, s64 i, s64 d, s32 output),
- TP_ARGS(tz, err, err_integral, p, i, d, output),
- TP_STRUCT__entry(
- __field(int, tz_id )
- __field(s32, err )
- __field(s32, err_integral)
- __field(s64, p )
- __field(s64, i )
- __field(s64, d )
- __field(s32, output )
- ),
- TP_fast_assign(
- __entry->tz_id = tz->id;
- __entry->err = err;
- __entry->err_integral = err_integral;
- __entry->p = p;
- __entry->i = i;
- __entry->d = d;
- __entry->output = output;
- ),
-
- TP_printk("thermal_zone_id=%d err=%d err_integral=%d p=%lld i=%lld d=%lld output=%d",
- __entry->tz_id, __entry->err, __entry->err_integral,
- __entry->p, __entry->i, __entry->d, __entry->output)
-);
-#endif /* _TRACE_THERMAL_POWER_ALLOCATOR_H */
-
-/* This part must be outside protection */
-#include <trace/define_trace.h>