]> git.baikalelectronics.ru Git - kernel.git/commit
tracing/perf: Add interrupt_context_level() helper
authorSteven Rostedt (VMware) <rostedt@goodmis.org>
Fri, 15 Oct 2021 19:01:19 +0000 (15:01 -0400)
committerSteven Rostedt (VMware) <rostedt@goodmis.org>
Wed, 20 Oct 2021 00:33:20 +0000 (20:33 -0400)
commit4970f2a41c45965990b7a6e01a57542fbf6a7d78
treebd54758edff84850b30b9d131fdb1a72bbf470f3
parent0010a3dffa31e327d4c93d09f260c04ea781cc7a
tracing/perf: Add interrupt_context_level() helper

Now that there are three different instances of doing the addition trick
to the preempt_count() and NMI_MASK, HARDIRQ_MASK and SOFTIRQ_OFFSET
macros, it deserves a helper function defined in the preempt.h header.

Add the interrupt_context_level() helper and replace the three instances
that do that logic with it.

Link: https://lore.kernel.org/all/20211015142541.4badd8a9@gandalf.local.home/
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
include/linux/preempt.h
include/linux/trace_recursion.h
kernel/events/internal.h
kernel/trace/ring_buffer.c