Commit 9894c58c authored by Steven Rostedt (VMware)'s avatar Steven Rostedt (VMware) Committed by Greg Kroah-Hartman
Browse files

tracing/perf: Add interrupt_context_level() helper

[ Upstream commit 91ebe8bc ]

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: default avatarSteven Rostedt (VMware) <rostedt@goodmis.org>
Stable-dep-of: 87c3a589 ("sched/core: Optimize in_task() and in_interrupt() a bit")
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 48fef664
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment