Received: by 10.192.165.156 with SMTP id m28csp1893140imm; Thu, 12 Apr 2018 05:27:46 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/BHLWJMzabOAXHkEJpHiiQarvoB93VJNliQvS2Qw9+sRoJ/og4HdbYf+SIxm0kggmFyUSP X-Received: by 10.167.131.201 with SMTP id j9mr7513348pfn.214.1523536066772; Thu, 12 Apr 2018 05:27:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523536066; cv=none; d=google.com; s=arc-20160816; b=PTYrqE1/2nYGuivyHNZvQlCGvNtGbqE2ba3IgWSrAwiR9yRAMYDF0HPdhdxsk4uE6m 98ONuz9MVsBaCyOlU4s0Hgxy9QIeuZjunVWZ3frfTnoKQRNozeqCAEwnWjL3SyrlXF5E xcZY+ZOtu/1HYMETzyzoguz89PnMvwFx2fn/HnCKkJFtwpdvCCOO/4UFu26HzcPgRNll /MApSoe8920DVBkqFxkAmt2WxNCjzyvczMmrGxc+Te0JGkT++H60ldsjh8eoaBqdatGs 070ZK36gi3vYjeN6OojJzFrvMj7HzJD+dWX0V5m6cJnPnBjtGTnxlQyHhx+K/NQFBoBP H/kw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=PKX2cAMRdWrOqRDAqU5Rj8+nI5zXM37qHjSFIs5BRwM=; b=eUaqZnUqx0g+iJGozyZx6XHrwi23LSlm8vaveWq8IJ1BDoa30q3EaY1eT/cpr3pZdF XBj2fu6PJVjE2/4ANkcZBFZgRWTdO1rQVPCLM8pWR3VTBTl4GanKMwZmlJ+FLP3rGp+T wxFZFUpiAtOZ98ZLXgScfbUiVAX4QBj8aA1OrNnFVg7cJzfPsrGpo6XkubzsL2uIampK sfu0/tZ1XaPY2ePK0aw06sKwqQojm3suCfUV3EtDn5lgvBPxsWA2FGS9mQ1Bp2PXX+7k aQKAGJjFu42NRkPQjwEybhRx8J30rfWQH+YWz/UfE5vMsBObtgGjG8ZuFKeuWO8Qq9Mm LNxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Yk9HXkV0; 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 b2si2389247pfi.347.2018.04.12.05.27.10; Thu, 12 Apr 2018 05:27:46 -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=pass header.i=@amarulasolutions.com header.s=google header.b=Yk9HXkV0; 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 S1752915AbeDLMXt (ORCPT + 99 others); Thu, 12 Apr 2018 08:23:49 -0400 Received: from mail-wr0-f194.google.com ([209.85.128.194]:39530 "EHLO mail-wr0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752852AbeDLMXs (ORCPT ); Thu, 12 Apr 2018 08:23:48 -0400 Received: by mail-wr0-f194.google.com with SMTP id c24so4922038wrc.6 for ; Thu, 12 Apr 2018 05:23:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=PKX2cAMRdWrOqRDAqU5Rj8+nI5zXM37qHjSFIs5BRwM=; b=Yk9HXkV0Ynzgym55etl18ikQRhfGyfgWp3h2NmfsdDZJ876n/K/vDZurMCqyI1cA8C bhZLjhg6wNQ1+e3i3brLsk8HJfqwtUX7cLj3+ZcPdcRIYt5DalHaBFrhciU/g8eezXDn R+6DWFvxgXKXm68ZXuo0t47iUnhZ/49S71L/I= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=PKX2cAMRdWrOqRDAqU5Rj8+nI5zXM37qHjSFIs5BRwM=; b=U1lPLXMc2XzfKLy0J4ZmtWLKilPJjBB2hH07ielkfb+bS257MbqCHHvRn6xolsxHCY p87vlmniZrVA6aPWVKk5mB7LuEU7bMQXyGF3qTuffIuY9e+bo9NNpmzZyclFzeN425gk ZO14WKvnGJ7iIBdvGXBxp8QY+dbDPT0P8tIKmCszOnvDcb5JuMPaH8uEqAWA8uZkgS93 J+6XWkFIytcChD0vw/iaI4shqPmIPpPpHDdUBPJW7X841CDTpiCVXebJzsQJqDhrnW9/ Exl5pViQce580maLndBO3tbnf0pZh4BNrGNbTgKUhkbNkMWMTWLxvOFCqstzVQNqCUKO 7gxA== X-Gm-Message-State: ALQs6tAIJbLluPF33N67wsRpEz+H3nLCDiIHGjsJCIEZMRRGq61anzHU GA9TeRa0LlhgueCa6AfaCgzDTbRe X-Received: by 10.223.136.185 with SMTP id f54mr628649wrf.42.1523535826780; Thu, 12 Apr 2018 05:23:46 -0700 (PDT) Received: from localhost.localdomain ([213.209.242.222]) by smtp.gmail.com with ESMTPSA id 39sm6548870wry.89.2018.04.12.05.23.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 12 Apr 2018 05:23:46 -0700 (PDT) From: Andrea Parri To: linux-kernel@vger.kernel.org Cc: Alan Stern , Will Deacon , Peter Zijlstra , Boqun Feng , Nicholas Piggin , David Howells , Jade Alglave , Luc Maranget , "Paul E . McKenney" , Akira Yokosawa , Paolo Bonzini , Andrea Parri Subject: [PATCH 1/2] tools/memory-model: Model 'smp_store_mb()' Date: Thu, 12 Apr 2018 14:22:49 +0200 Message-Id: <1523535770-10781-2-git-send-email-andrea.parri@amarulasolutions.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1523535770-10781-1-git-send-email-andrea.parri@amarulasolutions.com> References: <1523535770-10781-1-git-send-email-andrea.parri@amarulasolutions.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Says that 'smp_store_mb(x, val);' is _semantically_ equivalent to 'WRITE_ONCE(x, val); smp_mb();'. Suggested-by: Paolo Bonzini Suggested-by: Peter Zijlstra Signed-off-by: Andrea Parri --- tools/memory-model/linux-kernel.def | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/memory-model/linux-kernel.def b/tools/memory-model/linux-kernel.def index 397e4e67e8c84..acf86f6f360a7 100644 --- a/tools/memory-model/linux-kernel.def +++ b/tools/memory-model/linux-kernel.def @@ -14,6 +14,7 @@ smp_store_release(X,V) { __store{release}(*X,V); } smp_load_acquire(X) __load{acquire}(*X) rcu_assign_pointer(X,V) { __store{release}(X,V); } rcu_dereference(X) __load{once}(X) +smp_store_mb(X,V) { __store{once}(X,V); __fence{mb}; } // Fences smp_mb() { __fence{mb} ; } -- 2.7.4