Fix BTF confusion in rv.h
Subsystems (2)
Gabriele Monaco
maintainerPATCH 1/1 Fix BTF confusion in rv.h
The private rv.h header includes directly the private ../trace.h header, this brings a series of unneeded dependencies and, if included with da_monitor.h, may cause failures for duplicated symbols in BTF (namely, the events symbol).
Only import what is really necessary:
* trace.h is necessary only in rv.c (init function)
* the public tracepoint.h covers most uses
* other specific headers are now needed (interrupt.h)
* re-define RV_MODE_* as it is only private in trace
Signed-off-by Gabriele Monaco <[email protected]>
--- kernel/trace/rv/monitors/sts/sts_kunit.c | 1 + kernel/trace/rv/rv.c | 1 + kernel/trace/rv/rv.h | 6 +++--- 3 files changed, 5 insertions(+), 3 deletions(-)
kernel/trace/rv/monitors/sts/sts_kunit.c +1 -0
@@ -3,6 +3,7 @@#include <linux/rv.h> #include <rv/kunit.h> #include <trace/events/sched.h> +#include <linux/interrupt.h> #include "sts_kunit.h" #if IS_REACHABLE (CONFIG_RV_MON_STS )
kernel/trace/rv/rv.c +1 -0
@@ -142,6 +142,7 @@#include <linux/module.h> #include <linux/init.h> #include <linux/slab.h> +#include "../trace.h" #ifdef CONFIG_RV_MON_EVENTS #define CREATE_TRACE_POINTS
kernel/trace/rv/rv.h +3 -3
@@ -9,12 +9,12 @@ struct rv_interface {struct dentry *monitors_dir; }; -#include "../trace.h" +#include <linux/tracepoint.h> #include <linux/tracefs.h> #include <linux/rv.h> -#define RV_MODE_WRITE TRACE_MODE_WRITE -#define RV_MODE_READ TRACE_MODE_READ +#define RV_MODE_WRITE 0640 +#define RV_MODE_READ 0440#define rv_create_dir tracefs_create_dir#define rv_create_file tracefs_create_file
base-commit: 7475ea8b58616b33c04afb976cf0fbaad9dd63fb
Signature · 1 line
2.56.1