From: Li Guang <lig.fnst@cn.fujitsu.com>
To: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
"QEMU Developers" <qemu-devel@nongnu.org>,
"Andreas Färber" <afaerber@suse.de>,
"Juan Quintela" <quintela@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v12 1/5] vmstate: Add support for an array of ptimer_state *
Date: Fri, 13 Dec 2013 13:29:40 +0800 [thread overview]
Message-ID: <52AA9B44.9010506@cn.fujitsu.com> (raw)
In-Reply-To: <CAEgOgz7yXHD=KZv55jJSwsv39BoW6_er2wuBZqwweqysJT5+vw@mail.gmail.com>
Peter Crosthwaite wrote:
> On Fri, Dec 13, 2013 at 11:19 AM, liguang<lig.fnst@cn.fujitsu.com> wrote:
>
>> From: Peter Maydell<peter.maydell@linaro.org>
>>
>> Add support for defining a vmstate field which is an array
>> of pointers to structures, and use this to define a
>> VMSTATE_PTIMER_ARRAY() which allows an array of ptimer_state*
>> to be used by devices.
>>
>> Signed-off-by: Peter Maydell<peter.maydell@linaro.org>
>>
> If you are intending someones else patch for merge as part of your own
> series, you should sign it off yourself. Considering it's only one
> patch, you probably can just do this on list (just like a review)
> rather than a respin.
>
>
Ok, here's a
Signed-off-by: liguang<lig.fnst@cn.fujitsu.com>
Thanks!
> Regards,
> Peter
>
>
>> ---
>> include/hw/ptimer.h | 4 ++++
>> include/migration/vmstate.h | 10 ++++++++++
>> 2 files changed, 14 insertions(+), 0 deletions(-)
>>
>> diff --git a/include/hw/ptimer.h b/include/hw/ptimer.h
>> index 28fcaf1..a33edf4 100644
>> --- a/include/hw/ptimer.h
>> +++ b/include/hw/ptimer.h
>> @@ -36,4 +36,8 @@ extern const VMStateDescription vmstate_ptimer;
>> .offset = vmstate_offset_pointer(_state, _field, ptimer_state), \
>> }
>>
>> +#define VMSTATE_PTIMER_ARRAY(_f, _s, _n) \
>> + VMSTATE_ARRAY_OF_POINTER_TO_STRUCT(_f, _s, _n, 0, \
>> + vmstate_ptimer, ptimer_state)
>> +
>> #endif
>> diff --git a/include/migration/vmstate.h b/include/migration/vmstate.h
>> index 9d09e60..be193ba 100644
>> --- a/include/migration/vmstate.h
>> +++ b/include/migration/vmstate.h
>> @@ -339,6 +339,16 @@ extern const VMStateInfo vmstate_info_bitmap;
>> .offset = vmstate_offset_array(_state, _field, _type, _num), \
>> }
>>
>> +#define VMSTATE_ARRAY_OF_POINTER_TO_STRUCT(_f, _s, _n, _v, _vmsd, _type) { \
>> + .name = (stringify(_f)), \
>> + .version_id = (_v), \
>> + .num = (_n), \
>> + .vmsd =&(_vmsd), \
>> + .size = sizeof(_type *), \
>> + .flags = VMS_ARRAY|VMS_STRUCT|VMS_ARRAY_OF_POINTER, \
>> + .offset = vmstate_offset_array(_s, _f, _type*, _n), \
>> +}
>> +
>> #define VMSTATE_STRUCT_ARRAY_TEST(_field, _state, _num, _test, _version, _vmsd, _type) { \
>> .name = (stringify(_field)), \
>> .num = (_num), \
>> --
>> 1.7.2.5
>>
>>
>>
>
>
next prev parent reply other threads:[~2013-12-13 5:31 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-13 1:19 [Qemu-devel] [PATCH v12 0/5] add allwinner A10 SoC support liguang
2013-12-13 1:19 ` [Qemu-devel] [PATCH v12 1/5] vmstate: Add support for an array of ptimer_state * liguang
2013-12-13 3:22 ` Peter Crosthwaite
2013-12-13 5:29 ` Li Guang [this message]
2013-12-13 1:19 ` [Qemu-devel] [PATCH v12 2/5] hw/timer: add allwinner a10 timer liguang
2013-12-13 20:17 ` Antony Pavlov
2013-12-16 1:45 ` Li Guang
2013-12-13 1:19 ` [Qemu-devel] [PATCH v12 3/5] hw/intc: add allwinner A10 interrupt controller liguang
2013-12-13 1:19 ` [Qemu-devel] [PATCH v12 4/5] hw/arm: add allwinner a10 SoC support liguang
2013-12-13 1:19 ` [Qemu-devel] [PATCH v12 5/5] hw/arm: add cubieboard support liguang
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=52AA9B44.9010506@cn.fujitsu.com \
--to=lig.fnst@cn.fujitsu.com \
--cc=afaerber@suse.de \
--cc=peter.crosthwaite@xilinx.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.