Received: by 10.213.65.68 with SMTP id h4csp2186256imn; Thu, 5 Apr 2018 10:24:01 -0700 (PDT) X-Google-Smtp-Source: AIpwx48P+dkx1+F0yF2TfKoocOLYu0ine36wYU1TAnoGpPPeBNwD4ejgFgGC2UeQtmwJlFBiANlX X-Received: by 2002:a17:902:8ecb:: with SMTP id x11-v6mr23657656plo.402.1522949041890; Thu, 05 Apr 2018 10:24:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522949041; cv=none; d=google.com; s=arc-20160816; b=0QseclurrxsiiOjgaPzD5z6gQ7Mz3EgIciPLGvfXstQzqzFTPpcVtSqYRbxpbWsjJE /IyvMR5/mLYrpuieB+cPtM1lVYQ40Q1XIOSsA2nfnznIErB/WNIZlYZc1KbBS8hoSoKQ GW64FdyXoWdFq63EnJxtOUjpt1ORWBryCiV+Jv8CdF0GGhFM8GxJUP6VheCJkqdgBizL mFOB7/4/GF9hK9Ppzd71zTfQNSXsKmRaluDy9gGS3if54R4o9TbCgFG0t0lkc8F8o+CQ 8ZpvemzVF9BgHObnxfB6a6aN6as4GoJU6vr5T7dZr4Cixh1rrjtJ+QmHNfNJIOCRIJY+ t11Q== 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=zmBxi9K9yqFIBvas3dTQoRZmy4SpVbTitO4D736uLA0=; b=s93HyI3AnpYgTErUbMiGkdjKt5DY90F8cyw12XD+SpaqRKE5Oa2GZWSFm0J3uxjsZc hiCr+GO/+096a4f6aCx0djqmS/PvKiQ8S0kzW/DMHn09OCTNgPyhkv36S0XfOzvLfrd3 YadUMVWOhsrTDu24TDBQlgdtCuHxx/LieRPprxMIiAeW9CiMKko8nWMlyhg4826Ms/6i PcM5a+uk5ySzuA1OniN83sFkvlcIlSnU++UXslGM1rek5M5kIrfXFAjuBR37QUb3ZN0F rPzsBdDyjKHFah7z4IMugZCHwSg1cSTct4Yu7MxZeV5ru9yNBsJsQ5+MGq7SDSXwpOiq PJUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=EzlbeQ/6; 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 n26si5699394pgc.154.2018.04.05.10.23.47; Thu, 05 Apr 2018 10:24:01 -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=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=EzlbeQ/6; 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 S1751466AbeDERWn (ORCPT + 99 others); Thu, 5 Apr 2018 13:22:43 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:33750 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751368AbeDERWm (ORCPT ); Thu, 5 Apr 2018 13:22:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=zmBxi9K9yqFIBvas3dTQoRZmy4SpVbTitO4D736uLA0=; b=EzlbeQ/6N0S0rTQRGaeFpAunb dYZ+8qIXw5ovJsjd1SgFkaEF5grVNO/3yukQ8jDaXFSMeEyyFU+aAze1MeWVPTGwqEBTE6CqX25++ Jd0hMMKfC4czthHj4qoszlfP7tuMHqOFUBowqaly1tUXtTcrumc+tAGF7yQU1SZBZU4EaM8bZtGx0 kL5R1Z68TPj1XrNsKad/31c8YVpQet1Wj4u2DG24qJacSxTfYmhqaKsTBD4LBjqgMhZRQQwIiNBNO RVXn0CS9XS5I20suo8dYcDHCbAuqppDNhDOB9E6jR2UxFAnDblm/8/AKcSPEHYIrecuAOBZOpa+no 4tCncFVoA==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1f48ai-0001s1-Fe; Thu, 05 Apr 2018 17:22:28 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id DBE0E20298CFA; Thu, 5 Apr 2018 19:22:26 +0200 (CEST) Date: Thu, 5 Apr 2018 19:22:26 +0200 From: Peter Zijlstra To: Will Deacon 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: <20180405172226.GF4082@hirez.programming.kicks-ass.net> References: <1522947547-24081-1-git-send-email-will.deacon@arm.com> <1522947547-24081-7-git-send-email-will.deacon@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1522947547-24081-7-git-send-email-will.deacon@arm.com> User-Agent: Mutt/1.9.3 (2018-01-21) 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 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 ? ;-)