From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:52998) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S0BHE-0004Sn-Mw for qemu-devel@nongnu.org; Wed, 22 Feb 2012 07:26:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S0BH9-0002UE-1N for qemu-devel@nongnu.org; Wed, 22 Feb 2012 07:26:32 -0500 Received: from mailout3.w1.samsung.com ([210.118.77.13]:48942) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S0BH8-0002U1-S6 for qemu-devel@nongnu.org; Wed, 22 Feb 2012 07:26:27 -0500 MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=UTF-8; format=flowed Received: from euspt1 ([210.118.77.13]) by mailout3.w1.samsung.com (Sun Java(tm) System Messaging Server 6.3-8.04 (built Jul 29 2009; 32bit)) with ESMTP id <0LZS000F6NVZ1A60@mailout3.w1.samsung.com> for qemu-devel@nongnu.org; Wed, 22 Feb 2012 12:26:23 +0000 (GMT) Received: from [106.109.8.162] by spt1.w1.samsung.com (iPlanet Messaging Server 5.2 Patch 2 (built Jul 14 2004)) with ESMTPA id <0LZS006USNVXK1@spt1.w1.samsung.com> for qemu-devel@nongnu.org; Wed, 22 Feb 2012 12:26:22 +0000 (GMT) Date: Wed, 22 Feb 2012 16:26:20 +0400 From: Mitsyanko Igor In-reply-to: Message-id: <4F44DEEC.9050005@samsung.com> References: <1329905754-11873-1-git-send-email-i.mitsyanko@samsung.com> <1329905754-11873-4-git-send-email-i.mitsyanko@samsung.com> Subject: Re: [Qemu-devel] [PATCH 3/5] hw/pxa2xx_lcd.c: drop VMSTATE_UINTTL usage Reply-To: i.mitsyanko@samsung.com List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: balrogg@gmail.com Cc: peter.maydell@linaro.org, andrzej zaborowski , e.voevodin@samsung.com, quintela@redhat.com, qemu-devel@nongnu.org, kyungmin.park@samsung.com, d.solodkiy@samsung.com, m.kozlov@samsung.com, afaerber@suse.de On 02/22/2012 03:36 PM, andrzej zaborowski wrote: > On 22 February 2012 11:15, Igor Mitsyanko wrote: >> Convert three variables in DMAChannel state from type target_phys_addr_t to uint32_t, >> use VMSTATE_UINT32 instead of VMSTATE_UINTTL for these variables. >> We can do it safely because: >> 1) pxa2xx has 32-bit physical address; >> 2) rest of the code in this file treats these variables as uint32_t; > > Why's uint32_t more correct though? The purpose of using a named type > across qemu is to mark fields as memory addresses (similar to size_t > being used for sizes, etc.), uint32_t conveys less information -- only > the size. It's obviously more informative, but I thought it's main purpose is to be used with code that could be executed for a different targets (with different address bus width). > It's a safe hack, but I don't see the rationale. I don't consider this a hack, we are trying to emulate real hardware, and pxa lcd and dma controllers are intended to work with 32-bit bus. We should not have a possibility to use them with 64-bit targets. > If it's because VMSTATE_UINT32 requires that specific type than a less > ugly hack would be to make a pxa specific memory address type. > Introducing new type doesn't look pretty to me, maybe just rename variables to source_addr, dest_addr e.t.c? -- Mitsyanko Igor ASWG, Moscow R&D center, Samsung Electronics email: i.mitsyanko@samsung.com