From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 126121 invoked by alias); 20 Dec 2017 17:08:26 -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 126106 invoked by uid 89); 20 Dec 2017 17:08:25 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-11.0 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,SPF_PASS,URIBL_RED autolearn=ham version=3.3.2 spammy= X-HELO: relay1.mentorg.com Date: Wed, 20 Dec 2017 17:08:00 -0000 From: Joseph Myers To: Palmer Dabbelt CC: , Andrew Waterman , Darius Rad , Subject: Re: [PATCH v2 09/15] RISC-V: Atomic and Locking Routines In-Reply-To: <20171220072022.26909-10-palmer@dabbelt.com> Message-ID: References: <20171220072022.26909-1-palmer@dabbelt.com> <20171220072022.26909-10-palmer@dabbelt.com> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-ClientProxiedBy: svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) To svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) X-SW-Source: 2017-12/txt/msg00756.txt.bz2 On Tue, 19 Dec 2017, Palmer Dabbelt wrote: > This patch implements various atomic and locking routines on RISC-V, > either via the A extension (when present) or via a Linux system call > that does a compare-and-exchange. This contains both the library > routines and the syscall wrapper. You said in the introduction that the 'A' extension would be required for Linux. I think you need to update the patch description - *and* the patch itself - to reflect that. > diff --git a/sysdeps/riscv/rv64/rvd/s_roundeven.c b/sysdeps/riscv/rv64/rvd/s_roundeven.c Does not belong in this patch. > diff --git a/sysdeps/riscv/rv64/rvf/s_llrintf.c b/sysdeps/riscv/rv64/rvf/s_llrintf.c Likewise. > +#ifdef __riscv_atomic > + > +#define __HAVE_64B_ATOMICS (__riscv_xlen >= 64) > +#define USE_ATOMIC_COMPILER_BUILTINS 1 > +#define ATOMIC_EXCHANGE_USES_CAS 0 Missing preprocessor indentation. > +/* Miscellaneous. */ > + > +#define asm_amo(which, ordering, mem, value) ({ \ Likewise, in this part of the file. > +#else /* __riscv_atomic */ And this part of the file should now just have a #error. (Giving an error for non-A at configure time would be a good idea as well, so the bad configuration gets detected as early as possible.) -- Joseph S. Myers joseph@codesourcery.com