From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753237AbbCaIkb (ORCPT ); Tue, 31 Mar 2015 04:40:31 -0400 Received: from cam-admin0.cambridge.arm.com ([217.140.96.50]:57942 "EHLO cam-admin0.cambridge.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750879AbbCaIkZ (ORCPT ); Tue, 31 Mar 2015 04:40:25 -0400 From: Will Deacon To: linux-kernel@vger.kernel.org Cc: Will Deacon , Oleg Nesterov , "Paul E. McKenney" , Peter Zijlstra Subject: [RESEND PATCH] documentation: memory-barriers: fix smp_mb__before_spinlock() semantics Date: Tue, 31 Mar 2015 09:39:41 +0100 Message-Id: <1427791181-21952-1-git-send-email-will.deacon@arm.com> X-Mailer: git-send-email 2.1.4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Our current documentation claims that, when followed by an ACQUIRE, smp_mb__before_spinlock() orders prior loads against subsequent loads and stores, which isn't actually true. Fix the documentation to state that this sequence orders only prior stores against subsequent loads and stores. Cc: Oleg Nesterov Cc: "Paul E. McKenney" Cc: Peter Zijlstra Signed-off-by: Will Deacon --- Could somebody pick this up please? I guess I could route it via the arm64 tree with an Ack, but I'd rather it went through Paul or -tip. Documentation/memory-barriers.txt | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Documentation/memory-barriers.txt b/Documentation/memory-barriers.txt index ca2387ef27ab..fa28a0c1e2b1 100644 --- a/Documentation/memory-barriers.txt +++ b/Documentation/memory-barriers.txt @@ -1768,10 +1768,9 @@ for each construct. These operations all imply certain barriers: Memory operations issued before the ACQUIRE may be completed after the ACQUIRE operation has completed. An smp_mb__before_spinlock(), - combined with a following ACQUIRE, orders prior loads against - subsequent loads and stores and also orders prior stores against - subsequent stores. Note that this is weaker than smp_mb()! The - smp_mb__before_spinlock() primitive is free on many architectures. + combined with a following ACQUIRE, orders prior stores against + subsequent loads and stores. Note that this is weaker than smp_mb()! + The smp_mb__before_spinlock() primitive is free on many architectures. (2) RELEASE operation implication: -- 2.1.4