lkml.org 
[lkml]   [2020]   [Jun]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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@infradead.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@infradead.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

\
 
 \ /
  Last update: 2020-06-25 21:36    [W:0.063 / U:0.316 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site