Received: by 10.223.176.5 with SMTP id f5csp2906362wra; Thu, 1 Feb 2018 07:51:01 -0800 (PST) X-Google-Smtp-Source: AH8x224Q1biCmHyHKwXOKtHWFzlDB3ly25KVl1fdxIFrSGJKkv4z/9A+BlZwN0yzSmF+FjD4+rIS X-Received: by 2002:a17:902:9895:: with SMTP id s21-v6mr31952215plp.297.1517500261173; Thu, 01 Feb 2018 07:51:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517500261; cv=none; d=google.com; s=arc-20160816; b=KKinrrCAqgQnGd3WxXKTVHzB9bh7pot4R8bvI1xM4/NRFTgA6jxAUbXFbYFvdJdulM hxF/Gql4JPwjZskar//0V/VkQeN5ukNUS7zE27kSAKfbJ6PQDtcwev/R6LjjEBtjfUWi npMSK79buTf1CRSAE915eW6cJIN0EMLbHVmU6GmtrGoKwkkAx3646Y1CDyS8SMotqkBS klF715YCUbtx+69Z8Ky5NQvbaJ8bRAmSpg52XNC0DL1+3L7wNpmxBUEPKbcjOlu3ZB5I z2rnwsYlFRS6bq94e1HnBubYRxK7srsqhr2yf0Yy06PqHptphZ4kfppHPBFFVeHigQgF iiRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=3DiSV57JmaChebRRlEyRmbrX8xK+x2PY3miJXItxrDw=; b=f7WoFa6oWbCqIFDgcXIGNAwrlhA/XBnzGJHrjOTNJLPN39STXEGD9ACc34O6dNbHDB 6EDN5qSPNQbnSfa41ks+pu3dtd3kszSQ8au00cV4Z2jytDsG76eorh/NP9qHsgphi9pL UGHZbfSMOUfrwngH/W6I5rEYRyXrmGSkLWtQ1MMAnaAIOZsVLwGx+i0XPpNiJv4tKXL1 TP/PDH/ngTFoIu0KFcmijLLrNvvFB5KI3q4eg0kpy72ijF9X4OI/jFozbX6PLtCrfdjp hDRMnqVbYOtqRdw6YcxI7G83GR2XJWaZBFLiHCOjsyDPzQ87EtqBx+3knw3LAXBAhb0x 9wvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=QO0fnMZA; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z12si3644651pgs.167.2018.02.01.07.50.46; Thu, 01 Feb 2018 07:51:01 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=QO0fnMZA; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752318AbeBAPuY (ORCPT + 99 others); Thu, 1 Feb 2018 10:50:24 -0500 Received: from bombadil.infradead.org ([65.50.211.133]:40023 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751706AbeBAPuV (ORCPT ); Thu, 1 Feb 2018 10:50:21 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=3DiSV57JmaChebRRlEyRmbrX8xK+x2PY3miJXItxrDw=; b=QO0fnMZAubpXAg9HNqmg5b9Ca JWiRvxPBQURp+ToJIN0TC67YhZOnOXFoOK9POrLVFGMFQR+WonaWUI/awWFlqTmypyR32gaTkMBJG cfGXSEKkN98nP3fidNiG8MISUvQkT5pw+QTxFCSjvFupJ9lVBRSNaCEJJORZc3Gt0fw70GeNr7A8+ BIezSggL0v0aI9WUCj1ADBiSJKSFu1IAupWOawMJHV8ThthHT+LN+zWV7YDY3qC6JrplePkaX6qra VHD5n5mhJJc7jgAi6lpT7wxKFZQFt1gd8Juq+zRj9dslNqETLjU04ifFVXlF8h92yNlegt+nk5qWT 3gk0MVLNg==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.89 #1 (Red Hat Linux)) id 1ehH7q-0004hG-IY; Thu, 01 Feb 2018 15:50:10 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id DCFA72029F9F9; Thu, 1 Feb 2018 16:50:07 +0100 (CET) Date: Thu, 1 Feb 2018 16:50:07 +0100 From: Peter Zijlstra To: Will Deacon Cc: Stafford Horne , Paul McKenney , Jonas Bonn , Stefan Kristiansson , David Howells , Arnd Bergmann , linux-kernel@vger.kernel.org, Thomas Gleixner Subject: Re: asm-generic: Disallow no-op mb() for SMP systems Message-ID: <20180201155007.GB2249@hirez.programming.kicks-ass.net> References: <20180131130034.GR2269@hirez.programming.kicks-ass.net> <20180131131737.GA5097@arm.com> <20180131132610.GT2269@hirez.programming.kicks-ass.net> <20180201122750.GE30895@lianli.shorne-pla.net> <20180201132909.GW2249@hirez.programming.kicks-ass.net> <20180201133229.GB9182@arm.com> <20180201135329.GB2269@hirez.programming.kicks-ass.net> <20180201153951.GG9182@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180201153951.GG9182@arm.com> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 01, 2018 at 03:39:51PM +0000, Will Deacon wrote: > > I could've gotten my brain in a twist or course, which isn't _that_ > > unusual. I never seem to be able to quite remember the holes you have > > with ll/sc on arm64 :-) > > Is smp_mb__before_atomic supposed to provide ordering guarantees if it's > used before a failed cmpxchg? If so, I think it's needed here because the > l.swa might not even execute. Or did I just invent another problem? I think it should do so indeed (and afaik all our current archs are good that way).