Received: by 10.223.185.116 with SMTP id b49csp3587691wrg; Mon, 26 Feb 2018 02:37:04 -0800 (PST) X-Google-Smtp-Source: AH8x2248ECbFNpKmZbQnS844eTh2wvSDCLZUzYhuXU5nOmiF0C5m9ckL8F6K/dBkD6+wxN4lf1YD X-Received: by 2002:a17:902:1683:: with SMTP id h3-v6mr10331591plh.433.1519641424394; Mon, 26 Feb 2018 02:37:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519641424; cv=none; d=google.com; s=arc-20160816; b=Vw6qGFCDje7m4ozmM4+d65gb4P/OiiyZ8FxVwA5IzQKHlLMkVfTHa/+/LJOXOczZNA 3Ii6Jqb95HkEd5jbscbiYuWIsAbAMLxZ2lH+aq2kHhX9P50SDsE5/raVDKw+8cyyXHT2 kvDMvAlHA54GoSFPk92onoUeIorqOHbKBzeqd2ElJlOrscBUPb0VT6SwK/UXMtbOEJE0 kK4jH3PnFTVdktkGoEPY6SNCsG9+LkSMuKV05Fexd3e15wt8DjdEr8sbm6tRCfAoveXd eU54tL0nVG6nIIfF1RjbZyKXaRmdgVCfp2kuqMMEk0dJTXeCmuB/qA1JvIKagQMALMx3 LfrQ== 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=x5vHkLxo1bRBOOw1Ay+FdI3XUSgQnv7xVJPV1vr+tRM=; b=FENvLU8Iruq7xjTxA1XujwN/Haw+ExFBIYe5mdNF4U7psetZ1ffAaE6maYL5g6cno2 S5hgl6Qh5ndsV9vMV/E6hBee0TXSqBb/7PiIuNLlH+l7HnqAQYb+ebQ5dfo7P558OKtO P8NGs/aJaglohgh2J/q7Icmpm+zee6Yk5K8mc3ZjfHpuSdpN3IAN69cqgBrnBsr5u3RF npdfE0kVK5AczgQOpCzqxJjTgDA+Z+OiQdH+on4yJEs9w7w+Rnhbu4Ca8SP/p3++Outw osp8fuoliy60alspwbA/IZtHiZSaRnCkNNjTe86tEquhGFOErp+OLTzJyycDZ2jEVr2q inxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=iNGgWtyD; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p11si6558218pfl.127.2018.02.26.02.36.49; Mon, 26 Feb 2018 02:37:04 -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=pass header.i=@gmail.com header.s=20161025 header.b=iNGgWtyD; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752353AbeBZKgD (ORCPT + 99 others); Mon, 26 Feb 2018 05:36:03 -0500 Received: from mail-wm0-f65.google.com ([74.125.82.65]:37999 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751858AbeBZKgA (ORCPT ); Mon, 26 Feb 2018 05:36:00 -0500 Received: by mail-wm0-f65.google.com with SMTP id z9so16143467wmb.3 for ; Mon, 26 Feb 2018 02:35:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=x5vHkLxo1bRBOOw1Ay+FdI3XUSgQnv7xVJPV1vr+tRM=; b=iNGgWtyDaG9rfH42GEqUkPhuTdcgwOxfQVRHLZ/Z0UhKu7GHCyWMfBwwVoP2jruMjF EbI2wRnbvryC4+osE46aIztGQZ8iVJtd1DEdG/CkPlOgU5baoMokSJTK4/YWGg+EHiI6 2Q9juEWR7WFQZTDKYTxl0TJYkIWnsfFN5DoqFdf2i4g+nqxyegKdaCK4kGGcp3lB4cGe m67aFdA8UKalKJK7HIP8NPA6j902F18wCZdOAPFN6O6vTa1WcDRxqRbgiclgmODzxMJW 8InHnXuVrvxJ/MF5DGTS0oFclWu8TpKudJm9zHLgljfl+bZT6vUsz5GM1HwXKu78uX0t LcIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=x5vHkLxo1bRBOOw1Ay+FdI3XUSgQnv7xVJPV1vr+tRM=; b=JiAcmNVAVyaSY8A6QKfi9rq5rYu7DPYbiB+mi34RN4lDLBJ79ZDEINLvNWhnQ5SKuj hUqnC71bL4TLDmlP/H/CpZ90SrMzLr2hgHPsqhP9sgjeEC3f1XAFgbDJP/9CA/GcGkq3 mYAxnNiAEtSqzFutKCZKKacBWKZ05AJ01BDc2tRspgMIckcGBUhBXZSNndr/chAnLUMz DW3vhMAfUeB7B5axozA3kyHehKx8+nbyw1pHNHEd8ADCA98hIcLKVxw5mb8KPGG+solB iOWGTqUvlhwhmThyE9fZpbqtJ0qrBYnXrnLI5BzNPdBq0n5bpW6hwDOR9k8NMSeJwlsc C8sA== X-Gm-Message-State: APf1xPCOgnPdhKp0C8OThU61Z25Xnnxl0M9xsC52iu95F6PUlNYU7JYP qjjynHrd1rwSjd0zS6ZLVo4= X-Received: by 10.28.237.23 with SMTP id l23mr8393726wmh.113.1519641358920; Mon, 26 Feb 2018 02:35:58 -0800 (PST) Received: from andrea (85.100.broadband17.iol.cz. [109.80.100.85]) by smtp.gmail.com with ESMTPSA id 41sm18549486wrc.12.2018.02.26.02.35.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Feb 2018 02:35:58 -0800 (PST) Date: Mon, 26 Feb 2018 11:35:52 +0100 From: Andrea Parri To: Palmer Dabbelt Cc: albert@sifive.com, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH RFC] riscv/barrier: Define __smp_{mb,rmb,wmb} Message-ID: <20180226103552.GA9138@andrea> References: <1519121848-28582-1-git-send-email-parri.andrea@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 22, 2018 at 03:14:52PM -0800, Palmer Dabbelt wrote: > On Tue, 20 Feb 2018 02:17:28 PST (-0800), parri.andrea@gmail.com wrote: > >Introduce __smp_{mb,rmb,wmb}, and rely on the generic definitions > >for smp_{mb,rmb,wmb}. A first consequence is that smp_{mb,rmb,wmb} > >map to a compiler barrier on !SMP (while their definition remains > >unchanged on SMP). As a further consequence, smp_load_acquire and > >smp_store_release have "fence rw,rw" instead of "fence iorw,iorw". > > > >Signed-off-by: Andrea Parri > >--- > > arch/riscv/include/asm/barrier.h | 6 +++--- > > 1 file changed, 3 insertions(+), 3 deletions(-) > > > >diff --git a/arch/riscv/include/asm/barrier.h b/arch/riscv/include/asm/barrier.h > >index c0319cbf1eec5..5510366d169ae 100644 > >--- a/arch/riscv/include/asm/barrier.h > >+++ b/arch/riscv/include/asm/barrier.h > >@@ -34,9 +34,9 @@ > > #define wmb() RISCV_FENCE(ow,ow) > > > > /* These barriers do not need to enforce ordering on devices, just memory. */ > >-#define smp_mb() RISCV_FENCE(rw,rw) > >-#define smp_rmb() RISCV_FENCE(r,r) > >-#define smp_wmb() RISCV_FENCE(w,w) > >+#define __smp_mb() RISCV_FENCE(rw,rw) > >+#define __smp_rmb() RISCV_FENCE(r,r) > >+#define __smp_wmb() RISCV_FENCE(w,w) > > > > /* > > * This is a very specific barrier: it's currently only used in two places in > > Thanks! I'm going to take this for the next RC. Thank you, Palmer. I'm planning to post more changes to the file, but I'd like to build on top of this change: could you point me to the appropriate branch/repo for this? Andrea