[PATCH] Emulate sync instruction variants
James Yang
James.Yang at freescale.com
Fri Jul 5 07:56:49 EST 2013
On Thu, 4 Jul 2013, Benjamin Herrenschmidt wrote:
> On Thu, 2013-07-04 at 09:31 +0100, David Laight wrote:
> > Do you need to execute 'sync' here?
> > It is worth checking whether the trap entry/exit doesn't
> > do an implicit one for you.
>
> Not really. It does an implicit isync (more than one even) but not a
> sync.
The execution of a sync is required because the original sync variant
instruction is not actually executed, and, per Ben, no other explicit
sync exists in the exception handler. If the ISA extends the sync
instruction using its reserved bits, the intent would also be that
executing a heavyweight sync is suitably compatible, otherwise they
should have modified some other synchronization instruction. This
patch ensures at least one sync instruction is executed for each sync
variant instruction executed that triggers a program exception.
More information about the Linuxppc-dev
mailing list