[PATCH]: powerpc: clarify use of twi/isync in io macros

Paul Mackerras paulus at samba.org
Thu Sep 21 22:41:14 EST 2006

Linas Vepstas writes:

> + * A data-dependent branch followed by an isync ensures that no
> + * instructions after the isync in program order will be
> + * (speculatively) executed, so the load that the twi depends
> + * on has to complete before anything else is executed; in

While the statement about branches is true, it's not especially
relevant when it comes to twi.  What's happening is that isync has to
prevent any following instructions from starting execution until all
previous instructions have completed, meaning that they have got to
the point of knowing whether they will generate an exception or not.
In general the processor doesn't know whether twi will generate an
exception until the data it depends on is available, and that's why
the isync has to wait for the previous load to have returned the

> + * particular, it's a barrier to keep MMIO reads ordered before
> + * main-storage accesses.



More information about the Linuxppc-dev mailing list