]> git.ipfire.org Git - thirdparty/glibc.git/commit
powerpc: Fix tabort usage in syscalls
authorPaul E. Murphy <murphyp@linux.vnet.ibm.com>
Fri, 21 Aug 2015 19:39:01 +0000 (14:39 -0500)
committerPaul E. Murphy <murphyp@linux.vnet.ibm.com>
Wed, 26 Aug 2015 17:22:33 +0000 (12:22 -0500)
commitc146a4a740c6242b2ad4842f9e717153277dd9a6
tree6ce8aab231b3cdb3444a931af5f5fd18cb8bd766
parent3fd69b26341e358cfe903313624ad8fd28810a96
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