From: "André Almeida" <andrealmeid@igalia.com>
To: "Catalin Marinas" <catalin.marinas@arm.com>,
"Will Deacon" <will@kernel.org>,
"Thomas Gleixner" <tglx@kernel.org>,
"Mark Rutland" <mark.rutland@arm.com>,
"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>
Cc: linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org,
kernel-dev@igalia.com
Subject: Re: [PATCH v6 4/4] arm64: vdso32: Implement __vdso_futex_robust_try_unlock()
Date: Thu, 23 Jul 2026 12:57:10 -0300 [thread overview]
Message-ID: <a701b60b-d343-4a7f-b298-e76c6c3a6cbc@igalia.com> (raw)
In-Reply-To: <20260720-tonyk-robust_arm-v6-4-7e68c122047e@igalia.com>
Em 20/07/2026 13:03, André Almeida escreveu:
> Based on aarch64 implementation, provide a 32 bit entry point for
> this vDSO.
>
> In order to keep compatibility with arm64_futex_robust_unlock_get_pop(),
> make sure to store the pop address at r2 and the compare result value
> at r3.
>
> Signed-off-by: André Almeida <andrealmeid@igalia.com>
[...]
> +__u32 __vdso_futex_robust_list32_try_unlock(__u32 *lock, __u32 tid, __u32 *pop)
> +{
> + register __u32 *pop_reg asm("r2") = pop, result_reg asm("r3") = 0;
> + __u32 val, zero = 0;
> +
> + asm volatile (
> + ".globl "
> + "__futex_list32_try_unlock_cs_start, "
> + "__futex_list32_try_unlock_cs_success, "
> + "__futex_list32_try_unlock_cs_end \n"
> +
> + "retry: \n"
> + " ldrex %[val], %[lock] \n"
> + " cmp %[tid], %[val] \n"
> + " bne __futex_list32_try_unlock_cs_end \n"
> + " strex %[result], %[zero], %[lock] \n"
Actually, this should be `stlex` instead for the store release semantics.
> + "__futex_list32_try_unlock_cs_start: \n"
> + " cmp %[result], #0 \n"
> + " bne retry \n"
> + "__futex_list32_try_unlock_cs_success: \n"
> + " str %[zero], %[pop_reg] \n"
> + "__futex_list32_try_unlock_cs_end: \n"
> +
> + : [val] "=&r" (val), [result] "=r" (result_reg)
> + : [tid] "r" (tid), [lock] "Q" (*lock), [pop_reg] "Q" (*pop_reg), [zero] "r" (zero)
> + : "cc", "memory"
> + );
> +
> + return val;
> +}
>
prev parent reply other threads:[~2026-07-23 15:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-20 16:03 [PATCH v6 0/4] arm64: vdso: Implement __vdso_futex_robust_try_unlock() André Almeida
2026-07-20 16:03 ` [PATCH v6 1/4] arm64: vdso: Prepare for robust futex unlock support André Almeida
2026-07-20 16:03 ` [PATCH v6 2/4] arm64: vdso: Implement __vdso_futex_robust_try_unlock() André Almeida
2026-07-20 16:03 ` [PATCH v6 3/4] arm64: vdso32: Bring vdso32-offsets.h back André Almeida
2026-07-20 16:03 ` [PATCH v6 4/4] arm64: vdso32: Implement __vdso_futex_robust_try_unlock() André Almeida
2026-07-23 15:57 ` André Almeida [this message]
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=a701b60b-d343-4a7f-b298-e76c6c3a6cbc@igalia.com \
--to=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=mark.rutland@arm.com \
--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