From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Thomas Huth <thuth@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>,
qemu-devel@nongnu.org, Bernhard Beschow <shentey@gmail.com>,
Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Cc: Michael S Tsirkin <mst@redhat.com>, BALATON Zoltan <balaton@eik.bme.hu>
Subject: Re: [PATCH v2 for-8.0] hw/rtc/mc146818rtc: Make this rtc device target independent
Date: Fri, 9 Dec 2022 15:26:17 +0100 [thread overview]
Message-ID: <5c7889c9-2bd4-0f82-cbc5-f9e172743e44@linaro.org> (raw)
In-Reply-To: <20221209111556.110757-1-thuth@redhat.com>
On 9/12/22 12:15, Thomas Huth wrote:
> The only reason for this code being target dependent is the apic-related
> code in rtc_policy_slew_deliver_irq(). Since these apic functions are rather
> simple, we can easily move them into a new, separate file (apic_irqcount.c)
> which will always be compiled and linked if either APIC or the mc146818 device
> are required. This way we can get rid of the #ifdef TARGET_I386 switches in
> mc146818rtc.c and declare it in the softmmu_ss instead of specific_ss, so
> that the code only gets compiled once for all targets.
>
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
> v2: Move the apic functions into a separate file instead of using
> an ugly function pointer
>
> include/hw/i386/apic.h | 1 +
> include/hw/i386/apic_internal.h | 1 -
> include/hw/rtc/mc146818rtc.h | 1 +
> hw/intc/apic_common.c | 27 -----------------
> hw/intc/apic_irqcount.c | 53 +++++++++++++++++++++++++++++++++
> hw/rtc/mc146818rtc.c | 25 +++++-----------
> hw/intc/meson.build | 6 +++-
> hw/rtc/meson.build | 3 +-
> 8 files changed, 68 insertions(+), 49 deletions(-)
> create mode 100644 hw/intc/apic_irqcount.c
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
next prev parent reply other threads:[~2022-12-09 14:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-09 11:15 [PATCH v2 for-8.0] hw/rtc/mc146818rtc: Make this rtc device target independent Thomas Huth
2022-12-09 14:26 ` Philippe Mathieu-Daudé [this message]
2022-12-10 13:48 ` Mark Cave-Ayland
2022-12-12 0:48 ` Bernhard Beschow
2022-12-12 7:51 ` Thomas Huth
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=5c7889c9-2bd4-0f82-cbc5-f9e172743e44@linaro.org \
--to=philmd@linaro.org \
--cc=balaton@eik.bme.hu \
--cc=mark.cave-ayland@ilande.co.uk \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=shentey@gmail.com \
--cc=thuth@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).