[POWERPC] convert string i/o operations to C

Linas Vepstas linas at austin.ibm.com
Wed Sep 20 05:04:25 EST 2006


On Tue, Sep 19, 2006 at 01:52:59PM -0500, Kim Phillips wrote:
> On Tue, 19 Sep 2006 13:29:53 -0500
> linas at austin.ibm.com (Linas Vepstas) wrote:
> 
> > 
> > What does this twi do? According to my powerpc docs, this would be a
> > no-op.  Does this have some magic synchronizing powers on certain
> > implementations? If so, there should be at least a comment card added
> > about why the twi is there. (This special ability of twi might be
> > well-known to some, but still, this is not immediately obvious,
> > and not immedately documented in e.g. the PEM.)
> 
> include/asm-p[ower]pc/io.h sheds some light on the matter:
> 
>  * With the sequence below (twi; isync; nop), we have found that
>  * the machine check occurs on one of the three instructions on
>  * all PPC implementations tested so far.  The twi and isync are
>  * needed on the 601 (in fact twi; sync works too), the isync and
>  * nop are needed on 604[e|r], and any of twi, sync or isync will
>  * work on 603[e], 750, 74xx.
>  * The twi creates an explicit data dependency on the returned
>  * value which seems to be needed to make the 601 wait for the
>  * load to finish.


Thanks.  I notice that this commentary appears in asm-ppc/io.h
but not in asm-powerpc/io.h -- Perhaps a patch is in order ...
I'm creating such a patch now ...

--linas




More information about the Linuxppc-dev mailing list