linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: linas@austin.ibm.com (Linas Vepstas)
To: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: linuxppc-dev@ozlabs.org, paulus@samba.org,
	Stephen Rothwell <sfr@canb.auug.org.au>
Subject: Re: [PATCH]: powerpc documentation: Clarify why twi appears in the i/o	macros.
Date: Wed, 6 Dec 2006 13:45:17 -0600	[thread overview]
Message-ID: <20061206194516.GD17931@austin.ibm.com> (raw)
In-Reply-To: <45770E44.30000@ru.mvista.com>


Paul, a revised patch below, please apply.

On Wed, Dec 06, 2006 at 09:39:00PM +0300, Sergei Shtylyov wrote:
> 
>    A minor type here -- double "the".

Dohh. New patch below.

> WBR, Sergei

What does "WBR" mean?

--linas


Clarify why twi appears in the i/o macros.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Signed-off-by: Segher Boessenkool <segher@kernel.crashing.org>

----
 include/asm-powerpc/io.h |   11 +++++++++++
 1 file changed, 11 insertions(+)

Index: linux-2.6.19-git7/include/asm-powerpc/io.h
===================================================================
--- linux-2.6.19-git7.orig/include/asm-powerpc/io.h	2006-12-06 13:38:43.000000000 -0600
+++ linux-2.6.19-git7/include/asm-powerpc/io.h	2006-12-06 13:41:50.000000000 -0600
@@ -78,6 +78,17 @@ extern unsigned long pci_dram_offset;
  * Note: I might drop the _ns suffix on the stream operations soon as it is
  * simply normal for stream operations to not swap in the first place.
  *
+ * Read operations have additional twi & isync to make sure the read
+ * is actually performed (i.e. the data has come back) before we start
+ * executing any following instructions.
+ *
+ * A data-dependent branch followed by an isync ensures that
+ * no instructions after the isync in program order will be
+ * (speculatively) executed before the isync has completed,
+ * and the isync won't complete until the branch is resolved.
+ * The load that the twi depends on has to complete before
+ * anything else is executed; in particular, it's a barrier
+ * to keep MMIO reads ordered before main-storage accesses.
  */
 
 #ifdef CONFIG_PPC64

  reply	other threads:[~2006-12-06 19:45 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-06 18:29 [PATCH]: powerpc documentation: Clarify why twi appears in the i/o macros Linas Vepstas
2006-12-06 18:39 ` Sergei Shtylyov
2006-12-06 19:45   ` Linas Vepstas [this message]
     [not found]     ` <45772700.2080708@ru.mvista.com>
2006-12-06 22:22       ` Linas Vepstas
2006-12-08  2:58         ` Paul Mackerras
2006-12-08 21:54           ` Segher Boessenkool
2006-12-09  0:11             ` Linas Vepstas
2006-12-09  0:19             ` Paul Mackerras
2006-12-09  1:21               ` Linas Vepstas
2006-12-09  9:32               ` Segher Boessenkool
2006-12-11  2:37                 ` Paul Mackerras
2006-12-11 16:37                   ` Segher Boessenkool

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=20061206194516.GD17931@austin.ibm.com \
    --to=linas@austin.ibm.com \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=paulus@samba.org \
    --cc=sfr@canb.auug.org.au \
    --cc=sshtylyov@ru.mvista.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).