tracing: fix compile failure on RT with PREEMPT_RT off
PATCH 1/1 tracing: fix compile failure on RT with PREEMPT_RT off
This patch is against v5.9-rc8-rt14
Fix a compile issue when CONFIG_PREEMPT_RT is not defined. If we're not on an RT kernel, just set the migration disabled status to zero.
Signed-off-by Clark Williams <[email protected]>
--- kernel/trace/trace.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-)
kernel/trace/trace.c +11 -1
@@ -2437,6 +2437,16 @@ enum print_line_t trace_handle_return(struct trace_seq *s) }EXPORT_SYMBOL_GPL (trace_handle_return); +static inline unsigned short +migration_disable_value (struct task_struct *tsk) +{ +#if defined(CONFIG_SMP ) && defined(CONFIG_PREEMPT_RT ) +return (tsk) ? tsk->migration_disabled :0 ; +#else +return 0 ; +#endif +} +void tracing_generic_entry_update (struct trace_entry *entry,unsigned short type,unsigned long flags,int pc)
@@ -2460,7 +2470,7 @@ tracing_generic_entry_update(struct trace_entry *entry, unsigned short type, (need_resched_lazy () ?TRACE_FLAG_NEED_RESCHED_LAZY :0 ) | (test_preempt_need_resched () ?TRACE_FLAG_PREEMPT_RESCHED :0 ); - entry->migrate_disable = (tsk) ? tsk->migration_disabled &0xFF :0 ; + entry->migrate_disable = migration_disable_value(tsk) & 0xFF : 0; }EXPORT_SYMBOL_GPL (tracing_generic_entry_update);
Signature · 1 line
2.28.0
Quoted 5 lines · Clark Williams
This patch is against v5.9-rc8-rt14
Fix a compile issue when
CONFIG_PREEMPT_RTis not defined. If we're not on an RT kernel, just set the migration disabled status to zero.
Thank you. Let me fold it where it belongs. As of now, I don't know if we can keep it or have to use the trace events Peter made.
Quoted 1 line
Signed-off-by Clark Williams <[email protected]>
Sebastian