qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] include/exec/memop.h: Expand comment for MO_ATOM_SUBALIGN
@ 2025-02-28 10:32 Peter Maydell
  2025-02-28 17:32 ` Richard Henderson
  0 siblings, 1 reply; 3+ messages in thread
From: Peter Maydell @ 2025-02-28 10:32 UTC (permalink / raw)
  To: qemu-devel; +Cc: Richard Henderson

Expand the example in the comment documenting MO_ATOM_SUBALIGN,
to be clearer about the atomicity guarantees it represents.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 include/exec/memop.h | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/include/exec/memop.h b/include/exec/memop.h
index acdb40a9b3b..407a47d82c7 100644
--- a/include/exec/memop.h
+++ b/include/exec/memop.h
@@ -91,8 +91,12 @@ typedef enum MemOp {
      *    Depending on alignment, one or both will be single-copy atomic.
      *    This is the atomicity e.g. of Arm FEAT_LSE2 LDP.
      * MO_ATOM_SUBALIGN: the operation is single-copy atomic by parts
-     *    by the alignment.  E.g. if the address is 0 mod 4, then each
-     *    4-byte subobject is single-copy atomic.
+     *    by the alignment.  E.g. if an 8-byte value is accessed at an
+     *    address which is 0 mod 8, then the whole 8-byte access is
+     *    single-copy atomic; otherwise, if it is accessed at 0 mod 4
+     *    then each 4-byte subobject is single-copy atomic; otherwise
+     *    if it is accessed at 0 mod 2 then the four 2-byte subobjects
+     *    are single-copy atomic.
      *    This is the atomicity e.g. of IBM Power.
      * MO_ATOM_NONE: the operation has no atomicity requirements.
      *
-- 
2.43.0



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] include/exec/memop.h: Expand comment for MO_ATOM_SUBALIGN
  2025-02-28 10:32 [PATCH] include/exec/memop.h: Expand comment for MO_ATOM_SUBALIGN Peter Maydell
@ 2025-02-28 17:32 ` Richard Henderson
  2025-03-07 10:40   ` Peter Maydell
  0 siblings, 1 reply; 3+ messages in thread
From: Richard Henderson @ 2025-02-28 17:32 UTC (permalink / raw)
  To: Peter Maydell, qemu-devel

On 2/28/25 02:32, Peter Maydell wrote:
> Expand the example in the comment documenting MO_ATOM_SUBALIGN,
> to be clearer about the atomicity guarantees it represents.
> 
> Signed-off-by: Peter Maydell<peter.maydell@linaro.org>
> ---
>   include/exec/memop.h | 8 ++++++--
>   1 file changed, 6 insertions(+), 2 deletions(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] include/exec/memop.h: Expand comment for MO_ATOM_SUBALIGN
  2025-02-28 17:32 ` Richard Henderson
@ 2025-03-07 10:40   ` Peter Maydell
  0 siblings, 0 replies; 3+ messages in thread
From: Peter Maydell @ 2025-03-07 10:40 UTC (permalink / raw)
  To: Richard Henderson; +Cc: qemu-devel

On Fri, 28 Feb 2025 at 17:32, Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> On 2/28/25 02:32, Peter Maydell wrote:
> > Expand the example in the comment documenting MO_ATOM_SUBALIGN,
> > to be clearer about the atomicity guarantees it represents.
> >
> > Signed-off-by: Peter Maydell<peter.maydell@linaro.org>
> > ---
> >   include/exec/memop.h | 8 ++++++--
> >   1 file changed, 6 insertions(+), 2 deletions(-)
>
> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

Thanks; I'll put this in target-arm.next since I'm doing a
pullreq before softfreeze, unless you'd rather take it
via your tree.

-- PMM


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-03-07 10:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-28 10:32 [PATCH] include/exec/memop.h: Expand comment for MO_ATOM_SUBALIGN Peter Maydell
2025-02-28 17:32 ` Richard Henderson
2025-03-07 10:40   ` Peter Maydell

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).