All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/18] locking/atomic: atomic64 type cleanup
@ 2019-05-22 13:22 Mark Rutland
  2019-05-22 13:22 ` [PATCH 01/18] locking/atomic: crypto: nx: prepare for atomic64_read() conversion Mark Rutland
                   ` (19 more replies)
  0 siblings, 20 replies; 60+ messages in thread
From: Mark Rutland @ 2019-05-22 13:22 UTC (permalink / raw)
  To: linux-kernel, peterz, will.deacon
  Cc: aou, arnd, bp, catalin.marinas, davem, fenghua.yu,
	heiko.carstens, herbert, ink, jhogan, linux, mark.rutland,
	mattst88, mingo, mpe, palmer, paul.burton, paulus, ralf, rth,
	stable, tglx, tony.luck, vgupta

Currently architectures return inconsistent types for atomic64 ops. Some return
long (e..g. powerpc), some return long long (e.g. arc), and some return s64
(e.g. x86).

This is a bit messy, and causes unnecessary pain (e.g. as values must be cast
before they can be printed [1]).

This series reworks all the atomic64 implementations to use s64 as the base
type for atomic64_t (as discussed [2]), and to ensure that this type is
consistently used for parameters and return values in the API, avoiding further
problems in this area.

This series (based on v5.1-rc1) can also be found in my atomics/type-cleanup
branch [3] on kernel.org.

Thanks,
Mark.

[1] https://lkml.kernel.org/r/20190310183051.87303-1-cai@lca.pw
[2] https://lkml.kernel.org/r/20190313091844.GA24390@hirez.programming.kicks-ass.net
[3] git://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git atomics/type-cleanup

Mark Rutland (18):
  locking/atomic: crypto: nx: prepare for atomic64_read() conversion
  locking/atomic: s390/pci: prepare for atomic64_read() conversion
  locking/atomic: generic: use s64 for atomic64
  locking/atomic: alpha: use s64 for atomic64
  locking/atomic: arc: use s64 for atomic64
  locking/atomic: arm: use s64 for atomic64
  locking/atomic: arm64: use s64 for atomic64
  locking/atomic: ia64: use s64 for atomic64
  locking/atomic: mips: use s64 for atomic64
  locking/atomic: powerpc: use s64 for atomic64
  locking/atomic: riscv: fix atomic64_sub_if_positive() offset argument
  locking/atomic: riscv: use s64 for atomic64
  locking/atomic: s390: use s64 for atomic64
  locking/atomic: sparc: use s64 for atomic64
  locking/atomic: x86: use s64 for atomic64
  locking/atomic: use s64 for atomic64_t on 64-bit
  locking/atomic: crypto: nx: remove redundant casts
  locking/atomic: s390/pci: remove redundant casts

 arch/alpha/include/asm/atomic.h       | 20 +++++------
 arch/arc/include/asm/atomic.h         | 41 +++++++++++-----------
 arch/arm/include/asm/atomic.h         | 50 +++++++++++++-------------
 arch/arm64/include/asm/atomic_ll_sc.h | 20 +++++------
 arch/arm64/include/asm/atomic_lse.h   | 34 +++++++++---------
 arch/ia64/include/asm/atomic.h        | 20 +++++------
 arch/mips/include/asm/atomic.h        | 22 ++++++------
 arch/powerpc/include/asm/atomic.h     | 44 +++++++++++------------
 arch/riscv/include/asm/atomic.h       | 44 ++++++++++++-----------
 arch/s390/include/asm/atomic.h        | 38 ++++++++++----------
 arch/s390/pci/pci_debug.c             |  2 +-
 arch/sparc/include/asm/atomic_64.h    |  8 ++---
 arch/x86/include/asm/atomic64_32.h    | 66 +++++++++++++++++------------------
 arch/x86/include/asm/atomic64_64.h    | 38 ++++++++++----------
 drivers/crypto/nx/nx-842-pseries.c    |  6 ++--
 include/asm-generic/atomic64.h        | 20 +++++------
 include/linux/types.h                 |  2 +-
 lib/atomic64.c                        | 32 ++++++++---------
 18 files changed, 252 insertions(+), 255 deletions(-)

-- 
2.11.0


^ permalink raw reply	[flat|nested] 60+ messages in thread

end of thread, other threads:[~2019-06-06  9:11 UTC | newest]

Thread overview: 60+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-22 13:22 [PATCH 00/18] locking/atomic: atomic64 type cleanup Mark Rutland
2019-05-22 13:22 ` [PATCH 01/18] locking/atomic: crypto: nx: prepare for atomic64_read() conversion Mark Rutland
2019-06-03 13:34   ` [tip:locking/core] locking/atomic, crypto/nx: Prepare " tip-bot for Mark Rutland
2019-05-22 13:22 ` [PATCH 02/18] locking/atomic: s390/pci: prepare " Mark Rutland
2019-06-03 13:34   ` [tip:locking/core] locking/atomic, s390/pci: Prepare " tip-bot for Mark Rutland
2019-05-22 13:22 ` [PATCH 03/18] locking/atomic: generic: use s64 for atomic64 Mark Rutland
2019-05-22 21:16   ` Arnd Bergmann
2019-06-03 13:35   ` [tip:locking/core] locking/atomic: Use " tip-bot for Mark Rutland
2019-05-22 13:22 ` [PATCH 04/18] locking/atomic: alpha: use " Mark Rutland
2019-06-03 13:36   ` [tip:locking/core] locking/atomic, alpha: Use " tip-bot for Mark Rutland
2019-05-22 13:22 ` [PATCH 05/18] locking/atomic: arc: use " Mark Rutland
2019-05-23 23:10   ` Vineet Gupta
2019-06-03 13:36   ` [tip:locking/core] locking/atomic, arc: Use " tip-bot for Mark Rutland
2019-05-22 13:22 ` [PATCH 06/18] locking/atomic: arm: use " Mark Rutland
2019-06-03 13:37   ` [tip:locking/core] locking/atomic, arm: Use " tip-bot for Mark Rutland
2019-05-22 13:22 ` [PATCH 07/18] locking/atomic: arm64: use " Mark Rutland
2019-06-03 13:38   ` [tip:locking/core] locking/atomic, arm64: Use " tip-bot for Mark Rutland
2019-05-22 13:22 ` [PATCH 08/18] locking/atomic: ia64: use " Mark Rutland
2019-06-03 13:39   ` [tip:locking/core] locking/atomic, ia64: Use " tip-bot for Mark Rutland
2019-05-22 13:22 ` [PATCH 09/18] locking/atomic: mips: use " Mark Rutland
2019-06-03 13:39   ` [tip:locking/core] locking/atomic, mips: Use " tip-bot for Mark Rutland
2019-05-22 13:22 ` [PATCH 10/18] locking/atomic: powerpc: use " Mark Rutland
2019-05-23 13:27   ` Michael Ellerman
2019-06-03 13:40   ` [tip:locking/core] locking/atomic, powerpc: Use " tip-bot for Mark Rutland
2019-05-22 13:22 ` [PATCH 11/18] locking/atomic: riscv: fix atomic64_sub_if_positive() offset argument Mark Rutland
2019-05-22 19:06   ` Palmer Dabbelt
2019-06-03 13:41   ` [tip:locking/core] locking/atomic, riscv: Fix " tip-bot for Mark Rutland
2019-05-22 13:22 ` [PATCH 12/18] locking/atomic: riscv: use s64 for atomic64 Mark Rutland
2019-05-22 19:06   ` Palmer Dabbelt
2019-05-23 10:23     ` Mark Rutland
2019-06-03 13:41   ` [tip:locking/core] locking/atomic, riscv: Use " tip-bot for Mark Rutland
2019-05-22 13:22 ` [PATCH 13/18] locking/atomic: s390: use " Mark Rutland
2019-06-03 13:42   ` [tip:locking/core] locking/atomic, s390: Use " tip-bot for Mark Rutland
2019-05-22 13:22 ` [PATCH 14/18] locking/atomic: sparc: use " Mark Rutland
2019-06-03 13:43   ` [tip:locking/core] locking/atomic, sparc: Use " tip-bot for Mark Rutland
2019-05-22 13:22 ` [PATCH 15/18] locking/atomic: x86: use " Mark Rutland
2019-06-03 13:44   ` [tip:locking/core] locking/atomic, x86: Use " tip-bot for Mark Rutland
2019-05-22 13:22 ` [PATCH 16/18] locking/atomic: use s64 for atomic64_t on 64-bit Mark Rutland
2019-06-03 13:44   ` [tip:locking/core] locking/atomic: Use " tip-bot for Mark Rutland
2019-05-22 13:22 ` [PATCH 17/18] locking/atomic: crypto: nx: remove redundant casts Mark Rutland
2019-06-03 13:45   ` [tip:locking/core] locking/atomic, crypto/nx: Remove " tip-bot for Mark Rutland
2019-05-22 13:22 ` [PATCH 18/18] locking/atomic: s390/pci: remove " Mark Rutland
2019-06-03 13:46   ` [tip:locking/core] locking/atomic, s390/pci: Remove " tip-bot for Mark Rutland
2019-05-22 21:18 ` [PATCH 00/18] locking/atomic: atomic64 type cleanup Arnd Bergmann
2019-05-23 10:28   ` Mark Rutland
2019-05-23  8:30 ` Andrea Parri
2019-05-23 10:19   ` Mark Rutland
2019-05-23 11:20     ` Andrea Parri
2019-05-24 10:37     ` Peter Zijlstra
2019-05-24 11:18       ` Peter Zijlstra
2019-05-24 11:38         ` Greg KH
2019-05-24 11:42         ` Will Deacon
2019-05-24 11:52           ` Peter Zijlstra
2019-05-24 22:43             ` Andrea Parri
2019-05-28 10:47               ` Peter Zijlstra
2019-05-28 11:15                 ` Andrea Parri
2019-06-03 13:46             ` [tip:locking/core] Documentation/atomic_t.txt: Clarify pure non-rmw usage tip-bot for Peter Zijlstra
2019-06-06  8:44               ` Andrea Parri
2019-06-06  9:04                 ` Peter Zijlstra
2019-06-06  9:11                   ` Andrea Parri

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.