lkml.org 
[lkml]   [2018]   [Jul]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCHv2 11/11] arm64: use instrumented atomics
On Mon, Jun 25, 2018 at 11:59:52AM +0100, Mark Rutland wrote:
> Now that the generic atomic headers provide instrumented wrappers of all
> the atomics implemented by arm64, let's migrate arm64 over to these.
>
> The additional instrumentation will help to find bugs (e.g. when fuzzing
> with Syzkaller).
>
> Mostly this change involes adding an arch_ prefix to a number of
> function names and macro definitions. Due to the way we call the LL/SC
> atomics via the LSE atomic wrappers, this requires adding an arch_
> prefix to some arm64-specific atomic primitives.
>
> Some unusual whitespace in the cmpxchg wrappers is fixed up as part of
> the change.
>
> Signed-off-by: Mark Rutland <mark.rutland@arm.com>
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Will Deacon <will.deacon@arm.com>
> ---
> arch/arm64/include/asm/atomic.h | 237 ++++++++++++++++++-----------------
> arch/arm64/include/asm/atomic_lse.h | 51 ++++----
> arch/arm64/include/asm/cmpxchg.h | 106 ++++++++--------
> arch/arm64/include/asm/lse.h | 2 +-
> arch/arm64/include/asm/sync_bitops.h | 16 +--
> 5 files changed, 212 insertions(+), 200 deletions(-)

This is mostly straightforward, but the cmpxchg/cmpxchg_double cases grow
an 'arch' prefix which suggests that they're part of the API with the core
atomics and also makes them horribly ugly. This just looks to be an artifact
of __LL_SC_CALL pasting that in. Can you drop that auto pasting of 'arch',
and instead change the non-cmpxchg-case callers of the macro to include the
arch prefix instead, please?

Will

\
 
 \ /
  Last update: 2018-07-04 17:24    [W:0.167 / U:0.264 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site