[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH for-8.0] hw/rtc/mc146818rtc: Make this rtc device target inde
From: |
Bernhard Beschow |
Subject: |
Re: [PATCH for-8.0] hw/rtc/mc146818rtc: Make this rtc device target independent |
Date: |
Sun, 11 Dec 2022 10:30:54 +0000 |
Am 9. Dezember 2022 09:00:56 UTC schrieb Thomas Huth <thuth@redhat.com>:
>On 07/12/2022 15.47, Bernhard Beschow wrote:
>>
>>
>> Am 6. Dezember 2022 20:06:41 UTC schrieb Thomas Huth <thuth@redhat.com>:
>>> The only code that is really, really target dependent is the apic-related
>>> code in rtc_policy_slew_deliver_irq(). By moving this code into the hw/i386/
>>> folder (renamed to rtc_apic_policy_slew_deliver_irq()) and passing this
>>> function as parameter to mc146818_rtc_init(), we can make the RTC completely
>>> target-independent.
>>>
>>> Signed-off-by: Thomas Huth <thuth@redhat.com>
>>> ---
>>> include/hw/rtc/mc146818rtc.h | 7 +++++--
>>> hw/alpha/dp264.c | 2 +-
>>> hw/hppa/machine.c | 2 +-
>>> hw/i386/microvm.c | 3 ++-
>>> hw/i386/pc.c | 10 +++++++++-
>>> hw/mips/jazz.c | 2 +-
>>> hw/ppc/pnv.c | 2 +-
>>> hw/rtc/mc146818rtc.c | 34 +++++++++++-----------------------
>>> hw/rtc/meson.build | 3 +--
>>> 9 files changed, 32 insertions(+), 33 deletions(-)
>>>
>>> diff --git a/include/hw/rtc/mc146818rtc.h b/include/hw/rtc/mc146818rtc.h
>>> index 1db0fcee92..c687953cc4 100644
>>> --- a/include/hw/rtc/mc146818rtc.h
>>> +++ b/include/hw/rtc/mc146818rtc.h
>>> @@ -46,14 +46,17 @@ struct RTCState {
>>> Notifier clock_reset_notifier;
>>> LostTickPolicy lost_tick_policy;
>>
>> This lost_tick_policy attribute along with its enum is now redundant and can
>> be removed. Removing it avoids an error condition (see below).
>
>lost_tick_policy is used for a property of the device which gets set from
>softmmu/rtc.c, so I would not say that it is unused ... or do I miss something?
Never mind. I was mislead by the switch statement but there are more policies.
Also, the enum is also used in the PIT.
Best regards,
Bernhard
>
> Thomas
>
- [PATCH for-8.0] hw/rtc/mc146818rtc: Make this rtc device target independent, Thomas Huth, 2022/12/06
- Re: [PATCH for-8.0] hw/rtc/mc146818rtc: Make this rtc device target independent, Philippe Mathieu-Daudé, 2022/12/06
- Re: [PATCH for-8.0] hw/rtc/mc146818rtc: Make this rtc device target independent, BALATON Zoltan, 2022/12/06
- Re: [PATCH for-8.0] hw/rtc/mc146818rtc: Make this rtc device target independent, Bernhard Beschow, 2022/12/06
- Re: [PATCH for-8.0] hw/rtc/mc146818rtc: Make this rtc device target independent, Bernhard Beschow, 2022/12/07
- Re: [PATCH for-8.0] hw/rtc/mc146818rtc: Make this rtc device target independent, Bernhard Beschow, 2022/12/07
- Re: [PATCH for-8.0] hw/rtc/mc146818rtc: Make this rtc device target independent, Mark Cave-Ayland, 2022/12/07
- Re: [PATCH for-8.0] hw/rtc/mc146818rtc: Make this rtc device target independent, Thomas Huth, 2022/12/09