From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47690) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W31ba-00036D-UB for qemu-devel@nongnu.org; Tue, 14 Jan 2014 05:52:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W31bV-00043g-TW for qemu-devel@nongnu.org; Tue, 14 Jan 2014 05:52:22 -0500 Received: from mx1.redhat.com ([209.132.183.28]:4629) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W31bV-00043c-Kw for qemu-devel@nongnu.org; Tue, 14 Jan 2014 05:52:17 -0500 Date: Tue, 14 Jan 2014 12:52:14 +0200 From: "Michael S. Tsirkin" Message-ID: <20140114105214.GA27803@redhat.com> References: <1389598433-21159-1-git-send-email-aik@ozlabs.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1389598433-21159-1-git-send-email-aik@ozlabs.ru> Subject: Re: [Qemu-devel] [PATCH] tests: fix acpi to work on bigendian host List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexey Kardashevskiy Cc: qemu-devel@nongnu.org, Marcel Apfelbaum On Mon, Jan 13, 2014 at 06:33:53PM +1100, Alexey Kardashevskiy wrote: > Double endianness convertion make this test failing on POWERPC machine > running in big-endian. > > This fixes the test to success on big-endian host. > > Signed-off-by: Alexey Kardashevskiy Yes, readl etc already convert from guest endian-ness to host endian-ness, and guest is LE. Applied, thanks. > --- > tests/acpi-test.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/tests/acpi-test.c b/tests/acpi-test.c > index df1af83..30a5e3e 100644 > --- a/tests/acpi-test.c > +++ b/tests/acpi-test.c > @@ -51,13 +51,13 @@ typedef struct { > field = readb(addr); \ > break; \ > case 2: \ > - field = le16_to_cpu(readw(addr)); \ > + field = readw(addr); \ > break; \ > case 4: \ > - field = le32_to_cpu(readl(addr)); \ > + field = readl(addr); \ > break; \ > case 8: \ > - field = le64_to_cpu(readq(addr)); \ > + field = readq(addr); \ > break; \ > default: \ > g_assert(false); \ > -- > 1.8.4.rc4 >