tracing: in_irq() cleanup
authorChangbin Du <changbin.du@gmail.com>
Thu, 30 Sep 2021 00:03:42 +0000 (08:03 +0800)
committerSteven Rostedt (VMware) <rostedt@goodmis.org>
Wed, 13 Oct 2021 22:19:41 +0000 (18:19 -0400)
Replace the obsolete and ambiguos macro in_irq() with new
macro in_hardirq().

Link: https://lkml.kernel.org/r/20210930000342.6016-1-changbin.du@gmail.com
Reviewed-by: Petr Mladek <pmladek@suse.com>
Signed-off-by: Changbin Du <changbin.du@gmail.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
kernel/trace/trace.h
kernel/trace/trace_functions_graph.c

index 6c38081..6b60ab9 100644 (file)
@@ -890,7 +890,7 @@ static inline int ftrace_graph_addr(struct ftrace_graph_ent *trace)
                 * is set, and called by an interrupt handler, we still
                 * want to trace it.
                 */
-               if (in_irq())
+               if (in_hardirq())
                        trace_recursion_set(TRACE_IRQ_BIT);
                else
                        trace_recursion_clear(TRACE_IRQ_BIT);
index 6b5ff3b..203204c 100644 (file)
@@ -120,7 +120,7 @@ static inline int ftrace_graph_ignore_irqs(void)
        if (!ftrace_graph_skip_irqs || trace_recursion_test(TRACE_IRQ_BIT))
                return 0;
 
-       return in_irq();
+       return in_hardirq();
 }
 
 int trace_graph_entry(struct ftrace_graph_ent *trace)