[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH V2 3/5] hw/pxa2xx_lcd.c: drop target_phys_addr_t
From: |
Andreas Färber |
Subject: |
Re: [Qemu-devel] [PATCH V2 3/5] hw/pxa2xx_lcd.c: drop target_phys_addr_t usage in device state |
Date: |
Wed, 14 Mar 2012 13:48:08 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:10.0.2) Gecko/20120215 Thunderbird/10.0.2 |
Am 05.03.2012 09:30, schrieb Igor Mitsyanko:
> Pxa2xx LCD controller is intended to work with 32-bit bus and it has no
> knowledge
> of system's physical address size, so it should not use target_phys_addr_t in
> it's
> state. Convert three variables in DMAChannel state from target_phys_addr_t to
> uint32_t,
> use VMSTATE_UINT32 instead of VMSTATE_UINTTL for these variables.
> We can do this safely because:
> 1) pxa2xx has 32-bit physical address;
> 2) rest of the code in file never assumes converted variables to have any size
> different from uint32_t;
> 3) we shouldn't have used VMSTATE_UINTTL in the first place because this macro
> is for target_ulong type (which can be different from target_phys_addr_t).
>
> Signed-off-by: Igor Mitsyanko <address@hidden>
> Reviewed-by: Peter Maydell <address@hidden>
Reviewed-by: Andreas Färber <address@hidden>
Some Coccinelle script or so to verify that also non-UINTTL fields match
types would probably be nice long-term.
Andreas
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
- [Qemu-devel] [PATCH V2 0/5] VMState cleanups, Igor Mitsyanko, 2012/03/05
- [Qemu-devel] [PATCH V2 2/5] hw/pxa2xx_dma.c: drop target_phys_addr_t usage in device state, Igor Mitsyanko, 2012/03/05
- [Qemu-devel] [PATCH V2 1/5] target-alpha/machine.c: use VMSTATE_UINT64* instead of VMSTATE_UINTTL*, Igor Mitsyanko, 2012/03/05
- [Qemu-devel] [PATCH V2 3/5] hw/pxa2xx_lcd.c: drop target_phys_addr_t usage in device state, Igor Mitsyanko, 2012/03/05
- Re: [Qemu-devel] [PATCH V2 3/5] hw/pxa2xx_lcd.c: drop target_phys_addr_t usage in device state,
Andreas Färber <=
- [Qemu-devel] [PATCH V2 5/5] vmstate: introduce get_bufsize entry in VMStateField, Igor Mitsyanko, 2012/03/05
- [Qemu-devel] [PATCH V2 4/5] vmstate: move VMSTATE_UINTTL* macros definitions to cpu-defs.h, Igor Mitsyanko, 2012/03/05
- Re: [Qemu-devel] [PATCH V2 0/5] VMState cleanups, Peter Maydell, 2012/03/14