]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: mark idle code as noinstr
authorMark Rutland <mark.rutland@arm.com>
Mon, 30 Nov 2020 11:59:41 +0000 (11:59 +0000)
committerWill Deacon <will@kernel.org>
Mon, 30 Nov 2020 12:11:37 +0000 (12:11 +0000)
commit261d3aef4baf5a7f96c5ee447554018a6a9465ac
tree64675ee4d9a296076729d01728f4d3f88bc4ee90
parenta64cec05a04d382c1c92e12cf636edcd4546969f
arm64: mark idle code as noinstr

Core code disables RCU when calling arch_cpu_idle(), so it's not safe
for arch_cpu_idle() or its calees to be instrumented, as the
instrumentation callbacks may attempt to use RCU or other features which
are unsafe to use in this context.

Mark them noinstr to prevent issues.

The use of local_irq_enable() in arch_cpu_idle() is similarly
problematic, and the "sched/idle: Fix arch_cpu_idle() vs tracing" patch
queued in the tip tree addresses that case.

Reported-by: Marco Elver <elver@google.com>
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: James Morse <james.morse@arm.com>
Cc: Will Deacon <will@kernel.org>
Link: https://lore.kernel.org/r/20201130115950.22492-3-mark.rutland@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
arch/arm64/kernel/process.c