linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: daniel.lezcano@linaro.org, rafael@kernel.org
Cc: rui.zhang@intel.com, amitk@kernel.org,
	Steven Rostedt <rostedt@goodmis.org>,
	Amit Daniel Kachhap <amit.kachhap@gmail.com>,
	Viresh Kumar <viresh.kumar@linaro.org>,
	Lukasz Luba <lukasz.luba@arm.com>,
	Masami Hiramatsu <mhiramat@kernel.org>,
	linux-pm@vger.kernel.org (open list:THERMAL),
	linux-kernel@vger.kernel.org (open list),
	linux-trace-kernel@vger.kernel.org (open list:TRACING)
Subject: [PATCH v1 01/11] thermal/core: Relocate the traces definition in thermal directory
Date: Tue,  7 Mar 2023 14:37:25 +0100	[thread overview]
Message-ID: <20230307133735.90772-2-daniel.lezcano@linaro.org> (raw)
In-Reply-To: <20230307133735.90772-1-daniel.lezcano@linaro.org>

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>
---
 drivers/thermal/Makefile                                    | 3 ++-
 drivers/thermal/cpufreq_cooling.c                           | 2 +-
 drivers/thermal/devfreq_cooling.c                           | 2 +-
 drivers/thermal/gov_fair_share.c                            | 2 +-
 drivers/thermal/gov_power_allocator.c                       | 2 +-
 drivers/thermal/gov_step_wise.c                             | 2 +-
 drivers/thermal/thermal_core.c                              | 2 +-
 drivers/thermal/thermal_helpers.c                           | 3 +--
 .../events/thermal.h => drivers/thermal/thermal_trace.h     | 6 ++++++
 .../thermal/thermal_trace_ipa.h                             | 6 ++++++
 10 files changed, 21 insertions(+), 9 deletions(-)
 rename include/trace/events/thermal.h => drivers/thermal/thermal_trace.h (97%)
 rename include/trace/events/thermal_power_allocator.h => drivers/thermal/thermal_trace_ipa.h (96%)

diff --git a/drivers/thermal/Makefile b/drivers/thermal/Makefile
index eed300e83d48..058664bc3ec0 100644
--- a/drivers/thermal/Makefile
+++ b/drivers/thermal/Makefile
@@ -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
diff --git a/drivers/thermal/cpufreq_cooling.c b/drivers/thermal/cpufreq_cooling.c
index 9f8b438fcf8f..65ef08b30334 100644
--- a/drivers/thermal/cpufreq_cooling.c
+++ b/drivers/thermal/cpufreq_cooling.c
@@ -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
diff --git a/drivers/thermal/devfreq_cooling.c b/drivers/thermal/devfreq_cooling.c
index 24b474925cd6..262e62ab6cf2 100644
--- a/drivers/thermal/devfreq_cooling.c
+++ b/drivers/thermal/devfreq_cooling.c
@@ -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
 
diff --git a/drivers/thermal/gov_fair_share.c b/drivers/thermal/gov_fair_share.c
index aad7d5fe3a14..1ce5692151f5 100644
--- a/drivers/thermal/gov_fair_share.c
+++ b/drivers/thermal/gov_fair_share.c
@@ -11,7 +11,7 @@
  */
 
 #include <linux/thermal.h>
-#include <trace/events/thermal.h>
+#include "thermal_trace.h" 
 
 #include "thermal_core.h"
 
diff --git a/drivers/thermal/gov_power_allocator.c b/drivers/thermal/gov_power_allocator.c
index 0eaf1527d3e3..3df2d440d73d 100644
--- a/drivers/thermal/gov_power_allocator.c
+++ b/drivers/thermal/gov_power_allocator.c
@@ -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"
 
diff --git a/drivers/thermal/gov_step_wise.c b/drivers/thermal/gov_step_wise.c
index 31235e169c5a..f69c83e2992d 100644
--- a/drivers/thermal/gov_step_wise.c
+++ b/drivers/thermal/gov_step_wise.c
@@ -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"
 
diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c
index 46dedfe061df..cec72c6673a5 100644
--- a/drivers/thermal/thermal_core.c
+++ b/drivers/thermal/thermal_core.c
@@ -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"
diff --git a/drivers/thermal/thermal_helpers.c b/drivers/thermal/thermal_helpers.c
index 9558339f5633..c41b1a5700a5 100644
--- a/drivers/thermal/thermal_helpers.c
+++ b/drivers/thermal/thermal_helpers.c
@@ -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)
 {
diff --git a/include/trace/events/thermal.h b/drivers/thermal/thermal_trace.h
similarity index 97%
rename from include/trace/events/thermal.h
rename to drivers/thermal/thermal_trace.h
index e58bf3072f32..459c8ce6cf3b 100644
--- a/include/trace/events/thermal.h
+++ b/drivers/thermal/thermal_trace.h
@@ -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>
diff --git a/include/trace/events/thermal_power_allocator.h b/drivers/thermal/thermal_trace_ipa.h
similarity index 96%
rename from include/trace/events/thermal_power_allocator.h
rename to drivers/thermal/thermal_trace_ipa.h
index 1c8fb95544f9..84568db5421b 100644
--- a/include/trace/events/thermal_power_allocator.h
+++ b/drivers/thermal/thermal_trace_ipa.h
@@ -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>
-- 
2.34.1


       reply	other threads:[~2023-03-07 13:38 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20230307133735.90772-1-daniel.lezcano@linaro.org>
2023-03-07 13:37 ` Daniel Lezcano [this message]
2023-03-07 15:51   ` [PATCH v1 01/11] thermal/core: Relocate the traces definition in thermal directory Steven Rostedt
2023-03-07 13:37 ` [PATCH v1 02/11] thermal/drivers/intel_pch_thermal: Use thermal driver device to write a trace Daniel Lezcano
2023-03-07 13:37 ` [PATCH v1 03/11] thermal/drivers/intel_menlow: Remove add_one_attribute Daniel Lezcano
2023-03-13 10:55   ` Daniel Lezcano
2023-03-13 12:26     ` Rafael J. Wysocki
2023-03-13 12:35       ` Daniel Lezcano
2023-03-17 18:18         ` Rafael J. Wysocki
2023-04-04 18:12           ` Daniel Lezcano
2023-04-04 18:14             ` Rafael J. Wysocki
2023-03-07 13:37 ` [PATCH v1 04/11] thermal/drivers/db8500: Use driver dev instead of tz->device Daniel Lezcano
2023-03-07 20:52   ` Linus Walleij
2023-03-07 13:37 ` [PATCH v1 05/11] thermal/drivers/stm: Don't set no_hwmon to false Daniel Lezcano
2023-03-07 13:37 ` [PATCH v1 06/11] thermal/drivers/ti: Use fixed update interval Daniel Lezcano
2023-03-07 13:47   ` J, KEERTHY
2023-03-07 15:30   ` Gole, Dhruva
2023-03-07 13:37 ` [PATCH v1 07/11] thermal/drivers/bcm2835: Remove buggy call to thermal_of_zone_unregister Daniel Lezcano
2023-03-07 13:37 ` [PATCH v1 08/11] thermal/of: Unexport unused OF functions Daniel Lezcano
2023-03-07 13:37 ` [PATCH v1 09/11] thermal/core: Add a linked device parameter Daniel Lezcano
2023-03-27 16:16   ` Rafael J. Wysocki
2023-04-04 19:01     ` Daniel Lezcano
2023-04-14 18:43       ` Rafael J. Wysocki
2023-03-07 13:37 ` [PATCH v1 10/11] thermal/core: Alloc-copy-free the thermal zone parameters structure Daniel Lezcano
2023-03-15 12:54   ` kernel test robot
2023-03-18  9:07   ` Dan Carpenter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230307133735.90772-2-daniel.lezcano@linaro.org \
    --to=daniel.lezcano@linaro.org \
    --cc=amit.kachhap@gmail.com \
    --cc=amitk@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=lukasz.luba@arm.com \
    --cc=mhiramat@kernel.org \
    --cc=rafael@kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=rui.zhang@intel.com \
    --cc=viresh.kumar@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).