linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] Allow assembly code to use BIT(), GENMASK(), etc. and clean-up arm64 header
@ 2019-05-27  8:34 Masahiro Yamada
  2019-05-27  8:34 ` [PATCH 1/2] linux/bits.h: make BIT(), GENMASK(), and friends available in assembly Masahiro Yamada
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Masahiro Yamada @ 2019-05-27  8:34 UTC (permalink / raw)
  To: linux-arm-kernel, Will Deacon
  Cc: linux-kernel, Catalin Marinas, Masahiro Yamada


Some in-kernel headers use _BITUL() instead of BIT().

 arch/arm64/include/asm/sysreg.h
 arch/s390/include/asm/*.h

I think the reason is because BIT() is currently not available
in assembly. It hard-codes 1UL, which is not available in assembly.

1/2 replaced
   1UL -> UL(1)
   0UL -> UL(0)
   1ULL -> ULL(1)
   0ULL -> ULL(0)

With this, there is no more restriction that prevents assembly
code from using them.

2/2 is a clean-up as as example.

I can contribute to cleanups of arch/s390/, etc.
once this series lands in upstream.

I hope both patches can go in the arm64 tree.



Masahiro Yamada (2):
  linux/bits.h: make BIT(), GENMASK(), and friends available in assembly
  arm64: replace _BITUL() with BIT()

 arch/arm64/include/asm/sysreg.h | 82 ++++++++++++++++-----------------
 include/linux/bits.h            | 17 ++++---
 2 files changed, 51 insertions(+), 48 deletions(-)

-- 
2.17.1


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

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

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-27  8:34 [PATCH 0/2] Allow assembly code to use BIT(), GENMASK(), etc. and clean-up arm64 header Masahiro Yamada
2019-05-27  8:34 ` [PATCH 1/2] linux/bits.h: make BIT(), GENMASK(), and friends available in assembly Masahiro Yamada
2019-06-11 15:47   ` Will Deacon
2019-05-27  8:34 ` [PATCH 2/2] arm64: replace _BITUL() with BIT() Masahiro Yamada
2019-06-11 15:48   ` Will Deacon
2019-06-05  6:19 ` [PATCH 0/2] Allow assembly code to use BIT(), GENMASK(), etc. and clean-up arm64 header Masahiro Yamada
2019-06-05  7:34 ` Catalin Marinas
2019-06-05  9:01   ` Masahiro Yamada
2019-06-11 15:49     ` 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).