Received: by 10.223.185.116 with SMTP id b49csp4441870wrg; Mon, 26 Feb 2018 18:29:19 -0800 (PST) X-Google-Smtp-Source: AH8x226km92wHnK+3mlzdQ+TtodMgKIm4NJdJqzhy+Rhy/9kqopCyjt+ildjwofzsiuPlrH3L4G+ X-Received: by 2002:a17:902:7796:: with SMTP id o22-v6mr12913687pll.215.1519698559118; Mon, 26 Feb 2018 18:29:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519698559; cv=none; d=google.com; s=arc-20160816; b=yQBPTgD+tPAoV6zgYEIIWQg1DU4iDVkJv03QYdNO9FymimQDn1kN8mbqAN1RoEM79U xCpcPukrIYudIbXNQ37Jy1VghTN16o8P8dSQRK+xbfRxlvRp6lSj9uxYWJQSqWzV7IUC 659XJEFiCk3JgTorosFM5fJY6AMvTXc63ahdLjXBapd7b73Y+7cTVxOHc7bPAbPS9M/Q mhpr1wo9J40Ol21ZdGHIHakWjjYtQYs+JowyIroBN6g/R/eXnNpgu90jkx9hn8xtqZgf aPYaynBHWIi/9dyLvNFn9i6C32YIdmzQKgE3vufYaFXMqKWfvSYCfCWgrM1Xcr7v+oUD AIaQ== 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=SUnw7eMp4AkZWgeOa2N7aAmp/YAwlJKQC00GMS5ZnfU=; b=v+yKFZ4V0Z3vNQp/kEm6bSm2nI+Ls/lKoQMDWQe2yNwBoV18LWETsxkMSvkcf4V2Vc 943oYStWRrNbX36SCuAhB4ORFATRS//HKR0+oG3MkGVtazMA8vtOPCDBlfjLNXeH7LMs ymOAYfoQTL9Y3ciujS6sKxLjLZ+V4icNckTukPq3Y8ohuiwvLp9A1wk5fDwyLTlLhF6b vg90JXbqt8HqYm+J2qEyhOuBEyX/nzr5quuJo2l/iRDgMT+ZfiiHERoo48PGAHy7s98j JkJEUWyzHm4UvnPyiFKORoEDuZNP4OFMMi6jWfP+HpI+rQ27wUg2dMrTP5iuIiiMi6LM YnHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=o0Lvv562; 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 y190si7737900pfy.87.2018.02.26.18.29.04; Mon, 26 Feb 2018 18:29:19 -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=o0Lvv562; 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 S1751940AbeB0C1x (ORCPT + 99 others); Mon, 26 Feb 2018 21:27:53 -0500 Received: from mail-wm0-f65.google.com ([74.125.82.65]:35916 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751726AbeB0C1v (ORCPT ); Mon, 26 Feb 2018 21:27:51 -0500 Received: by mail-wm0-f65.google.com with SMTP id 188so20270832wme.1 for ; Mon, 26 Feb 2018 18:27:50 -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=SUnw7eMp4AkZWgeOa2N7aAmp/YAwlJKQC00GMS5ZnfU=; b=o0Lvv562JdHFFO1GmGWqS0Y+nRcyiSpx3j4zxnVoTvJwyDA/oA6S7kVd8+ghZ1p61W viuqrDjW9XOuMzJwmjquDfpMcDC7L9x4J3oUbPbeQ9bDGr3Tuu3hH8yByeciGYQkQJuE b+ljSpuVk9cQVsz9b8IMRI3B3ecVXhVvM2PDhHh8XEeU5pjQj4+WmjFl7KCZLzEVPKwU 7wdOKIqeO5rfvPQ5V7vakrjZl8XPOcTskfCHZo8Mv6TwcnNLRjF2SiQbAsIxtgQ+R95b x18KldxCly3X0xvJuccLGqVpwGyIIeVyzi7t63mXpakBhvqRS7ekITTRjAJIhf8xgqzH MWvA== 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=SUnw7eMp4AkZWgeOa2N7aAmp/YAwlJKQC00GMS5ZnfU=; b=bj5opFv4Xe7bUWBxT02XLwrV2XJZQC13oJFM06sPRrenpgGIYPjAataU68JLO1cDqg bZfA+qYSlh8H+0xQum6mE7g7z6ghmxcnbuDTaGiRpD5CBV+7bcEIOmQzjR3B4YWqALnS dWesNOrJPO4PIVl/+OahsF+CnLlUqXfofJe5k++YgzcsBoz9usvNPRu/ZouQbq0nRST2 I2B5o5Qa+WeBUPJIIkqUabTsTcB3mCf5RyKV3P2YY4Dzr7NQxEvx4QDOgFX2zLxKd7Sj 4D+vp4rUBL7c3IFmDx61DpSRQfzpZfObF4PjJYjZlFgEjDZyiDXSxHxXpSqTcdWfirUk VY5A== X-Gm-Message-State: APf1xPDJ8BwVBhdEtRvhzU0+JZVtk6KMBxAJQ7qAl0lbJ+Orq+Aq7C7E S0Q2lRHjHNpFL/lW3eqK/omAtQ== X-Received: by 10.28.195.133 with SMTP id t127mr6539183wmf.156.1519698469598; Mon, 26 Feb 2018 18:27:49 -0800 (PST) Received: from andrea (dynamic-2a00-1028-8386-da8a-79ac-85fb-2a06-3199.ipv6.broadband.iol.cz. [2a00:1028:8386:da8a:79ac:85fb:2a06:3199]) by smtp.gmail.com with ESMTPSA id 7sm8659906wry.18.2018.02.26.18.27.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Feb 2018 18:27:49 -0800 (PST) Date: Tue, 27 Feb 2018 03:27:41 +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: <20180227022741.GA19333@andrea> References: <20180226103552.GA9138@andrea> 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 Mon, Feb 26, 2018 at 05:28:53PM -0800, Palmer Dabbelt wrote: > On Mon, 26 Feb 2018 02:35:52 PST (-0800), parri.andrea@gmail.com wrote: > >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? > > Here's the canonical RISC-V Linux git repo > > https://git.kernel.org/pub/scm/linux/kernel/git/palmer/riscv-linux.git/ > > Your branch is now the HEAD of the "for-linus" branch, which means it'll be > sent to Linus the next time I send patches. I generate and tag "for-linus" > on Monday mornings and then send it out on Wednesday mornings, just to make > sure everything has time to bake. > > https://git.kernel.org/pub/scm/linux/kernel/git/palmer/riscv-linux.git/ > > Additionally, I mantain a "for-next" branch that contains everything that's > been sufficiently reviewed to be made part of Linux, but that is being > staged for a bit longer than what's in for-linus for one reason or another > (usually it's just not RC material and is targeted for the next merge > window). There is also a RISC-V integration branch named "riscv-all" that > contains all our work in progress patches. This is likely to be unstable, > but it's best to check there to see if anything interesting is going on > related to what you're working on to avoid duplicating work. > > These branches are all generated from my personal git tree > > https://git.kernel.org/pub/scm/linux/kernel/git/palmer/linux.git/ > > There's a bunch of branches in here tracking each change set (yours is > called "fix-smp_mb", to indicate it can go in during an RC) that's still in > flight. There's some scripts to generate some of these branches, but the > commits I actually send upstream are merged by hand > > https://github.com/riscv/riscv-linux-infra > > "for-next" and "riscv-all" are rebased regularly, so it's probably best to > track commits back to their original WIP branch and work from there to avoid > major headaches. Thank you for the info. I've just sent one more patch on top of your 'for-linus' (there appeared to be no conflict with 'riscv-all'). Andrea