Received: by 10.213.65.68 with SMTP id h4csp485298imn; Fri, 6 Apr 2018 03:56:51 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/c+8t0gcCpfmXkZttiOTRTFvhBCirAPsin7cmT6ADuZdfJ+o/p3R+nQBy1bpxMaXmVLU6k X-Received: by 10.101.83.198 with SMTP id z6mr13486921pgr.105.1523012211638; Fri, 06 Apr 2018 03:56:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523012211; cv=none; d=google.com; s=arc-20160816; b=CT9hV23jWp+Sexqydsh1Wu3KCV0V6smBS4EJ+0vgrPspuXVi+I7i90l1zvAqUPtOu4 5z/s8c6x4cETC+8LIUBAMZDDjFbRTkULYgLMzB2n3C2g3087IeypPdkV/zSGU500Z4Oj NwVViX4/qFc6F2nwo3qmFoxo6/G8h47OaXYnEf5iZXkXW7kqpLjRrwDo21cOl1utgVLM FswfvVE7gXzLMmmaCcdzCR7uecaGdBPFL1WSQv7NZ5Znz0laQ6owzag5S8N+fOgt0MGV iZlq5W74UE//D58uooqbYZT7AsjaJ+KG9je4MWAVGMzL55dl5ahFpo7b1BIyIWDjcsTz dWzg== 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:arc-authentication-results; bh=qbwE2E7OVqTlSpe7lJeDWItthT9CbezgdJuLasLGeSk=; b=hxs5fcAndO55qvaga/HxxSz7e+noZvCdSuTquUnEq74mjojikw569FcV0ILV7ZiQ9W tlkWjbjN2RwwEsswH/5SENuTltEmmVKalk/ZMWZL4hQCjf9gGjSP2wlPgbJOl5WllTmX N/Qen5uApbTeBL4Jhabd0VHqaTUuIRDv9V8wgnrn3ZURw8J0945OobfIQ1k4K0z7gl46 or9GFHZlGbOrqJ4m+IiBoocNZA4Kh5GCljxuXUrs7SB6H15MUVWfV0hRODN0NHKsWo/R Jl+nEeVNjHaqV3tnSCVejhHes78WU1AE6UMos4s+uVKVMjJIEzrGJps7FAm+a+6kZCxd Ts8A== ARC-Authentication-Results: i=1; mx.google.com; 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 k15si6988194pgp.278.2018.04.06.03.56.37; Fri, 06 Apr 2018 03:56:51 -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; 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 S1752197AbeDFKzW (ORCPT + 99 others); Fri, 6 Apr 2018 06:55:22 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:35056 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751494AbeDFKzV (ORCPT ); Fri, 6 Apr 2018 06:55:21 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 15FA51529; Fri, 6 Apr 2018 03:55:21 -0700 (PDT) Received: from edgewater-inn.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id DC3B73F487; Fri, 6 Apr 2018 03:55:20 -0700 (PDT) Received: by edgewater-inn.cambridge.arm.com (Postfix, from userid 1000) id C5B601AE55BE; Fri, 6 Apr 2018 11:55:34 +0100 (BST) Date: Fri, 6 Apr 2018 11:55:34 +0100 From: Will Deacon To: Peter Zijlstra Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, mingo@kernel.org, boqun.feng@gmail.com, paulmck@linux.vnet.ibm.com, catalin.marinas@arm.com, Waiman Long Subject: Re: [PATCH 06/10] barriers: Introduce smp_cond_load_relaxed and atomic_cond_read_relaxed Message-ID: <20180406105534.GB27619@arm.com> References: <1522947547-24081-1-git-send-email-will.deacon@arm.com> <1522947547-24081-7-git-send-email-will.deacon@arm.com> <20180405172226.GF4082@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180405172226.GF4082@hirez.programming.kicks-ass.net> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 05, 2018 at 07:22:26PM +0200, Peter Zijlstra wrote: > On Thu, Apr 05, 2018 at 05:59:03PM +0100, Will Deacon wrote: > > diff --git a/include/linux/atomic.h b/include/linux/atomic.h > > index 8b276fd9a127..01ce3997cb42 100644 > > --- a/include/linux/atomic.h > > +++ b/include/linux/atomic.h > > @@ -654,6 +654,7 @@ static inline int atomic_dec_if_positive(atomic_t *v) > > } > > #endif > > > > +#define atomic_cond_read_relaxed(v, c) smp_cond_load_relaxed(&(v)->counter, (c)) > > #define atomic_cond_read_acquire(v, c) smp_cond_load_acquire(&(v)->counter, (c)) > > > > #ifdef CONFIG_GENERIC_ATOMIC64 > > @@ -1075,6 +1076,7 @@ static inline long long atomic64_fetch_andnot_release(long long i, atomic64_t *v > > } > > #endif > > > > +#define atomic64_cond_read_relaxed(v, c) smp_cond_load_relaxed(&(v)->counter, (c)) > > #define atomic64_cond_read_acquire(v, c) smp_cond_load_acquire(&(v)->counter, (c)) > > > > #include > > Did we again forget atomic_long glue ? ;-) Bah! I'll add it for v2, thanks. Will