[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 4/5] hw/arm/pxa2xx: Convert pxa2xx-ssp to VMStat
From: |
Peter Crosthwaite |
Subject: |
Re: [Qemu-devel] [PATCH 4/5] hw/arm/pxa2xx: Convert pxa2xx-ssp to VMState |
Date: |
Fri, 5 Jun 2015 16:18:39 -0700 |
On Thu, May 28, 2015 at 5:09 AM, Peter Maydell <address@hidden> wrote:
> The pxa2xx-ssp device is already a QOM device but is still
> using the old-style register_savevm(); convert to VMState.
>
> Signed-off-by: Peter Maydell <address@hidden>
> ---
> hw/arm/pxa2xx.c | 89
> +++++++++++++++++++++------------------------------------
> 1 file changed, 33 insertions(+), 56 deletions(-)
>
> diff --git a/hw/arm/pxa2xx.c b/hw/arm/pxa2xx.c
> index 770902f..09401f9 100644
> --- a/hw/arm/pxa2xx.c
> +++ b/hw/arm/pxa2xx.c
> @@ -457,7 +457,7 @@ typedef struct {
>
> MemoryRegion iomem;
> qemu_irq irq;
> - int enable;
> + uint32_t enable;
> SSIBus *bus;
>
> uint32_t sscr[2];
> @@ -470,10 +470,39 @@ typedef struct {
> uint8_t ssacd;
>
> uint32_t rx_fifo[16];
> - int rx_level;
> - int rx_start;
> + uint32_t rx_level;
> + uint32_t rx_start;
> } PXA2xxSSPState;
>
> +static bool pxa2xx_ssp_vmstate_validate(void *opaque, int version_id)
> +{
> + PXA2xxSSPState *s = opaque;
> +
> + return s->rx_start < sizeof(s->rx_fifo);
Does this need to be ARRAY_SIZE to account for unit32_t indexing?
Regards,
Peter
> +}
> +
> +static const VMStateDescription vmstate_pxa2xx_ssp = {
> + .name = "pxa2xx-ssp",
> + .version_id = 1,
> + .minimum_version_id = 1,
- Re: [Qemu-devel] [PATCH 4/5] hw/arm/pxa2xx: Convert pxa2xx-ssp to VMState,
Peter Crosthwaite <=