Patchwork [v1,5/6] a9mpcore: remove old_timer_status field

login
register
mail settings
Submitter Peter Crosthwaite
Date Feb. 8, 2013, 4:03 a.m.
Message ID <d3ff1396-b2ba-4d9d-95b2-b8bce316d8ea@VA3EHSMHS029.ehs.local>
Download mbox | patch
Permalink /patch/219042/
State New
Headers show

Comments

Peter Crosthwaite - Feb. 8, 2013, 4:03 a.m.
This field was write only and thus unused. Removed.

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

 hw/a9mpcore.c |   11 +++--------
 1 files changed, 3 insertions(+), 8 deletions(-)
Peter Maydell - Feb. 18, 2013, 6:40 p.m.
On 8 February 2013 04:03, Peter Crosthwaite
<peter.crosthwaite@xilinx.com> wrote:
> This field was write only and thus unused. Removed.
>
> Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
> @@ -198,11 +194,10 @@ static int a9mp_priv_init(SysBusDevice *dev)
>
>  static const VMStateDescription vmstate_a9mp_priv = {
>      .name = "a9mpcore_priv",
> -    .version_id = 2,
> -    .minimum_version_id = 1,
> +    .version_id = 3,
> +    .minimum_version_id = 2,
>      .fields = (VMStateField[]) {
>          VMSTATE_UINT32(scu_control, A9MPPrivState),
> -        VMSTATE_UINT32_ARRAY(old_timer_status, A9MPPrivState, 8),
>          VMSTATE_UINT32_V(scu_status, A9MPPrivState, 2),
>          VMSTATE_END_OF_LIST()
>      }

Does v2 to v3 migration really work (ie ignoring the
v2-only field)? Since the previous patch broke migration
for A9 platforms anyway you might as well set the minimum
version ID to 3 and save me having to figure out the answer :-)

-- PMM
Peter Crosthwaite - Feb. 19, 2013, 12:41 a.m.
On Tue, Feb 19, 2013 at 4:40 AM, Peter Maydell <peter.maydell@linaro.org> wrote:
> On 8 February 2013 04:03, Peter Crosthwaite
> <peter.crosthwaite@xilinx.com> wrote:
>> This field was write only and thus unused. Removed.
>>
>> Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
>> @@ -198,11 +194,10 @@ static int a9mp_priv_init(SysBusDevice *dev)
>>
>>  static const VMStateDescription vmstate_a9mp_priv = {
>>      .name = "a9mpcore_priv",
>> -    .version_id = 2,
>> -    .minimum_version_id = 1,
>> +    .version_id = 3,
>> +    .minimum_version_id = 2,
>>      .fields = (VMStateField[]) {
>>          VMSTATE_UINT32(scu_control, A9MPPrivState),
>> -        VMSTATE_UINT32_ARRAY(old_timer_status, A9MPPrivState, 8),
>>          VMSTATE_UINT32_V(scu_status, A9MPPrivState, 2),
>>          VMSTATE_END_OF_LIST()
>>      }
>
> Does v2 to v3 migration really work (ie ignoring the
> v2-only field)? Since the previous patch broke migration
> for A9 platforms anyway you might as well set the minimum
> version ID to 3 and save me having to figure out the answer :-)
>

+1. Ill keep it simple with 3/3

> -- PMM
>

Patch

diff --git a/hw/a9mpcore.c b/hw/a9mpcore.c
index 6520c24..4523074 100644
--- a/hw/a9mpcore.c
+++ b/hw/a9mpcore.c
@@ -16,7 +16,6 @@  typedef struct A9MPPrivState {
     SysBusDevice busdev;
     uint32_t scu_control;
     uint32_t scu_status;
-    uint32_t old_timer_status[8];
     uint32_t num_cpu;
     MemoryRegion scu_iomem;
     MemoryRegion container;
@@ -112,11 +111,8 @@  static const MemoryRegionOps a9_scu_ops = {
 static void a9mp_priv_reset(DeviceState *dev)
 {
     A9MPPrivState *s = FROM_SYSBUS(A9MPPrivState, SYS_BUS_DEVICE(dev));
-    int i;
+
     s->scu_control = 0;
-    for (i = 0; i < ARRAY_SIZE(s->old_timer_status); i++) {
-        s->old_timer_status[i] = 0;
-    }
 }
 
 static void a9mp_priv_set_irq(void *opaque, int irq, int level)
@@ -198,11 +194,10 @@  static int a9mp_priv_init(SysBusDevice *dev)
 
 static const VMStateDescription vmstate_a9mp_priv = {
     .name = "a9mpcore_priv",
-    .version_id = 2,
-    .minimum_version_id = 1,
+    .version_id = 3,
+    .minimum_version_id = 2,
     .fields = (VMStateField[]) {
         VMSTATE_UINT32(scu_control, A9MPPrivState),
-        VMSTATE_UINT32_ARRAY(old_timer_status, A9MPPrivState, 8),
         VMSTATE_UINT32_V(scu_status, A9MPPrivState, 2),
         VMSTATE_END_OF_LIST()
     }