From 56cf2763819d2f721c98f2b8bcc04a3c673837d3 Mon Sep 17 00:00:00 2001 From: Adhemerval Zanella Date: Fri, 7 Nov 2014 12:34:52 -0500 Subject: powerpc: abort transaction in syscalls Linux kernel powerpc documentation states issuing a syscall inside a transaction is not recommended and may lead to undefined behavior. It also states syscalls does not abort transactoin neither they run in transactional state. To avoid side-effects being visible outside transactions, GLIBC with lock elision enabled will issue a transaction abort instruction just before all syscalls if hardware supports hardware transactions. --- ChangeLog | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index 6737953b3c..093be37e30 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,22 @@ 2014-01-12 Adhemerval Zanella + * sysdeps/powerpc/nptl/tls.h (tcbhead_t): Add tm_capable field. + (TLS_INIT_TP): Add tm_capable initialization. + (TLS_DEFINE_INIT_TP): Likewise. + (THREAD_GET_TM_CAPABLE): New file: get tm_capable field value from + TCB. + (THREAD_SET_TM_CAPABLE): New file: set tm_capable field value in TCB. + * sysdeps/powerpc/nptl/tcb-offsets.sym (TM_CAPABLE): Add field offset + calculation. + * sysdeps/powerpc/powerpc32/sysdep.h (DO_CALL): Abort hardware + transactoion is lock elision is built and TCB tm_capable is set. + * sysdeps/powerpc/powerpc64/sysdep.h (DO_CALL): Likewise. + * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h + (INTERNAL_SYSCALL_NCS): Likewise. + * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h + (INTERNAL_SYSCALL_NCS): Likewise. + * sysdeps/powerpc/sysdep.h (ABORT_TRANSACTION): New define. + * sysdeps/powerpc/nptl/elide.h: New file: generic lock elision support for powerpc. * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h -- cgit 1.4.1