Thread (22 messages) 22 messages, 7 authors, 2018-06-04

Re: [PATCH 1/6] powerpc/64s: Add barrier_nospec

From: Nicholas Piggin <npiggin@gmail.com>
Date: 2018-04-24 05:45:10
Also in: lkml

On Tue, 24 Apr 2018 14:15:54 +1000
Michael Ellerman [off-list ref] wrote:
From: Michal Suchanek <redacted>

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 <redacted>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
mpe: Make it Book3S64 only, update comment & change log, add a
     memory clobber to the asm.
These all seem good to me. Thanks Michal.

We should (eventually) work on the module patching problem too.

Thanks,
Nick
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help