qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: "qemu-devel@nongnu.org Developers" <qemu-devel@nongnu.org>,
	Patch Tracking <patches@linaro.org>
Subject: Re: [Qemu-devel] [PATCH 4/5] hw/arm/pxa2xx: Convert pxa2xx-ssp to VMState
Date: Fri, 5 Jun 2015 17:49:03 -0700	[thread overview]
Message-ID: <CAEgOgz549yXQO_vPxJPFdpC2cocoV=UT++ftvHhq-os1qjCabg@mail.gmail.com> (raw)
In-Reply-To: <CAFEAcA8BF70qMADRdHmO81=T6n-cx7x7b3NZnRa1vW8EFJCchg@mail.gmail.com>

On Fri, Jun 5, 2015 at 4:32 PM, Peter Maydell <peter.maydell@linaro.org> wrote:
> On 6 June 2015 at 00:18, Peter Crosthwaite <peter.crosthwaite@xilinx.com> wrote:
>> On Thu, May 28, 2015 at 5:09 AM, Peter Maydell <peter.maydell@linaro.org> 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 <peter.maydell@linaro.org>
>>> ---
>>>  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?
>
> Yes, good catch.
>

Ok that's all I found. So otherwise,

Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>

I assume this is intended to break backwards compat on the VMSD with
the conversion from put_byte loop to VMSTATE_UINT32_ARRAY? I'm not
sure what our policy is on these old ARM machines and preserving the
backwards compat.

Regards,
Peter

> -- PMM
>

  reply	other threads:[~2015-06-06  0:49 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-28 12:09 [Qemu-devel] [PATCH 0/5] pxa2xx: minor bugfixes, updates to QOM, etc Peter Maydell
2015-05-28 12:09 ` [Qemu-devel] [PATCH 1/5] hw/arm/pxa2xx: Mark coprocessor registers as ARM_CP_IO Peter Maydell
2015-06-05 22:46   ` Peter Crosthwaite
2015-05-28 12:09 ` [Qemu-devel] [PATCH 2/5] hw/arm/pxa2xx: Convert pxa2xx-fir to QOM and VMState Peter Maydell
2015-06-06  1:07   ` Peter Crosthwaite
2015-06-06 10:14     ` Peter Maydell
2015-05-28 12:09 ` [Qemu-devel] [PATCH 3/5] hw/arm/pxa2xx: Add reset method for pxa2xx_ssp Peter Maydell
2015-06-05 22:57   ` Peter Crosthwaite
2015-06-05 23:00     ` Peter Maydell
2015-06-05 23:06       ` Peter Crosthwaite
2015-06-05 23:18         ` Peter Maydell
2015-06-06  1:37           ` Peter Crosthwaite
2015-06-06 10:23             ` Peter Maydell
2015-05-28 12:09 ` [Qemu-devel] [PATCH 4/5] hw/arm/pxa2xx: Convert pxa2xx-ssp to VMState Peter Maydell
2015-06-05 23:18   ` Peter Crosthwaite
2015-06-05 23:32     ` Peter Maydell
2015-06-06  0:49       ` Peter Crosthwaite [this message]
2015-06-06 10:11         ` Peter Maydell
2015-05-28 12:09 ` [Qemu-devel] [PATCH 5/5] hw/sd/pxa2xx_mmci: Stop using old_mmio in MemoryRegionOps Peter Maydell
2015-06-06  1:11   ` Peter Crosthwaite
2015-06-05 15:04 ` [Qemu-devel] [PATCH 0/5] pxa2xx: minor bugfixes, updates to QOM, etc Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAEgOgz549yXQO_vPxJPFdpC2cocoV=UT++ftvHhq-os1qjCabg@mail.gmail.com' \
    --to=peter.crosthwaite@xilinx.com \
    --cc=patches@linaro.org \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).