]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: Force SSBS on context switch
authorMarc Zyngier <marc.zyngier@arm.com>
Mon, 22 Jul 2019 13:53:09 +0000 (14:53 +0100)
committerWill Deacon <will@kernel.org>
Mon, 22 Jul 2019 14:24:16 +0000 (15:24 +0100)
commit78535d2a936e94256bf4e9d61668a2dbe6139cb2
tree04692e85f7d27e7ff4c6c07aed2905a1d6b7112d
parentbf9ae4d2fd4264963ffc9373f0ee19cfc5fbfff0
arm64: Force SSBS on context switch

On a CPU that doesn't support SSBS, PSTATE[12] is RES0.  In a system
where only some of the CPUs implement SSBS, we end-up losing track of
the SSBS bit across task migration.

To address this issue, let's force the SSBS bit on context switch.

Fixes: 4416748742ea ("arm64: ssbd: Add support for PSTATE.SSBS rather than trapping to EL3")
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
[will: inverted logic and added comments]
Signed-off-by: Will Deacon <will@kernel.org>
arch/arm64/include/asm/processor.h
arch/arm64/kernel/process.c