]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 28 Nov 2023 16:56:21 +0000 (16:56 +0000)
commit9894c58c1777feaee5fe12274cd8030c8b1200f7
tree0c229ac37e43a577e8508d7088e11c6fa17066b1
parent48fef664d7e9bb3dcae9348efb3b8abf6c88ebec
tracing/perf: Add interrupt_context_level() helper

[ Upstream commit 91ebe8bcbff9d2ff21303e73bf7434f39a98b255 ]

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>
Stable-dep-of: 87c3a5893e86 ("sched/core: Optimize in_task() and in_interrupt() a bit")
Signed-off-by: Sasha Levin <sashal@kernel.org>
include/linux/preempt.h
include/linux/trace_recursion.h
kernel/events/internal.h
kernel/trace/ring_buffer.c