From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 52878 invoked by alias); 26 Nov 2019 18:16:54 -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 52825 invoked by uid 89); 26 Nov 2019 18:16:47 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-9.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: mail-qv1-f66.google.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:openpgp:autocrypt:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=Ho0jVsRKbbDV6el3cflrG63kR/o2iWCfaZrDZwj/s8s=; b=rWaREaTgUcSRUoFnY304II/OhELTJi3irKg2O48AZTXKwiRnGBpUkBJhZzuYSgmj8C BgTKp6DcdkDMC4CBgHLr3OMtDt8YtXSp+AqSRUZ3T/hP0ZAUX7dee/VYBp0BMA8I6FMX /5fyDR3pL7NpwUVnGp4napH/XFxHXBz87/dyFbtz4LCIlNL8zixxFHTyE3G7Ddzll3vb XCee+iy1COmxGfeQj/LXsv5BmEatxjZuVmEgDpl+m6iHu67pqAqp3+N1ZbgOmzmdncdG FIcS62CzaK77d1ExCgRWKDOpJegXeYJY9ShT9BL6NZOOHM40OouTvlr/+0N7mGEn67vi EHwg== Return-Path: Subject: Re: [PATCH 2/2] sparc: Use atomic compiler builtins on sparc To: Andreas Larsson , libc-alpha@sourceware.org Cc: Romain Naour References: <20191113192823.17109-1-adhemerval.zanella@linaro.org> <20191113192823.17109-2-adhemerval.zanella@linaro.org> From: Adhemerval Zanella Openpgp: preference=signencrypt Message-ID: Date: Tue, 26 Nov 2019 18:16:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-SW-Source: 2019-11/txt/msg00877.txt.bz2 On 19/11/2019 11:23, Andreas Larsson wrote: > On 2019-11-13 20:28, Adhemerval Zanella wrote: >> This patch removes the arch-specific atomic instruction, relying on >> compiler builtins.  The __sparc32_atomic_locks support is removed >> and a configure check is added to check if compiler uses libatomic >> to implement CAS. >> >> It also removes the sparc specific sem_* and pthread_barrier_* >> implementations.  It in turn allows buidling against a LEON3/LEON4 >> sparcv8 target, although it will still be incompatible with generic >> sparcv9. >> >> Checked on sparcv9-linux-gnu and sparc64-linux-gnu.  I also checked >> with build against sparcv8-linux-gnu with -mcpu=leon3. > > I tested this on LEON vith the nptl-tests, and it works fine! > > I still think that it would be useful to have kernel emulation for these > atomics for sparc32 running on v8 or v9 in the future. If not in glibc, > perhaps it could be solved by trapping to the kernel from the compiler > builtins when compiling for Linux, via some option that GLIBC can enable > when building for a new enough kernel. > > Tested-by: Andreas Larsson I will commit this shortly if no one opposes it, I am just finishing a smoke test on sparcv9 and sparc64.