thermal/core: Relocate the traces definition in thermal directory
authorDaniel Lezcano <daniel.lezcano@linaro.org>
Tue, 7 Mar 2023 13:37:25 +0000 (14:37 +0100)
committerDaniel Lezcano <daniel.lezcano@linaro.org>
Sat, 1 Apr 2023 18:51:45 +0000 (20:51 +0200)
The traces are exported but only local to the thermal core code. On
the other side, the traces take the thermal zone device structure as
argument, thus they have to rely on the exported thermal.h header
file. As we want to move the structure to the private thermal core
header, first we have to relocate those traces to the same place as
many drivers do.

Cc: Steven Rostedt <rostedt@goodmis.org>
Suggested-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Reviewed-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Link: https://lore.kernel.org/r/20230307133735.90772-2-daniel.lezcano@linaro.org
drivers/thermal/Makefile
drivers/thermal/cpufreq_cooling.c
drivers/thermal/devfreq_cooling.c
drivers/thermal/gov_fair_share.c
drivers/thermal/gov_power_allocator.c
drivers/thermal/gov_step_wise.c
drivers/thermal/thermal_core.c
drivers/thermal/thermal_helpers.c
drivers/thermal/thermal_trace.h [moved from include/trace/events/thermal.h with 97% similarity]
drivers/thermal/thermal_trace_ipa.h [moved from include/trace/events/thermal_power_allocator.h with 96% similarity]

index eed300e83d480eecde567cea5366585cf158141f..058664bc3ec097afac5257ae3f485672c63df9e0 100644 (file)
@@ -2,7 +2,7 @@
 #
 # Makefile for sensor chip drivers.
 #
-
+CFLAGS_thermal_core.o          := -I$(src)
 obj-$(CONFIG_THERMAL)          += thermal_sys.o
 thermal_sys-y                  += thermal_core.o thermal_sysfs.o
 thermal_sys-y                  += thermal_trip.o thermal_helpers.o
@@ -16,6 +16,7 @@ thermal_sys-$(CONFIG_THERMAL_OF)              += thermal_of.o
 thermal_sys-$(CONFIG_THERMAL_ACPI)             += thermal_acpi.o
 
 # governors
+CFLAGS_gov_power_allocator.o                   := -I$(src)
 thermal_sys-$(CONFIG_THERMAL_GOV_FAIR_SHARE)   += gov_fair_share.o
 thermal_sys-$(CONFIG_THERMAL_GOV_BANG_BANG)    += gov_bang_bang.o
 thermal_sys-$(CONFIG_THERMAL_GOV_STEP_WISE)    += gov_step_wise.o
index 9f8b438fcf8f826edcd7befb9fd52813ec971dd8..65ef08b30334321b041b7061d9b42216c397d795 100644 (file)
@@ -23,7 +23,7 @@
 #include <linux/thermal.h>
 #include <linux/units.h>
 
-#include <trace/events/thermal.h>
+#include "thermal_trace.h"
 
 /*
  * Cooling state <-> CPUFreq frequency
index 24b474925cd68e5e82fe6377e5c22b0bd0dc1317..262e62ab6cf2f280265d56bae61620019fd65f8f 100644 (file)
@@ -20,7 +20,7 @@
 #include <linux/thermal.h>
 #include <linux/units.h>
 
-#include <trace/events/thermal.h>
+#include "thermal_trace.h"
 
 #define SCALE_ERROR_MITIGATION 100
 
index aad7d5fe3a1483c3cfa06e5adaf153def653e792..03c2daeb6ee8bc7db2dfa4ba8c5537f07639bcb9 100644 (file)
@@ -11,7 +11,7 @@
  */
 
 #include <linux/thermal.h>
-#include <trace/events/thermal.h>
+#include "thermal_trace.h"
 
 #include "thermal_core.h"
 
index 0eaf1527d3e320b73b514efc5a1a1eddde85e511..8642f1096b91c800ab0c223bc76ac13faeb5dcb7 100644 (file)
@@ -12,7 +12,7 @@
 #include <linux/thermal.h>
 
 #define CREATE_TRACE_POINTS
-#include <trace/events/thermal_power_allocator.h>
+#include "thermal_trace_ipa.h"
 
 #include "thermal_core.h"
 
index 31235e169c5a093dfac47786c2e0e216d12fc6dd..3d3067804df244c4b054489d4b8e2d9d3ef9bbbc 100644 (file)
@@ -12,7 +12,7 @@
 
 #include <linux/thermal.h>
 #include <linux/minmax.h>
-#include <trace/events/thermal.h>
+#include "thermal_trace.h"
 
 #include "thermal_core.h"
 
index 5ae72f314683e004ec0bd9767c83ee25ae8034d2..ed628d21e1bc4a8472f65dab6d4ceed25fb0d09a 100644 (file)
@@ -22,7 +22,7 @@
 #include <linux/suspend.h>
 
 #define CREATE_TRACE_POINTS
-#include <trace/events/thermal.h>
+#include "thermal_trace.h"
 
 #include "thermal_core.h"
 #include "thermal_hwmon.h"
index 92e7e7fd7357b5a8b272a9fcc8e9f192b17748ef..cfba0965a22da0ba638a90f9075bae2915ee5c1f 100644 (file)
@@ -19,9 +19,8 @@
 #include <linux/string.h>
 #include <linux/sysfs.h>
 
-#include <trace/events/thermal.h>
-
 #include "thermal_core.h"
+#include "thermal_trace.h"
 
 int get_tz_trend(struct thermal_zone_device *tz, int trip)
 {
similarity index 97%
rename from include/trace/events/thermal.h
rename to drivers/thermal/thermal_trace.h
index e58bf3072f324493d84e76de2a5c1d53e405d33f..459c8ce6cf3b0dd1a9341d71bc2d14e9d40b1943 100644 (file)
@@ -195,5 +195,11 @@ TRACE_EVENT(thermal_power_devfreq_limit,
 #endif /* CONFIG_DEVFREQ_THERMAL */
 #endif /* _TRACE_THERMAL_H */
 
+#undef TRACE_INCLUDE_PATH
+#define TRACE_INCLUDE_PATH .
+
+#undef TRACE_INCLUDE_FILE
+#define TRACE_INCLUDE_FILE thermal_trace
+
 /* This part must be outside protection */
 #include <trace/define_trace.h>
similarity index 96%
rename from include/trace/events/thermal_power_allocator.h
rename to drivers/thermal/thermal_trace_ipa.h
index 1c8fb95544f93c87e93e68ef3c4ad49905f19556..84568db5421ba4c87c9de0d9e2c0f03268e9f97f 100644 (file)
@@ -84,5 +84,11 @@ TRACE_EVENT(thermal_power_allocator_pid,
 );
 #endif /* _TRACE_THERMAL_POWER_ALLOCATOR_H */
 
+#undef TRACE_INCLUDE_PATH
+#define TRACE_INCLUDE_PATH .
+
+#undef TRACE_INCLUDE_FILE
+#define TRACE_INCLUDE_FILE thermal_trace_ipa
+
 /* This part must be outside protection */
 #include <trace/define_trace.h>