This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[RFC][PATCH 0/2] Make sparcv8 work again on cas enabled hardware
- From: Andreas Larsson <andreas at gaisler dot com>
- To: GNU C Library <libc-alpha at sourceware dot org>
- Cc: Adhemerval Zanella <adhemerval dot zanella at linaro dot org>, Carlos O'Donell <carlos at redhat dot com>, David Miller <davem at davemloft dot net>, Torvald Riegel <triegel at redhat dot com>, software at gaisler dot com
- Date: Tue, 1 Nov 2016 16:07:45 +0100
- Subject: [RFC][PATCH 0/2] Make sparcv8 work again on cas enabled hardware
- Authentication-results: sourceware.org; auth=none
- Authorized-sender: andreas at gaisler dot com
This patch series:
1) Fixes a sparcv8 bug introduced since the #error was added to
sysdeps/sparc/sparc32/pthread_barrier_wait.c in 2.23. This fix stops
incorrect usage of sendmsg and recvmsg Linux system calls for sparcv8.
2) Makes use of the CASA compare and swap instruction for atomic_*
functions sparcv8, that is available for most LEON3 and LEON4 designs
and implied by -mcpu=leon3, but not part of the sparcv8 standard. To
allow for easy kernel emulation on systems that lack the instruction,
the CASA instruction is used for all writing atomic_* functions. This
approach is discussed in thread [1].
Any comments are most welcome. The spin lock based sparcv8 semaphore
implementation is currently unchanged by this patchset, but I would say
that that should go as well. I will look into that as well, but I have
not tested that yet.
[1] https://sourceware.org/ml/libc-alpha/2016-10/msg00344.html
Andreas Larsson (2):
sparc32: Mark sendmsg and recvmsg system calls as unsupported
sparc32: Use cas for atomic_* operations and use general
pthread_barrier_wait
sysdeps/sparc/sparc32/atomic-machine.h | 228 +++++------------------
sysdeps/sparc/sparc32/pthread_barrier_wait.c | 1 -
sysdeps/unix/sysv/linux/sparc/kernel-features.h | 4 +-
3 files changed, 53 insertions(+), 180 deletions(-)
delete mode 100644 sysdeps/sparc/sparc32/pthread_barrier_wait.c