Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1560776yba; Thu, 25 Apr 2019 01:44:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqx7a3FIDkLXFNZtFkzzELVWD1s1SodelvF2GkB3mEtlYMBrqTOH3fW+357HoR13pGmrqUrI X-Received: by 2002:a63:4553:: with SMTP id u19mr2997761pgk.353.1556181860293; Thu, 25 Apr 2019 01:44:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556181860; cv=none; d=google.com; s=arc-20160816; b=Fltu0qFRZylygrCkNECkzmQCBCUn6jIBpVlMS0/1Msi0ma3DRuWbcfm03lElI9jVru 38mkbT6N46eyZidlseLhmkQubsL7+Q/65L949it8x0fvhDtmlMpnN9m5Fq9Ps6HVHnqb QNbVtRs5nZKOgrFdNSgb5V0wXJ5bTn/6bZH2xrqgAXoErEXWTgzX41+IZiUgdOh9k4h1 0faOduLLVLbw2jkl4Jmw4L3Lwb32EXnFxA9VOKeDqLg+nnqwO9QH1WXGQPnt0g3AARB+ ZJ9H3QqVwDeAGd+rJIWXE8QLxkyIH5Gj5L6MU3UNqyNOuFYAjK0UnBCj4q1viBk/DDlm z3Dw== 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; bh=h67vG0bl/xud0pkDbwWxlwJcQ5+GKV0iRLlkLH6pnJU=; b=SHB75KnGObuUvtLJmazU75ZhTrA8M0Tw9V/G7ZE1Ye8+zdIVF3on4cO7fGIZ8kYkky t/doLxFJpe5IRoBw72z1wHxP6QENgos3c4f9Dgxtvz2Y5VTYZpgMtDmkoONGdLJgr0xb 8mIL30w4JMyCbixReqJEYA7h4gtNoLQCN4nFKTvLohse7sc0nkpGJAdRehwssJw3D8k5 lz5S9ILY7gTk1lkCWIfaqlKVpFHTNpIO3jQ2ggewr+e7XLisE7NEzq+6Wz8U+JxE9eGS 2a31aKCQXx3MtDfx6yvRB0Iu1ah+dFsqqKdITw26c8kBbNFLVqaDZDAW8JOwvXxCM3BV SR+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=tVNVK6lj; 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 f9si21676941plo.101.2019.04.25.01.44.05; Thu, 25 Apr 2019 01:44:20 -0700 (PDT) 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=tVNVK6lj; 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 S1730338AbfDYHe7 (ORCPT + 99 others); Thu, 25 Apr 2019 03:34:59 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:59512 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726184AbfDYHe7 (ORCPT ); Thu, 25 Apr 2019 03:34:59 -0400 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=h67vG0bl/xud0pkDbwWxlwJcQ5+GKV0iRLlkLH6pnJU=; b=tVNVK6ljLmjwJn8v4OP0XDQ6q pwibaRzMjqzP7Q5Gemz2z/hy/UMYneC2oCbyREnySjVl9pDNt5xS/xdTHfGslnlOdEuAophF/aI2/ OfzxVN59fkZ/2p+U9fHnohe+pJ47BOa37JQjGWnaTFntrdErLZ2fOjW7a3phJqG5eEqcT5E8LYs9l oNv9t3xri9tRgcVbm/P8OxtiW0DXAspr4WmBKxbw13LRpPgTH0Wz7GPi+O2oPNbtzNLFlRyz10BY8 P1N9/himo61F2GusKQWHYSu4fTgd7kX7pXSKbBX1rzs/gBIJNCf3VfeES/cKW5/x4qnHzVZhDYXVB Sz9Hcncxg==; 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.90_1 #2 (Red Hat Linux)) id 1hJYu4-0000BE-Dv; Thu, 25 Apr 2019 07:34:44 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id BACE220D0A200; Thu, 25 Apr 2019 09:34:42 +0200 (CEST) Date: Thu, 25 Apr 2019 09:34:42 +0200 From: Peter Zijlstra To: Paul Burton Cc: "stern@rowland.harvard.edu" , "akiyks@gmail.com" , "andrea.parri@amarulasolutions.com" , "boqun.feng@gmail.com" , "dlustig@nvidia.com" , "dhowells@redhat.com" , "j.alglave@ucl.ac.uk" , "luc.maranget@inria.fr" , "npiggin@gmail.com" , "paulmck@linux.ibm.com" , "will.deacon@arm.com" , "linux-kernel@vger.kernel.org" , "torvalds@linux-foundation.org" Subject: Re: [RFC][PATCH 4/5] mips/atomic: Fix smp_mb__{before,after}_atomic() Message-ID: <20190425073442.GW11158@hirez.programming.kicks-ass.net> References: <20190424123656.484227701@infradead.org> <20190424124421.751367532@infradead.org> <20190424212422.bykvyho3jqw6jz6w@pburton-laptop> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190424212422.bykvyho3jqw6jz6w@pburton-laptop> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 24, 2019 at 09:24:31PM +0000, Paul Burton wrote: > Hi Peter, > > On Wed, Apr 24, 2019 at 02:37:00PM +0200, Peter Zijlstra wrote: > > --- a/arch/mips/include/asm/barrier.h > > +++ b/arch/mips/include/asm/barrier.h > > @@ -230,9 +238,6 @@ > > #define nudge_writes() mb() > > #endif > > > > -#define __smp_mb__before_atomic() __smp_mb__before_llsc() > > -#define __smp_mb__after_atomic() smp_llsc_mb() > > - > > /* > > * Some Loongson 3 CPUs have a bug wherein execution of a memory access (load, > > * store or pref) in between an ll & sc can cause the sc instruction to > > I think this bit should be part of patch 3, where you currently add a > second definition of these 2 macros. Whoops, indeed. > Otherwise this one looks reasonable to me. Great, thanks!