Skip to content
  • Mark Rutland's avatar
    locking/atomics: Switch to generated fallbacks · 9fa45070
    Mark Rutland authored
    
    
    As a step to ensuring the atomic* APIs are consistent, switch to fallbacks
    generated by gen-atomic-fallback.sh.
    
    These are checked in rather than generated with Kbuild, since:
    
    * This allows inspection of the atomics with git grep and ctags on a
      pristine tree, which Linus strongly prefers being able to do.
    
    * The fallbacks are not affected by machine details or configuration
      options, so it is not necessary to regenerate them to take these into
      account.
    
    * These are included by files required *very* early in the build process
      (e.g. for generating bounds.h), and we'd rather not complicate the
      top-level Kbuild file with dependencies.
    
    The new fallback header should be equivalent to the old fallbacks in
    <linux/atomic.h>, but:
    
    * It is formatted a little differently due to scripting ensuring things
      are more regular than they used to be.
    
    * Fallbacks are now expanded in-place as static inline functions rather
      than macros.
    
    * The prototypes for fallbacks are arragned consistently with the return
      type on a separate line to try to keep to a sensible line length.
    
    There should be no functional change as a result of this patch.
    
    Signed-off-by: default avatarMark Rutland <mark.rutland@arm.com>
    Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
    Acked-by: default avatarWill Deacon <will.deacon@arm.com>
    Cc: linux-arm-kernel@lists.infradead.org
    Cc: catalin.marinas@arm.com
    Cc: linuxdrivers@attotech.com
    Cc: dvyukov@google.com
    Cc: Boqun Feng <boqun.feng@gmail.com>
    Cc: arnd@arndb.de
    Cc: aryabinin@virtuozzo.com
    Cc: glider@google.com
    Link: http://lkml.kernel.org/r/20180904104830.2975-3-mark.rutland@arm.com
    
    
    Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
    9fa45070