From: linas@austin.ibm.com (Linas Vepstas)
To: paulus@samba.org
Cc: ppc-dev <linuxppc-dev@ozlabs.org>,
Stephen Rothwell <sfr@canb.auug.org.au>
Subject: [PATCH]: powerpc documentation: Clarify why twi appears in the i/o macros.
Date: Wed, 6 Dec 2006 12:29:22 -0600 [thread overview]
Message-ID: <20061206182922.GA17931@austin.ibm.com> (raw)
Paul,
Please apply. This atch resulted from an email discussion
back in Sept.
--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-05 17:11:02.000000000 -0600
+++ linux-2.6.19-git7/include/asm-powerpc/io.h 2006-12-06 11:48:43.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
+ * 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
next reply other threads:[~2006-12-06 18:29 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-06 18:29 Linas Vepstas [this message]
2006-12-06 18:39 ` [PATCH]: powerpc documentation: Clarify why twi appears in the i/o macros Sergei Shtylyov
2006-12-06 19:45 ` Linas Vepstas
[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=20061206182922.GA17931@austin.ibm.com \
--to=linas@austin.ibm.com \
--cc=linuxppc-dev@ozlabs.org \
--cc=paulus@samba.org \
--cc=sfr@canb.auug.org.au \
/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).