| Deutsch English Français Italiano |
|
<f9e9f6672e6a3aee798231ace65392e0@www.novabbs.org> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!weretis.net!feeder9.news.weretis.net!news.nk.ca!rocksolid2!i2pn2.org!.POSTED!not-for-mail
From: mitchalsup@aol.com (MitchAlsup1)
Newsgroups: comp.arch
Subject: Re: Arm ldaxr / stxr loop question
Date: Sun, 10 Nov 2024 01:26:22 +0000
Organization: Rocksolid Light
Message-ID: <f9e9f6672e6a3aee798231ace65392e0@www.novabbs.org>
References: <vfono1$14l9r$1@dont-email.me> <vgjvsv$31l0n$1@dont-email.me> <E5pXO.86774$TpU4.12115@fx41.iad> <vgoni8$ib$1@dont-email.me> <W4SXO.278128$WtV9.16170@fx10.iad>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: i2pn2.org;
logging-data="1752666"; mail-complaints-to="usenet@i2pn2.org";
posting-account="o5SwNDfMfYu6Mv4wwLiW6e/jbA93UAdzFodw5PEa6eU";
User-Agent: Rocksolid Light
X-Spam-Checker-Version: SpamAssassin 4.0.0
X-Rslight-Site: $2y$10$2TSMfGEHCbf/fuXDXllY5eOZXkd6USxqJiDCKmg1b8xLUBuYUTs6m
X-Rslight-Posting-User: cb29269328a20fe5719ed6a1c397e21f651bda71
Bytes: 1991
Lines: 28
On Sat, 9 Nov 2024 23:18:14 +0000, Scott Lurndal wrote:
> "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> writes:
>>On 11/8/2024 6:19 AM, Scott Lurndal wrote:
>>> Lawrence D'Oliveiro <ldo@nz.invalid> writes:
>
>>>
>>> A real world example from the linux kernel:
>>>
>>> static __always_inline s64
>>> __ll_sc_atomic64_dec_if_positive(atomic64_t *v)
>>> {
>>> s64 result;
>>> unsigned long tmp;
>>>
>>> asm volatile("// atomic64_dec_if_positive\n"
>>> " prfm pstl1strm, %2\n"
>>> "1: ldxr %0, %2\n"
>>> " subs %0, %0, #1\n"
>>> " b.lt 2f\n"
>>> " stlxr %w1, %0, %2\n"
>>> " cbnz %w1, 1b\n"
>>> " dmb ish\n"
>>
>>"dmb ish" is interesting to me for some reason...
>
> Data Memory Barrior - inner sharable coherency domain
It reads better without explanation ...