Subject: linux-next: manual merge of the rcu tree with the ftrace tree

From: Stephen Rothwell <[email-masked]>
Date: Thu, 6 Nov 2025 12:24:07 +1100

Hi all,

Today's linux-next merge of the rcu tree got a conflict in:

  include/linux/tracepoint.h

between commit:

  e30f8e61e251 ("tracing: Add a tracepoint verification check at build time")

from the ftrace tree and commit:

  e79b1eaca338 ("tracing: Guard __DECLARE_TRACE() use of __DO_TRACE_CALL() with SRCU-fast")

from the rcu tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc include/linux/tracepoint.h
index 8a56f3278b1b,9f8b19cd303a..000000000000
--- a/include/linux/tracepoint.h
+++ b/include/linux/tracepoint.h
@@@ -275,24 -271,29 +280,30 @@@ static inline struct tracepoint *tracep
  		return static_branch_unlikely(&__tracepoint_##name.key);\
  	}
  
- #define __DECLARE_TRACE(name, proto, args, cond, data_proto)		\
+ #define __DECLARE_TRACE(name, proto, args, cond, data_proto)			\
  	__DECLARE_TRACE_COMMON(name, PARAMS(proto), PARAMS(args), PARAMS(data_proto)) \
- 	static inline void __do_trace_##name(proto)			\
- 	{								\
- 		TRACEPOINT_CHECK(name)					\
- 		if (cond) {						\
- 			guard(preempt_notrace)();			\
- 			__DO_TRACE_CALL(name, TP_ARGS(args));		\
- 		}							\
- 	}								\
- 	static inline void trace_##name(proto)				\
- 	{								\
- 		if (static_branch_unlikely(&__tracepoint_##name.key))	\
- 			__do_trace_##name(args);			\
- 		if (IS_ENABLED(CONFIG_LOCKDEP) && (cond)) {		\
- 			WARN_ONCE(!rcu_is_watching(),			\
- 				  "RCU not watching for tracepoint");	\
- 		}							\
+ 	static inline void __do_trace_##name(proto)				\
+ 	{									\
++		TRACEPOINT_CHECK(name)						\
+ 		if (cond) {							\
+ 			if (IS_ENABLED(CONFIG_PREEMPT_RT) && preemptible()) {	\
+ 				guard(srcu_fast_notrace)(&tracepoint_srcu);	\
+ 				guard(migrate)();				\
+ 				__DO_TRACE_CALL(name, TP_ARGS(args));		\
+ 			} else {						\
+ 				guard(preempt_notrace)();			\
+ 				__DO_TRACE_CALL(name, TP_ARGS(args));		\
+ 			}							\
+ 		}								\
+ 	}									\
+ 	static inline void trace_##name(proto)					\
+ 	{									\
+ 		if (static_branch_unlikely(&__tracepoint_##name.key))		\
+ 			__do_trace_##name(args);				\
+ 		if (IS_ENABLED(CONFIG_LOCKDEP) && (cond)) {			\
+ 			WARN_ONCE(!rcu_is_watching(),				\
+ 				  "RCU not watching for tracepoint");		\
+ 		}								\
  	}
  
  #define __DECLARE_TRACE_SYSCALL(name, proto, args, data_proto)		\