Received: from eggs.gnu.org ([140.186.70.92]:45853) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QeRzg-00015U-Dv for qemu-devel@nongnu.org; Wed, 06 Jul 2011 09:18:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QeRzf-0006mS-01 for qemu-devel@nongnu.org; Wed, 06 Jul 2011 09:18:20 -0400 Received: from cantor2.suse.de ([195.135.220.15]:49173 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QeRze-0006m7-DO for qemu-devel@nongnu.org; Wed, 06 Jul 2011 09:18:18 -0400 References: <1309883290-17595-1-git-send-email-agraf@suse.de> <1309883290-17595-2-git-send-email-agraf@suse.de> <88EE018B-0308-48B5-80F8-B83D744E41A2@suse.de> <484E8730-8686-4FBE-9C50-2211C9C4E929@suse.de> <4E1437D8.3030103@redhat.com> <3DEFAA16-DAD1-4F26-A4C6-A8C4CB1E11B4@suse.de> <4E145D1C.9050506@suse.de> In-Reply-To: <4E145D1C.9050506@suse.de> Mime-Version: 1.0 (iPhone Mail 8G4) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Message-Id: <28EE58D7-3840-4FC5-A129-23DF3AC6FF6C@suse.de> From: Alexander Graf Date: Wed, 6 Jul 2011 15:18:01 +0200 Subject: Re: [Qemu-devel] [PATCH 1/9] exec: add endian specific phys ld/st functions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Hannes Reinecke Cc: Blue Swirl , Paolo Bonzini , "qemu-devel@nongnu.org Developers" Am 06.07.2011 um 15:03 schrieb Hannes Reinecke : > On 07/06/2011 01:34 PM, Alexander Graf wrote: >>=20 >>=20 >>=20 >>=20 >> On 06.07.2011, at 12:24, Paolo Bonzini wrote: >>=20 >>>> diff --git a/exec.c b/exec.c >>>> index 5f2f87e..f281ba4 100644 >>>> --- a/exec.c >>>> +++ b/exec.c >>>> @@ -4127,7 +4127,8 @@ void cpu_physical_memory_unmap(void *buffer, targ= et_phys_addr_t len, >>>> } >>>>=20 >>>> /* warning: addr must be aligned */ >>>> -uint32_t ldl_phys(target_phys_addr_t addr) >>>> +static inline uint32_t ldl_phys_internal(target_phys_addr_t addr, >>>> + enum device_endian endian) >>>=20 >>> You probably need the __always_inline__ attribute to really convince GCC= to inline this. >>=20 >> There's a define in osdep.h that converts inline into always_inline :) >>=20 > Btw, while you're at it: >=20 > uint32_t ldub_phys(target_phys_addr_t addr); > uint32_t lduw_phys(target_phys_addr_t addr); >=20 > Hmm? ldub is supposed to read an 'unsigned byte' (uint8_t), > and lduw is supposed to read an 'unsigned word' (uint16_t). >=20 > Why does it return an uint32_t? Because it ends up being a 32-bit register for the return value / parameter a= nyways :). But this is a different thing. I'd prefer to focus on the endian problem fo= r now. Alex