linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH 0/5] Rewrite asm-generic/bitops/atomic.h and use on arm64
@ 2018-02-15 15:29 Will Deacon
  2018-02-15 15:29 ` [RFC PATCH 1/5] arm64: fpsimd: include <linux/init.h> in fpsimd.h Will Deacon
                   ` (4 more replies)
  0 siblings, 5 replies; 15+ messages in thread
From: Will Deacon @ 2018-02-15 15:29 UTC (permalink / raw)
  To: linux-arm-kernel

Hi all,

Whilst investigating a livelock in fs/dcache.c [1], I noticed that the
arm64 test_and_set operation always writes back to memory even if the
value is already set. This led me to start hacking on improved versions
of our bitops, including an acquire version of test_and_set_bit_lock.

Since there was nothing arm64-specific about the resulting code, I figured
I'd replace what's sitting in asm-generic/bitops/atomic.h and simply include
that instead. I had to rejig a couple of #includes so that I can call into
atomic_* ops from bitops.h, but that was actually pretty straightforward.

Feedback welcome,

Will

[1] https://lkml.org/lkml/2018/2/13/414

--->8

Will Deacon (5):
  arm64: fpsimd: include <linux/init.h> in fpsimd.h
  asm-generic: Avoid including linux/kernel.h in asm-generic/bug.h
  asm-generic/bitops/atomic.h: Rewrite using atomic_fetch_*
  arm64: Replace our atomic bitops implementation with asm-generic
  arm64: bitops: Include <asm-generic/bitops/ext2-atomic-setbit.h>

 arch/arm64/include/asm/bitops.h     |  20 +---
 arch/arm64/include/asm/fpsimd.h     |   1 +
 arch/arm64/lib/Makefile             |   2 +-
 arch/arm64/lib/bitops.S             |  76 -------------
 include/asm-generic/bitops/atomic.h | 219 ++++++++++++------------------------
 include/asm-generic/bug.h           |   2 +-
 lib/errseq.c                        |   1 +
 7 files changed, 77 insertions(+), 244 deletions(-)
 delete mode 100644 arch/arm64/lib/bitops.S

-- 
2.1.4

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

end of thread, other threads:[~2018-02-19 14:05 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-15 15:29 [RFC PATCH 0/5] Rewrite asm-generic/bitops/atomic.h and use on arm64 Will Deacon
2018-02-15 15:29 ` [RFC PATCH 1/5] arm64: fpsimd: include <linux/init.h> in fpsimd.h Will Deacon
2018-02-15 15:29 ` [RFC PATCH 2/5] asm-generic: Avoid including linux/kernel.h in asm-generic/bug.h Will Deacon
2018-02-15 15:29 ` [RFC PATCH 3/5] asm-generic/bitops/atomic.h: Rewrite using atomic_fetch_* Will Deacon
2018-02-15 17:08   ` Peter Zijlstra
2018-02-15 18:20     ` Will Deacon
2018-02-16 10:21       ` Peter Zijlstra
2018-02-19 14:01         ` Will Deacon
2018-02-19 14:04           ` Peter Zijlstra
2018-02-16 10:35       ` Peter Zijlstra
2018-02-16 14:18         ` Peter Zijlstra
2018-02-19 14:01         ` Will Deacon
2018-02-19 14:05           ` Peter Zijlstra
2018-02-15 15:29 ` [RFC PATCH 4/5] arm64: Replace our atomic bitops implementation with asm-generic Will Deacon
2018-02-15 15:29 ` [RFC PATCH 5/5] arm64: bitops: Include <asm-generic/bitops/ext2-atomic-setbit.h> Will Deacon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).