Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] arm64: insn: clean-up memory barrier generation
@ 2026-10-16 16:51 Ada Couprie Diaz
  2026-10-16 16:51 ` [PATCH 1/2] arm64: insn: clean-up memory barrier types Ada Couprie Diaz
  2026-10-16 16:51 ` [PATCH 2/2] arm64: insn: make `aarch64_insn_gen_d{m,s}b()` alternative-safe Ada Couprie Diaz
  0 siblings, 2 replies; 7+ messages in thread
From: Ada Couprie Diaz @ 2026-10-16 16:51 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: Mark Rutland, Marc Zyngier, Barry Song, Vladimir Murzin,
	Puranjay Mohan, Catalin Marinas, Lorenzo Pieralisi, Xu Kuohai,
	Lucas Wei, Mark Brown, Andre Przywara, Tejun Heo, Oliver Upton,
	Will Deacon, Sascha Bischoff

Hello,

This is a small follow-up from [0], taking Vladimir's comments into
account and going a bit further in cleaning-up DMB/DSB generation.

The first patch prepares for inlining and cleans-up the enum cases,
encoding the values directly and matching their numerical order.

The second patch inlines the barrier type check and the instruction
generation functions, allowing checking at compile time for invalid
barrier types (only non-deprecated types are allowed now) and safe
usage in alternative callbacks.

The "empty" switch-case statements with a default `BUILD_BUG` might
not be the best way to check for valid type, but I thought that
it might be a bit better than a three-/six-way && if, do let me know !

Thanks in advance,
Ada

[0]: https://lore.kernel.org/r/20260928133034.243541-1-ada.coupriediaz@arm.com 

Ada Couprie Diaz (2):
  arm64: insn: clean-up memory barrier types
  arm64: insn: make `aarch64_insn_gen_d{m,s}b()` alternative-safe

 arch/arm64/include/asm/insn.h | 68 +++++++++++++++++++++++++++--------
 arch/arm64/lib/insn.c         | 58 ------------------------------
 arch/arm64/net/bpf_jit.h      |  2 +-
 3 files changed, 55 insertions(+), 73 deletions(-)


base-commit: 93f51579e7df248780214094418f205253383cc5
-- 
2.43.0



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

end of thread, other threads:[~2026-10-19 15:26 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-16 16:51 [PATCH 0/2] arm64: insn: clean-up memory barrier generation Ada Couprie Diaz
2026-10-16 16:51 ` [PATCH 1/2] arm64: insn: clean-up memory barrier types Ada Couprie Diaz
2026-10-19 10:07   ` Vladimir Murzin
2026-10-19 15:26     ` Ada Couprie Diaz
2026-10-16 16:51 ` [PATCH 2/2] arm64: insn: make `aarch64_insn_gen_d{m,s}b()` alternative-safe Ada Couprie Diaz
2026-10-19 10:49   ` Vladimir Murzin
2026-10-19 15:24     ` Ada Couprie Diaz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox