linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH]: powerpc documentation: Clarify why twi appears in the i/o macros.
@ 2006-12-06 18:29 Linas Vepstas
  2006-12-06 18:39 ` Sergei Shtylyov
  0 siblings, 1 reply; 12+ messages in thread
From: Linas Vepstas @ 2006-12-06 18:29 UTC (permalink / raw)
  To: paulus; +Cc: ppc-dev, Stephen Rothwell


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

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

end of thread, other threads:[~2006-12-11 16:37 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
     [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

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