From patchwork Fri Jul 12 20:30:46 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Anthony Liguori X-Patchwork-Id: 258795 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id AB9F42C0315 for ; Sat, 13 Jul 2013 06:31:19 +1000 (EST) Received: from localhost ([::1]:53712 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uxjzp-0003ps-EV for incoming@patchwork.ozlabs.org; Fri, 12 Jul 2013 16:31:17 -0400 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 d01dlp03.pok.ibm.com (9.56.250.168) by e7.ny.us.ibm.com (192.168.1.107) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Fri, 12 Jul 2013 16:30:49 -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 Received: from titi.austin.rr.com (sig-9-49-139-62.mts.ibm.com [9.49.139.62]) by d01av04.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id r6CKUkh3027356; Fri, 12 Jul 2013 16:30:47 -0400 From: Anthony Liguori To: qemu-devel@nongnu.org Date: Fri, 12 Jul 2013 15:30:46 -0500 Message-Id: <1373661046-23421-1-git-send-email-aliguori@us.ibm.com> X-Mailer: git-send-email 1.8.0 MIME-Version: 1.0 X-TM-AS-MML: No X-Content-Scanned: Fidelis XPS MAILER x-cbid: 13071220-5806-0000-0000-0000220B0A4A X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 32.97.182.137 Cc: Anthony Liguori , =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Alex Graf Subject: [Qemu-devel] [PATCH] ioport: remove LITTLE_ENDIAN mark for portio X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 Acked-by: Alexander Graf --- 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, };