From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 80208 invoked by alias); 1 Nov 2016 15:08:43 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 80149 invoked by uid 89); 1 Nov 2016 15:08:42 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 spammy=casa, H*Ad:U*davem, patchset, Hx-languages-length:1427 X-HELO: bin-vsp-out-03.atm.binero.net X-Halon-ID: 08c5e042-a045-11e6-99f1-0050569116f7 Authorized-sender: andreas@gaisler.com From: Andreas Larsson To: GNU C Library Cc: Adhemerval Zanella , Carlos O'Donell , David Miller , Torvald Riegel , software@gaisler.com Subject: [RFC][PATCH 0/2] Make sparcv8 work again on cas enabled hardware Date: Tue, 01 Nov 2016 15:08:00 -0000 Message-Id: <1478012867-6031-1-git-send-email-andreas@gaisler.com> X-SW-Source: 2016-11/txt/msg00028.txt.bz2 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