[POWERPC] convert string i/o operations to C

Stephen Rothwell sfr at canb.auug.org.au
Wed Sep 20 09:07:06 EST 2006


On Tue, 19 Sep 2006 13:42:58 +0100 David Howells <dhowells at redhat.com> wrote:
>
> Stephen Rothwell <sfr at canb.auug.org.au> wrote:
> 
> > +void _insb(volatile u8 __iomem *port, void *buf, int ns)
> > +{
> > +	asm volatile("sync");
> > +	if (ns <= 0)
> > +		return;
> 
> What is "ns" meant to do?  It seems to degrade the _insb() op to just a sync,
> but is that correct?

"ns" is the count (maybe I should rename the parameter, but that is what
was in the prototype in io.h).  The "sync" is in the same place as it was
in the assembler code that this replaces.

-- 
Cheers,
Stephen Rothwell                    sfr at canb.auug.org.au
http://www.canb.auug.org.au/~sfr/



More information about the Linuxppc-dev mailing list