]> git.baikalelectronics.ru Git - kernel.git/commit
tracing: Quiet smp_processor_id() use in preemptable warning in hwlat
authorSteven Rostedt (VMware) <rostedt@goodmis.org>
Wed, 4 Aug 2021 18:18:48 +0000 (14:18 -0400)
committerSteven Rostedt (VMware) <rostedt@goodmis.org>
Thu, 5 Aug 2021 13:27:31 +0000 (09:27 -0400)
commit7a9c9e54219db4363fd2f0838c827e2109d9081c
tree985cc8bdddf6ad3a03b3d73b8e9c992d5a17f7cf
parentbb0f1eaaf288d8a4084a759271af7530d4a07c8d
tracing: Quiet smp_processor_id() use in preemptable warning in hwlat

The hardware latency detector (hwlat) has a mode that it runs one thread
across CPUs. The logic to move from the currently running CPU to the next
one in the list does a smp_processor_id() to find where it currently is.
Unfortunately, it's done with preemption enabled, and this triggers a
warning for using smp_processor_id() in a preempt enabled section.

As it is only using smp_processor_id() to get information on where it
currently is in order to simply move it to the next CPU, it doesn't really
care if it got moved in the mean time. It will simply balance out later if
such a case arises.

Switch smp_processor_id() to raw_smp_processor_id() to quiet that warning.

Link: https://lkml.kernel.org/r/20210804141848.79edadc0@oasis.local.home
Acked-by: Daniel Bristot de Oliveira <bristot@redhat.com>
Fixes: 9d8629330d47 ("trace/hwlat: Implement the mode config option")
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
kernel/trace/trace_hwlat.c