From: Catalin Marinas <catalin.marinas@arm.com>
To: richard clark <richard.xnu.clark@gmail.com>
Cc: mark.rutland@arm.com, linux-arm-kernel@lists.infradead.org
Subject: Re: LDREX and STREX in heterogeneous system?
Date: Wed, 9 Nov 2022 09:25:59 +0000 [thread overview]
Message-ID: <Y2tyJ7F5umVKZ9NF@arm.com> (raw)
In-Reply-To: <CAJNi4rOVB8ud+fobf0k3jnv2v2U+nk49oUha6DpKNtA9bOX43A@mail.gmail.com>
On Wed, Nov 09, 2022 at 04:34:13PM +0800, richard clark wrote:
> Suppose in a heterogeneous system, there're cortex-M7 and cortex-A72
> sharing the same bus. Does the below code sequence work as (ldr/str)ex
> expected?
>
> r2 point to a uncached shared memory between M7 and A72
>
> M7 A72
> ldrex r1, [r2]
> -------------------------> strex r0, r1, [r2]
In general, it won't. The exclusives are supposed to work in the same
inner shareable domain, so it depends on how the SoC has the M7 and A72
wired up. Are they cache coherent with each-other? Is there a global
exclusive monitor? The M7 may also need the MPU regions set up with the
Shareable attribute.
--
Catalin
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2022-11-09 9:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-09 8:34 LDREX and STREX in heterogeneous system? richard clark
2022-11-09 9:25 ` Catalin Marinas [this message]
2022-11-10 3:27 ` richard clark
2022-11-11 22:40 ` Catalin Marinas
2022-11-17 1:32 ` richard clark
2022-11-17 14:06 ` Catalin Marinas
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=Y2tyJ7F5umVKZ9NF@arm.com \
--to=catalin.marinas@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=mark.rutland@arm.com \
--cc=richard.xnu.clark@gmail.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;
as well as URLs for NNTP newsgroup(s).