Received: from eggs.gnu.org ([2001:4830:134:3::10]:58396) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UxjzU-0003oY-Lw for qemu-devel@nongnu.org; Fri, 12 Jul 2013 16:31:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UxjzQ-0006T0-22 for qemu-devel@nongnu.org; Fri, 12 Jul 2013 16:30:56 -0400 Received: from e7.ny.us.ibm.com ([32.97.182.137]:53572) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UxjzP-0006SW-R6 for qemu-devel@nongnu.org; Fri, 12 Jul 2013 16:30:51 -0400 Received: from /spool/local by e7.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 12 Jul 2013 16:30:50 -0400 Received: from d01relay06.pok.ibm.com (d01relay06.pok.ibm.com [9.56.227.116]) by d01dlp03.pok.ibm.com (Postfix) with ESMTP id 0EC8DC90045 for ; Fri, 12 Jul 2013 16:30:48 -0400 (EDT) Received: from d01av04.pok.ibm.com (d01av04.pok.ibm.com [9.56.224.64]) by d01relay06.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r6CKUnvW66977998 for ; Fri, 12 Jul 2013 16:30:49 -0400 Received: from d01av04.pok.ibm.com (loopback [127.0.0.1]) by d01av04.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id r6CKUmHV027445 for ; Fri, 12 Jul 2013 16:30:49 -0400 From: Anthony Liguori Date: Fri, 12 Jul 2013 15:30:46 -0500 Message-Id: <1373661046-23421-1-git-send-email-aliguori@us.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [Qemu-devel] [PATCH] ioport: remove LITTLE_ENDIAN mark for portio List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Anthony Liguori , =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Alex Graf Setting it to LE forces a byte swap when host != guest endian but this makes no sense at all. Herve made the suggestion upon observing that word writes/reads were broken into byte writes/reads in such a way as to assume devices are interpret registers as LE. However, even if this were a problem, marking the region as LE is not useful because what's essentially happening here is that LE is open coded. So by marking it LE in MemoryRegionOps, we're doing a superflous swap. Now, the portio code is suspicious to begin with. The dispatch layer really has no purpose in splitting I/O requests in the first place... Cc: Hervé Poussineau Cc: Alex Graf Cc: Benjamin Herrenschmidt Signed-off-by: Anthony Liguori --- ioport.c | 1 - 1 file changed, 1 deletion(-) diff --git a/ioport.c b/ioport.c index 79b7f1a..89b17d6 100644 --- a/ioport.c +++ b/ioport.c @@ -183,7 +183,6 @@ static void portio_write(void *opaque, hwaddr addr, uint64_t data, static const MemoryRegionOps portio_ops = { .read = portio_read, .write = portio_write, - .endianness = DEVICE_LITTLE_ENDIAN, .valid.unaligned = true, .impl.unaligned = true, }; -- 1.8.0