From patchwork Sat Jan 5 17:04:19 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Paul E. McKenney" X-Patchwork-Id: 13816 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id E03A623E33 for ; Sat, 5 Jan 2013 17:04:47 +0000 (UTC) Received: from mail-vc0-f176.google.com (mail-vc0-f176.google.com [209.85.220.176]) by fiordland.canonical.com (Postfix) with ESMTP id 74F6DA1968D for ; Sat, 5 Jan 2013 17:04:47 +0000 (UTC) Received: by mail-vc0-f176.google.com with SMTP id fo13so17606154vcb.35 for ; Sat, 05 Jan 2013 09:04:47 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-content-scanned:x-cbid:x-gm-message-state; bh=NJAvYo/1RX28qMR9oS+Ke1qm4BoPsjcMCTHpQYlF9Uk=; b=GRiks1BBh6x7ZyZY0nGJbzBOU96od6r78PJjiPGQlFZ9U3J59B7RLHrgBGByVdMsou EmQZ6QB6yvv1JIQo8vnoW+bR973o/WKg+Tz3iweNzFeNcNfRFB1x6YPZhmq2XBJivxmK y6kD/Bel4dtIlyCfHa1x5UySy3KZrx94G3d1/QJF2Xih0pZJsZz5/0lgJFoZPTeuONO8 MBdGe90SO8KSKqn8olcrDyNpC3Bt5BWTTP36otxDZoZi/ee0S6meg0J/2cZ6ISXIeWEA BfF8EcqMXX7F/V052RoCbUjgwsYy/yM18JVJL/Bbgx5k9C7sE7h+gIzOVvP0gdoiS58E 1o6Q== X-Received: by 10.52.18.207 with SMTP id y15mr68643469vdd.8.1357405486917; Sat, 05 Jan 2013 09:04:46 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.58.145.101 with SMTP id st5csp16184veb; Sat, 5 Jan 2013 09:04:46 -0800 (PST) X-Received: by 10.50.0.179 with SMTP id 19mr1863632igf.59.1357405486121; Sat, 05 Jan 2013 09:04:46 -0800 (PST) Received: from e7.ny.us.ibm.com (e7.ny.us.ibm.com. [32.97.182.137]) by mx.google.com with ESMTPS id gv1si2612650igb.19.2013.01.05.09.04.45 (version=TLSv1 cipher=RC4-SHA bits=128/128); Sat, 05 Jan 2013 09:04:46 -0800 (PST) Received-SPF: pass (google.com: domain of paulmck@linux.vnet.ibm.com designates 32.97.182.137 as permitted sender) client-ip=32.97.182.137; Authentication-Results: mx.google.com; spf=pass (google.com: domain of paulmck@linux.vnet.ibm.com designates 32.97.182.137 as permitted sender) smtp.mail=paulmck@linux.vnet.ibm.com Received: from /spool/local by e7.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Sat, 5 Jan 2013 12:04:45 -0500 Received: from d01dlp02.pok.ibm.com (9.56.250.167) by e7.ny.us.ibm.com (192.168.1.107) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Sat, 5 Jan 2013 12:04:42 -0500 Received: from d01relay04.pok.ibm.com (d01relay04.pok.ibm.com [9.56.227.236]) by d01dlp02.pok.ibm.com (Postfix) with ESMTP id 22D406E803A for ; Sat, 5 Jan 2013 12:04:41 -0500 (EST) Received: from d03av02.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by d01relay04.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r05H4fox276402 for ; Sat, 5 Jan 2013 12:04:41 -0500 Received: from d03av02.boulder.ibm.com (loopback [127.0.0.1]) by d03av02.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id r05H4cwb031865 for ; Sat, 5 Jan 2013 10:04:41 -0700 Received: from paulmck-ThinkPad-W500 ([9.80.23.97]) by d03av02.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id r05H4QLG031153; Sat, 5 Jan 2013 10:04:32 -0700 Received: by paulmck-ThinkPad-W500 (Postfix, from userid 1000) id 537E5E4D65; Sat, 5 Jan 2013 09:04:21 -0800 (PST) From: "Paul E. McKenney" To: linux-kernel@vger.kernel.org Cc: mingo@elte.hu, laijs@cn.fujitsu.com, dipankar@in.ibm.com, akpm@linux-foundation.org, mathieu.desnoyers@polymtl.ca, josh@joshtriplett.org, niv@us.ibm.com, tglx@linutronix.de, peterz@infradead.org, rostedt@goodmis.org, Valdis.Kletnieks@vt.edu, dhowells@redhat.com, edumazet@google.com, darren@dvhart.com, fweisbec@gmail.com, sbw@mit.edu, patches@linaro.org, Richard Braun , "Paul E. McKenney" Subject: [PATCH tip/core/rcu 3/3] Documentation: Memory barrier semantics of atomic_xchg() Date: Sat, 5 Jan 2013 09:04:19 -0800 Message-Id: <1357405459-13675-3-git-send-email-paulmck@linux.vnet.ibm.com> X-Mailer: git-send-email 1.7.8 In-Reply-To: <1357405459-13675-1-git-send-email-paulmck@linux.vnet.ibm.com> References: <20130105170356.GA13534@linux.vnet.ibm.com> <1357405459-13675-1-git-send-email-paulmck@linux.vnet.ibm.com> X-Content-Scanned: Fidelis XPS MAILER x-cbid: 13010517-5806-0000-0000-00001DD58964 X-Gm-Message-State: ALoCoQm4QQDKeYoMhcZUofFqxM6SuQvpf3wpjP8jxd6uVGt+niRsYJqY1C/uLKBfsT5fz2gwZNUI From: Richard Braun Add atomic_xchg() to documentation for atomic operations and memory barriers. Signed-off-by: Richard Braun Signed-off-by: Paul E. McKenney --- Documentation/atomic_ops.txt | 2 ++ Documentation/memory-barriers.txt | 1 + 2 files changed, 3 insertions(+), 0 deletions(-) diff --git a/Documentation/atomic_ops.txt b/Documentation/atomic_ops.txt index 27f2b21..d9ca5be 100644 --- a/Documentation/atomic_ops.txt +++ b/Documentation/atomic_ops.txt @@ -253,6 +253,8 @@ This performs an atomic exchange operation on the atomic variable v, setting the given new value. It returns the old value that the atomic variable v had just before the operation. +atomic_xchg requires explicit memory barriers around the operation. + int atomic_cmpxchg(atomic_t *v, int old, int new); This performs an atomic compare exchange operation on the atomic value v, diff --git a/Documentation/memory-barriers.txt b/Documentation/memory-barriers.txt index 3c4e1b3..fa5d8a9 100644 --- a/Documentation/memory-barriers.txt +++ b/Documentation/memory-barriers.txt @@ -1685,6 +1685,7 @@ explicit lock operations, described later). These include: xchg(); cmpxchg(); + atomic_xchg(); atomic_cmpxchg(); atomic_inc_return(); atomic_dec_return();