[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20200625193533.GA235320@elver.google.com>
Date: Thu, 25 Jun 2020 21:35:33 +0200
From: Marco Elver <elver@...gle.com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: "Paul E. McKenney" <paulmck@...nel.org>,
kernel test robot <lkp@...el.com>, kbuild-all@...ts.01.org,
LKML <linux-kernel@...r.kernel.org>,
Will Deacon <will@...nel.org>,
Mark Rutland <mark.rutland@....com>
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
On Thu, Jun 25, 2020 at 04:11PM +0200, Peter Zijlstra wrote:
> On Thu, Jun 25, 2020 at 01:29:26PM +0200, Peter Zijlstra wrote:
> > I fear the same. Let me see if I can quickly modify the atomic scripts
> > to generate the required fallbacks.
>
> Something like so ought to work, I suppose.
>
> ---
> Subject: locking/atomics: Provide the arch_atomic_ interface to generic code
> From: Peter Zijlstra <peterz@...radead.org>
> Date: Thu Jun 25 15:55:14 CEST 2020
>
> Architectures with instrumented (KASAN/KCSAN) atomic operations
> natively provide arch_atomic_ variants that are not instrumented.
>
> It turns out that some generic code also requires arch_atomic_ in
> order to avoid instrumentation, so provide the arch_atomic_ interface
> as a direct map into the regular atomic_ interface for
> non-instrumented architectures.
>
> Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
> ---
> include/linux/atomic-fallback.h | 236 +++++++++++++++++++++++++++++++++-
> scripts/atomic/gen-atomic-fallback.sh | 31 ++++
> 2 files changed, 266 insertions(+), 1 deletion(-)
Thanks, looks reasonable!
If noinstr becomes important on architectures that don't implement
atomics using arch_ themselves, there might be a problem with
CONFIG_TRACE_BRANCH_PROFILING, because unlikely() is used throughout
this file. Probably not something to worry about now.
Thanks,
-- Marco
Powered by blists - more mailing lists