]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/64s: Add barrier_nospec
authorMichal Suchanek <msuchanek@suse.de>
Tue, 24 Apr 2018 04:15:54 +0000 (14:15 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Sun, 3 Jun 2018 10:43:44 +0000 (20:43 +1000)
commitadc043e67301b0ed673bd600db9f97df38d77a7f
tree48d64f39de11d958f2de430be59571a0695e733b
parent9b0806564b941eebf2d2231724fb7b6dad3add29
powerpc/64s: Add barrier_nospec

A no-op form of ori (or immediate of 0 into r31 and the result stored
in r31) has been re-tasked as a speculation barrier. The instruction
only acts as a barrier on newer machines with appropriate firmware
support. On older CPUs it remains a harmless no-op.

Implement barrier_nospec using this instruction.

mpe: The semantics of the instruction are believed to be that it
prevents execution of subsequent instructions until preceding branches
have been fully resolved and are no longer executing speculatively.
There is no further documentation available at this time.

Signed-off-by: Michal Suchanek <msuchanek@suse.de>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/include/asm/barrier.h