From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:35908) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RjRvS-0006AE-Th for qemu-devel@nongnu.org; Sat, 07 Jan 2012 03:46:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RjRvQ-00051H-L9 for qemu-devel@nongnu.org; Sat, 07 Jan 2012 03:46:54 -0500 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Sat, 7 Jan 2012 09:45:14 +0100 Message-Id: <1325925915-21477-2-git-send-email-afaerber@suse.de> In-Reply-To: <1325925915-21477-1-git-send-email-afaerber@suse.de> References: <1325925915-21477-1-git-send-email-afaerber@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH 1/2] memory: Fix memory_region_wrong_endianness() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, =?UTF-8?q?Andreas=20F=C3=A4rber?= , Avi Kivity Since commit be675c972088eba210e18dc125613e9f205a6bfb (memory: move endianness compensation to memory core) it was checking for TARGET_BIG_ENDIAN instead of TARGET_WORDS_BIGENDIAN, thereby not swapping correctly for Big Endian targets. Signed-off-by: Andreas F=C3=A4rber Cc: Avi Kivity --- memory.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/memory.c b/memory.c index 394cbab..5e55a90 100644 --- a/memory.c +++ b/memory.c @@ -843,7 +843,7 @@ static void memory_region_destructor_rom_device(Memor= yRegion *mr) =20 static bool memory_region_wrong_endianness(MemoryRegion *mr) { -#ifdef TARGET_BIG_ENDIAN +#ifdef TARGET_WORDS_BIGENDIAN return mr->ops->endianness =3D=3D DEVICE_LITTLE_ENDIAN; #else return mr->ops->endianness =3D=3D DEVICE_BIG_ENDIAN; --=20 1.7.7