From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 122807 invoked by alias); 4 Nov 2016 18:37:23 -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 122797 invoked by uid 89); 4 Nov 2016 18:37:22 -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_50,KAM_LAZY_DOMAIN_SECURITY autolearn=no version=3.3.2 spammy=casa, larsson, LEON3, leon3 X-HELO: shards.monkeyblade.net Date: Fri, 04 Nov 2016 18:37:00 -0000 Message-Id: <20161104.143710.2239577261242146927.davem@davemloft.net> To: andreas@gaisler.com Cc: libc-alpha@sourceware.org, adhemerval.zanella@linaro.org, carlos@redhat.com, triegel@redhat.com, software@gaisler.com Subject: Re: [RFC][PATCH 2/2] sparc32: Use cas for atomic_* operations and use general pthread_barrier_wait From: David Miller In-Reply-To: <1478012867-6031-3-git-send-email-andreas@gaisler.com> References: <1478012867-6031-1-git-send-email-andreas@gaisler.com> <1478012867-6031-3-git-send-email-andreas@gaisler.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2016-11/txt/msg00196.txt.bz2 From: Andreas Larsson Date: Tue, 1 Nov 2016 16:07:47 +0100 > This uses the CASA compare and swap with user space data access ASI 0xa > that is present on many LEON3 and LEON4 systems and that is implied by > gcc's -mcpu=leon3. > > The CASA instruction is used not only for atomic compare and exchange > functions, but also atomic exchange functions and atomic write > functions. This is to allow the OS kernel to emulate that instruction on > systems where it is missing and to get atomicity between all atomic > writing functions without having to resort to stop all CPU:s in an SMP > system. Ok, this is fine. I'll work on the instruction emulation code for the kernel side.