[PATCH] Emulate sync instruction variants
David Laight
David.Laight at ACULAB.COM
Thu Jul 4 18:31:19 EST 2013
> Reserved fields of the sync instruction have been used for other
> instructions (e.g. lwsync). On processors that do not support variants
> of the sync instruction, emulate it by executing a sync to subsume the
> effect of the intended instruction.
...
> + /* Emulate sync instruction variants */
> + if ((instword & PPC_INST_SYNC_MASK) == PPC_INST_SYNC) {
> + PPC_WARN_EMULATED(sync, regs);
> + asm volatile ("sync");
> + return 0;
> + }
Do you need to execute 'sync' here?
It is worth checking whether the trap entry/exit doesn't
do an implicit one for you.
David
More information about the Linuxppc-dev
mailing list