Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1367363ybt; Thu, 25 Jun 2020 04:30:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzEsO5f6c0G1IVnJKzWHLYN+pePV5Z/nkLVImdtT4afBuqBt5/LIlRKExgph0At1/QiHkZS X-Received: by 2002:a17:906:748:: with SMTP id z8mr483450ejb.257.1593084632228; Thu, 25 Jun 2020 04:30:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593084632; cv=none; d=google.com; s=arc-20160816; b=tPvmGwJJ7WMvU8tX2P8RB567FjcZzh0Wqs9koPy8IYQGFHtYv107qyND7ZdJ6c6TNX qsgoAsf4ar2L7PrJiDZ3B7WomfBQpBn4kGwUmFSeuPtRZbrM7GJpBjMKj/WVr4AWp/Fe iX+XZQhnJ/qxB+OxGiZQ+e3t0bFcl5IdCNqdfDeVq+h5l0b+Y8Y39sVKS23MLdJhfzrl yi+eoTDRzAAKXK42RfZNr+DWeHUksfFHljwzi3dEwwkNcXOEa996qFLiK/7oeW5LrstQ TlWcKv8Lc6Gw0mBhwHxbOAjfkjom4/2+FQhdd1KW710sOkswRktVuVrKzZrKzx0qVjb9 pvwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=fXCHQRpJ34HMUF2mE+6g5VzQO598DF13gdLnlC4s9Ls=; b=kAyNnjzZzSzMRbp455FJOzjtPxS0xmmk1B1rT2mKkSMDa5H9YO6NUdIXtNL3YQk2Vi uWlbfBvGF2zvJcxpWVwFtNkLHr2X7GeeGgK/fA/hoCecZ+5KPNcoTCJkC3DSjfIQHtmA EtbS+ExKNMJnHEgLLkqQubBnO17aDUlJ4ib3ZmfhFEJO0et1qfqkErXGl/YYGsOjZu/e GhIvQhkCfwlQffLP6/24LBzCLHqET6YMicFoKxOT1G/u58KN63PuJiMbcP1fzYzBk0Us PfzUdMJWgPFOpmXlaPdjYTPypn9y0NOBqBI0VRAtueTBFhELDJhNUg5GDrS4DN1elhrk tI8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=o9WbLLPr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jp13si13945382ejb.312.2020.06.25.04.30.08; Thu, 25 Jun 2020 04:30:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=o9WbLLPr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404206AbgFYL3x (ORCPT + 99 others); Thu, 25 Jun 2020 07:29:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47128 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2403997AbgFYL3w (ORCPT ); Thu, 25 Jun 2020 07:29:52 -0400 Received: from casper.infradead.org (unknown [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 109B6C061573 for ; Thu, 25 Jun 2020 04:29:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.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; bh=fXCHQRpJ34HMUF2mE+6g5VzQO598DF13gdLnlC4s9Ls=; b=o9WbLLPrIAEPqOYbQtLUUJrbN9 PXZDcuhUC/NJTa9HGeNz7UsLPcgg0RYFdoeKQWJWijvg7b8gmpYZotdjtJVpiRGMuNq+It63B3jWt G0HDtvO0rJZPemFiCdwGhnz7KWI2hB82Qk4yY9u4a5PK099Z4cd/cQyeTbbAw1LBuJm/EjDSIW8Dk LOxSzzX4vFcgCD+rWS5qAxMR4WQJ1pSJancBwZ7oVy+97m5kcROU4fnQ81EwUu1Zf0vex7UbAp6Zn 45d3Kx4REtuyILGF4kaW9pekSkRkaTD6yETtm/82ZAWrTGup7d/7IeGdkeyqclXFpwxfEyX/yDSJM 8L2Q3VWQ==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1joQ4N-0001qd-6Z; Thu, 25 Jun 2020 11:29:27 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 32E23301A7A; Thu, 25 Jun 2020 13:29:26 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 1A00A20707D3A; Thu, 25 Jun 2020 13:29:26 +0200 (CEST) Date: Thu, 25 Jun 2020 13:29:26 +0200 From: Peter Zijlstra To: Marco Elver Cc: "Paul E. McKenney" , kernel test robot , kbuild-all@lists.01.org, LKML , Will Deacon Subject: Re: [rcu:rcu/next 35/35] kernel/rcu/tree.c:251:8: error: implicit declaration of function 'arch_atomic_add_return'; did you mean Message-ID: <20200625112926.GO4781@hirez.programming.kicks-ass.net> References: <202006250300.ic32FsdY%lkp@intel.com> <20200624203025.GJ9247@paulmck-ThinkPad-P72> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 25, 2020 at 11:55:13AM +0200, Marco Elver wrote: > On Wed, 24 Jun 2020 at 22:30, Paul E. McKenney wrote: > > diff --git a/include/linux/atomic-fallback.h b/include/linux/atomic-fallback.h > > index 2c4927b..b7935857 100644 > > --- a/include/linux/atomic-fallback.h > > +++ b/include/linux/atomic-fallback.h > > @@ -133,6 +133,7 @@ atomic_add_return(int i, atomic_t *v) > > return ret; > > } > > #define atomic_add_return atomic_add_return > > +#define arch_atomic_add_return atomic_add_return > > #endif > > > > #endif /* atomic_add_return_relaxed */ > > > > ------------------------------------------------------------------------ > > > > And of course similar for arch_atomic_andnot() and arch_atomic_read(). > > > > Another way would be to define a noinstr_atomic_add_return() that > > was defined something like this: > > > > ------------------------------------------------------------------------ > > > > #ifdef CONFIG_HAVE_ARCH_KCSAN > > # define noinstr_atomic_add_return arch_atomic_add_return > > #else > > # define noinstr_atomic_add_return atomic_add_return > > #endif > > noinstr also needs to apply to KASAN & co, so this won't quite work. > Every architecture that defines arch_atomic_* has #define ARCH_ATOMIC, > so that could be used instead. Right. And my bad for forgetting arch_atomic_ isn't generally available :/ > > ------------------------------------------------------------------------ > > > > And again similarly for the others. > > > > Left to myself, I would take the second option just because it provably > > leaves unaltered anything that isn't using the new API. That said, > > there has to be a better Kconfig option to key this off of. > > > > Thoughts? > > I think 'arch_atomic_*' is already the noinstr variant, and your first > suggestion of adding arch-defines to atomic-fallback.h seems cleaner, > as it avoids introducing new interfaces. But that also depends on if > it's a one-off, only for RCU, or if the use of 'arch_atomic' > proliferates outside of arch/. My guess is that, unfortunately, other > places will want 'arch_atomic' as well eventually. I fear the same. Let me see if I can quickly modify the atomic scripts to generate the required fallbacks.