qemu-devel
[Top][All Lists]
Advanced

[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: Thomas Huth
Subject: Re: [PATCH for-8.0] hw/rtc/mc146818rtc: Make this rtc device target independent
Date: Fri, 9 Dec 2022 10:00:56 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.13.0

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?

 Thomas




reply via email to

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