powerpc: Fix tabort usage in syscalls
commit18173559a23e28055640b152e623d9f0d40ecca8
authorPaul E. Murphy <murphyp@linux.vnet.ibm.com>
Fri, 21 Aug 2015 19:39:01 +0000 (21 14:39 -0500)
committerTulio Magno Quites Machado Filho <tuliom@linux.vnet.ibm.com>
Tue, 25 Aug 2015 16:45:56 +0000 (25 13:45 -0300)
treef8c6124358298856fd939b2a6cf77a34d3dfaa46
parentfe7faec3e56a8dd64f78023a2f4a74fc8d42e79f
powerpc: Fix tabort usage in syscalls

Fix usage of tabort in generated syscalls.  r0 has special meaning
when used with this instruction, thus it will not generate
persistent errors, nor return an error code.  This mitigates poor
CPU usage when performing elided critical sections.

Additionally, transactions should be aborted when entering a user
invoked syscall.  Otherwise the results of the transaction may be
undefined.

2015-08-25  Paul E. Murphy  <murphyp@linux.vnet.ibm.com>

* sysdeps/powerpc/powerpc32/sysdep.h (ABORT_TRANSACTION): Use
register other than r0 for tabort, it has special meaning.
* sysdeps/powerpc/powerpc64/sysdep.h (ABORT_TRANSACTION): Likewise
* sysdeps/unix.sysv/linux/powerpc/syscall.S (syscall): Abort
transaction before starting syscall.
ChangeLog
sysdeps/powerpc/powerpc32/sysdep.h
sysdeps/powerpc/powerpc64/sysdep.h
sysdeps/unix/sysv/linux/powerpc/syscall.S