LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Ellerman <mpe@ellerman.id.au>
To: Kautuk Consul <kconsul@linux.vnet.ibm.com>
Cc: paulmck@kernel.org, linux-kernel@vger.kernel.org,
	Rohan McLure <rmclure@linux.ibm.com>,
	Nicholas Piggin <npiggin@gmail.com>,
	linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH v2] arch/powerpc/include/asm/barrier.h: redefine rmb and wmb to  lwsync
Date: Thu, 23 Feb 2023 20:24:34 +1100	[thread overview]
Message-ID: <871qmgbup9.fsf@mpe.ellerman.id.au> (raw)
In-Reply-To: <Y/bvClrV60CXK79G@li-a450e7cc-27df-11b2-a85c-b5a9ac31e8ef.ibm.com>

Kautuk Consul <kconsul@linux.vnet.ibm.com> writes:
>  
>> You are correct, the patch is wrong because it fails to account for IO
>> accesses.
>
> Okay, I looked at the PowerPC ISA and found:
> "The memory barrier provides an ordering function for the storage accesses
> caused by Load, Store,and dcbz instructions that are executed by the processor
> executing the sync instruction and for which the specified storage location
> is in storage that is Memory Coherence Required and is neither Write Through
> Required nor Caching Inhibited.

Yep, that's the key sentence there. If you look at the definition for
"sync" it has not exceptions for different storage types.

I agree it's not very clear unless you're looking closely.

> Thanks for your time, Michael. Sorry for the noise.
>> 
>> Kautuk, I'm not sure what motivated you to look at these barriers, was
>> it just the documentation you linked to?

> I read the basic documentation. Now that I have access to the PowerISA
> document I guess I'll go through it more thoroughly.

The ISA is available publicly. There's links to most versions here:

https://wiki.raptorcs.com/wiki/Power_ISA

cheers

  reply	other threads:[~2023-02-23  9:25 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-22  9:03 [PATCH v2] arch/powerpc/include/asm/barrier.h: redefine rmb and wmb to lwsync Kautuk Consul
2023-02-22  9:30 ` Kautuk Consul
2023-02-22  9:44   ` Christophe Leroy
2023-02-22  9:49     ` Kautuk Consul
2023-02-22  9:43 ` Christophe Leroy
2023-02-22  9:46   ` Kautuk Consul
2023-02-22  9:51     ` Christophe Leroy
2023-02-22  9:55       ` Kautuk Consul
2023-02-22 17:47 ` Paul E. McKenney
2023-02-23  3:51   ` Michael Ellerman
2023-02-23  4:07     ` Kautuk Consul
2023-02-23  4:43     ` Kautuk Consul
2023-02-23  9:24       ` Michael Ellerman [this message]
2023-02-23  4:01   ` Kautuk Consul
2023-02-23  4:16     ` Paul E. McKenney
2023-02-23  4:22       ` Kautuk Consul

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=871qmgbup9.fsf@mpe.ellerman.id.au \
    --to=mpe@ellerman.id.au \
    --cc=kconsul@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=npiggin@gmail.com \
    --cc=paulmck@kernel.org \
    --cc=rmclure@linux.ibm.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