mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mark Rutland <mark.rutland@arm.com>
To: "André Almeida" <andrealmeid@igalia.com>
Cc: "Catalin Marinas" <catalin.marinas@arm.com>,
	"Will Deacon" <will@kernel.org>,
	"Thomas Gleixner" <tglx@kernel.org>,
	"Mathieu Desnoyers" <mathieu.desnoyers@efficios.com>,
	"Sebastian Andrzej Siewior" <bigeasy@linutronix.de>,
	"Peter Zijlstra" <peterz@infradead.org>,
	"Florian Weimer" <fweimer@redhat.com>,
	"Darren Hart" <dvhart@infradead.org>,
	"Ingo Molnar" <mingo@kernel.org>,
	"Davidlohr Bueso" <dave@stgolabs.net>,
	"Arnd Bergmann" <arnd@arndb.de>,
	"Uros Bizjak" <ubizjak@gmail.com>,
	"Thomas Weißschuh" <linux@weissschuh.net>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org,
	kernel-dev@igalia.com
Subject: Re: [PATCH v8 2/4] arm64: vdso: Implement __vdso_futex_robust_try_unlock()
Date: Thu, 17 Sep 2026 11:45:43 +0100	[thread overview]
Message-ID: <aqvE1w1-FQPD4AoM@J2N7QTR9R3> (raw)
In-Reply-To: <9d9a804f-c1f3-4c0c-b12a-975206f6c34c@igalia.com>

On Wed, Sep 16, 2026 at 10:06:25PM -0300, André Almeida wrote:
> If I understood correctly, the correct approach here would be to use pop_reg
> as an input operand, making sure that we store the address hold by *pop on
> x2 register right? So something along the lines:
> 
> __u32 __vdso_futex_robust_list64_try_unlock(__u32 *lock, __u32 tid, __u64
> *pop)
> {
> 	register __u64 pop_reg asm("x2") = (__u64) pop;
> 
> ...
> 
> 		"	str 	xzr, [%x[pop_reg]]		\n"
> ...
> 
> 		: [val] "=&r" (val),
> 		  [result] "=&r" (result_reg),
> 		  [lock] "+Q" (*lock)
> 		: [tid] "r" (tid),
> 		  [pop_reg] "r" (pop_reg)
> 		: "cc", "memory"
> 
> Does that looks right?

Yep; that should work!

Just for completeness: another option would be to drop the memory
clobber, and have separate constraints for the "pop" memory location and
the "pop_reg" register. I think your suggestion above is simpler, so
let's go with that.

Mark.

  reply	other threads:[~2026-09-17 10:45 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-21 21:50 [PATCH v8 0/4] " André Almeida
2026-08-21 21:50 ` [PATCH v8 1/4] arm64: vdso: Prepare for robust futex unlock support André Almeida
2026-09-16 14:24   ` Mark Rutland
2026-09-17  1:05     ` André Almeida
2026-09-17 10:01       ` Mark Rutland
2026-09-17 14:40         ` André Almeida
2026-08-21 21:50 ` [PATCH v8 2/4] arm64: vdso: Implement __vdso_futex_robust_try_unlock() André Almeida
2026-09-16 14:27   ` Mark Rutland
2026-09-17  1:06     ` André Almeida
2026-09-17 10:45       ` Mark Rutland [this message]
2026-08-21 21:50 ` [PATCH v8 3/4] arm64: vdso32: Bring vdso32-offsets.h back André Almeida
2026-08-21 21:50 ` [PATCH v8 4/4] arm64: vdso32: Implement __vdso_futex_robust_try_unlock() André Almeida
2026-09-16 14:28   ` Mark Rutland
2026-09-17  1:11     ` André Almeida
2026-09-17 10:50       ` Mark Rutland
2026-09-17 14:41         ` André Almeida

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=aqvE1w1-FQPD4AoM@J2N7QTR9R3 \
    --to=mark.rutland@arm.com \
    --cc=andrealmeid@igalia.com \
    --cc=arnd@arndb.de \
    --cc=bigeasy@linutronix.de \
    --cc=catalin.marinas@arm.com \
    --cc=dave@stgolabs.net \
    --cc=dvhart@infradead.org \
    --cc=fweimer@redhat.com \
    --cc=kernel-dev@igalia.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@weissschuh.net \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=tglx@kernel.org \
    --cc=ubizjak@gmail.com \
    --cc=will@kernel.org \
    /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

all inboxes | Powered by JetHome®