From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:39856) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RDunR-0004yi-U9 for qemu-devel@nongnu.org; Wed, 12 Oct 2011 05:08:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RDunM-0000jY-Dg for qemu-devel@nongnu.org; Wed, 12 Oct 2011 05:08:17 -0400 Received: from mx1.redhat.com ([209.132.183.28]:2480) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RDunM-0000jU-5D for qemu-devel@nongnu.org; Wed, 12 Oct 2011 05:08:12 -0400 Message-ID: <4E955901.6090500@redhat.com> Date: Wed, 12 Oct 2011 11:08:17 +0200 From: Gerd Hoffmann MIME-Version: 1.0 References: <1315197304-22469-1-git-send-email-david@gibson.dropbear.id.au> <1315197304-22469-2-git-send-email-david@gibson.dropbear.id.au> <20111002102547.GC30747@redhat.com> <4E883CF4.6060606@redhat.com> <20111002105238.GE30747@redhat.com> <20111012031137.GQ4849@truffala.fritz.box> <20111012084437.GC7514@redhat.com> In-Reply-To: <20111012084437.GC7514@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 1/9] Add stub functions for PCI device models to do PCI DMA List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: aliguori@us.ibm.com, joerg.roedel@amd.com, agraf@suse.de, qemu-devel@nongnu.org, Avi Kivity , eduard.munteanu@linux360.ro, rth@twiddle.net Hi, >> Yes.. as do the stX_pci_dma() helpers. They assume LE, rather than >> having two variants, because PCI is an LE spec, and all normal PCI >> devices work in LE. > > IMO, not really. PCI devices do DMA any way they like. LE is > probably more common because both ARM and x86 processors are LE. Also having _le_ in the function name makes explicitly clear that the functions read/write little endian values and byteswaps if needed, which makes the code more readable. I'd suggest to add it even if there is no need for a _be_ companion as devices needing that are rare. cheers, Gerd