[POWERPC] convert string i/o operations to C

Segher Boessenkool segher at kernel.crashing.org
Wed Sep 20 10:03:37 EST 2006


>> Perhaps this:
>>
>>> +void _insb(volatile u8 __iomem *port, void *buf, int ns)
>>> +{
>>> +	asm volatile("sync");
>>> +	if (ns <= 0)
>>> +		return;
>>> +	asm volatile(
>>
>> should be this:
>>
>>> +void _insb(volatile u8 __iomem *port, void *buf, int ns)
>>> +{
>>> +	if (ns <= 0)
>>> +		return;
>>> +	asm volatile("sync");
>>> +	asm volatile(
>
> No. The barrier should be there even if somebody is lame enough to  
> give
> a count of 0.

Why?  If "ns" <= 0 there is no I/O done...


Segher




More information about the Linuxppc-dev mailing list