From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-in-01.arcor-online.net (mail-in-11.arcor-online.net [151.189.21.51]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mx.arcor.de", Issuer "Thawte Premium Server CA" (verified OK)) by ozlabs.org (Postfix) with ESMTP id 164C467A3F for ; Wed, 20 Sep 2006 10:03:57 +1000 (EST) In-Reply-To: <1158707532.6002.171.camel@localhost.localdomain> References: <20060919222351.d27a1a06.sfr@canb.auug.org.au> <20060919182953.GK29167@austin.ibm.com> <1158707532.6002.171.camel@localhost.localdomain> Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: From: Segher Boessenkool Subject: Re: [POWERPC] convert string i/o operations to C Date: Wed, 20 Sep 2006 02:03:37 +0200 To: Benjamin Herrenschmidt Cc: Stephen Rothwell , paulus@samba.org, ppc-dev List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , >> 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