Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Ada Couprie Diaz <ada.coupriediaz@arm.com>
To: linux-arm-kernel@lists.infradead.org
Cc: Mark Rutland <mark.rutland@arm.com>,
	Marc Zyngier <maz@kernel.org>, Barry Song <baohua@kernel.org>,
	Vladimir Murzin <vladimir.murzin@arm.com>,
	Puranjay Mohan <puranjay@kernel.org>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Lorenzo Pieralisi <lpieralisi@kernel.org>,
	Xu Kuohai <xukuohai@huaweicloud.com>,
	Lucas Wei <lucaswei@google.com>, Mark Brown <broonie@kernel.org>,
	Andre Przywara <andre.przywara@arm.com>,
	Tejun Heo <tj@kernel.org>, Oliver Upton <oupton@kernel.org>,
	Will Deacon <will@kernel.org>,
	Sascha Bischoff <Sascha.Bischoff@arm.com>
Subject: [PATCH 0/2] arm64: insn: clean-up memory barrier generation
Date: Fri, 16 Oct 2026 17:51:38 +0100	[thread overview]
Message-ID: <20261016165140.254791-1-ada.coupriediaz@arm.com> (raw)

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



             reply	other threads:[~2026-10-16 16:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-16 16:51 Ada Couprie Diaz [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261016165140.254791-1-ada.coupriediaz@arm.com \
    --to=ada.coupriediaz@arm.com \
    --cc=Sascha.Bischoff@arm.com \
    --cc=andre.przywara@arm.com \
    --cc=baohua@kernel.org \
    --cc=broonie@kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=lpieralisi@kernel.org \
    --cc=lucaswei@google.com \
    --cc=mark.rutland@arm.com \
    --cc=maz@kernel.org \
    --cc=oupton@kernel.org \
    --cc=puranjay@kernel.org \
    --cc=tj@kernel.org \
    --cc=vladimir.murzin@arm.com \
    --cc=will@kernel.org \
    --cc=xukuohai@huaweicloud.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox