qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v1 4/6] arm: mptimer: Remove WDT distinction


From: Peter Crosthwaite
Subject: Re: [Qemu-devel] [PATCH v1 4/6] arm: mptimer: Remove WDT distinction
Date: Wed, 20 Feb 2013 10:24:22 +1000

On Tue, Feb 19, 2013 at 4:37 AM, Peter Maydell <address@hidden> wrote:
> On 8 February 2013 04:03, Peter Crosthwaite
> <address@hidden> wrote:
>> In QEMU emulation, there is no functional difference between the ARM mpcore
>> private timers and watchdogs. Removed all the distinction between the two 
>> from
>> arm_mptimer.c and converted it to be just the mptimer. a9mpcore and 
>> arm11mpcore
>> just instantiate the same mptimer object twice to get both timer and WDT.
>>
>> If in the future we want to make the WDT functionally different then we can 
>> use
>> either QOM heirachy to derive WDT from from mptimer, or we can add a property
>
> "hierarchy".
>

Fixed.

>> "is-wdt" or some such.
>>
>> Signed-off-by: Peter Crosthwaite <address@hidden>
>
> I was sceptical about this change initially but you're right that it's much
> cleaner this way.
>
> One minor nit:
>
>>  static const VMStateDescription vmstate_arm_mptimer = {
>>      .name = "arm_mptimer",
>> -    .version_id = 1,
>> -    .minimum_version_id = 1,
>> +    .version_id = 2,
>> +    .minimum_version_id = 2,
>>      .fields = (VMStateField[]) {
>> -        VMSTATE_STRUCT_ARRAY(timerblock, ARMMPTimerState, (MAX_CPUS * 2),
>> -                             1, vmstate_timerblock, TimerBlock),
>> +        VMSTATE_STRUCT_VARRAY_UINT32(timerblock, ARMMPTimerState, num_cpu,
>> +                                     2, vmstate_timerblock, TimerBlock),
>>          VMSTATE_END_OF_LIST()
>>      }
>
> This changes us from sending every timerblock to only the ones
> that actually exist on this machine config, which renders the
> comment in arm_mptimer_reset() irrelevant, so it should be deleted.
>

Fixed.

Regards,
Peter

> -- PMM
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]