]> git.baikalelectronics.ru Git - kernel.git/commit
arm64/sve: Make kernel FPU protection RT friendly
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>
Thu, 5 May 2022 16:32:06 +0000 (18:32 +0200)
committerCatalin Marinas <catalin.marinas@arm.com>
Mon, 16 May 2022 18:15:46 +0000 (19:15 +0100)
commite7ecaf2a789406fb59f5a3cb7f83fdb7ec5cb625
tree26fdce18b68129c68f624ee622f0f78b60216faf
parent9bc582806ee133326b2daccc9c3b7e287f26b10f
arm64/sve: Make kernel FPU protection RT friendly

Non RT kernels need to protect FPU against preemption and bottom half
processing. This is achieved by disabling bottom halves via
local_bh_disable() which implictly disables preemption.

On RT kernels this protection mechanism is not sufficient because
local_bh_disable() does not disable preemption. It serializes bottom half
related processing via a CPU local lock.

As bottom halves are running always in thread context on RT kernels
disabling preemption is the proper choice as it implicitly prevents bottom
half processing.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Acked-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220505163207.85751-3-bigeasy@linutronix.de
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/kernel/fpsimd.c