Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752608AbdGFCCp (ORCPT ); Wed, 5 Jul 2017 22:02:45 -0400 Received: from bombadil.infradead.org ([65.50.211.133]:50389 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751914AbdGFCCn (ORCPT ); Wed, 5 Jul 2017 22:02:43 -0400 Date: Wed, 5 Jul 2017 19:01:41 -0700 From: Christoph Hellwig To: Palmer Dabbelt Cc: peterz@infradead.org, mingo@redhat.com, mcgrof@kernel.org, viro@zeniv.linux.org.uk, sfr@canb.auug.org.au, nicolas.dichtel@6wind.com, rmk+kernel@armlinux.org.uk, msalter@redhat.com, tklauser@distanz.ch, will.deacon@arm.com, james.hogan@imgtec.com, paul.gortmaker@windriver.com, linux@roeck-us.net, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, albert@sifive.com, patches@groups.riscv.org Subject: Re: [PATCH 8/9] RISC-V: User-facing API Message-ID: <20170706020141.GA1965@infradead.org> References: <20170704195102.3974-1-palmer@dabbelt.com> <20170704195102.3974-9-palmer@dabbelt.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170704195102.3974-9-palmer@dabbelt.com> User-Agent: Mutt/1.8.0 (2017-02-23) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 570 Lines: 12 I'm a bit concerned about these cmpxchg syscalls, and I'd like to understand if my concerns are justified. For a new instruction set that starts out in the 201x years we really should have cmpxchg as a mandatory instruction - if not in the CPU it should be in the Linux ABI so that we don't have to deal with a mess where programs will either need an indirection for CPUs that have cmpxchg capabilities vs those that don't, and we don't need to worry if given binaries work on all CPUs. What keeps from from declaring that the RISV-A extension is mandatory for Linux?