Skip to content

mc146818rtc related clean-ups and improvements

Thomas Huth qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 12 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6hw/i386/pc: Create RTC controllers in south bridgeshw/i386/pc.c hw/i386/pc_piix.c hw/i386/pc_q35.c +5 more+50 -10 replies
2/6hw/i386/pc: No need for rtc_state to be an out-parameterhw/i386/pc.c hw/i386/pc_piix.c hw/i386/pc_q35.c +1 more+9 -91 reply
3/6hw/intc: Extract the IRQ counting functions into a separate filehw/i386/kvm/i8259.c hw/i386/kvm/ioapic.c hw/intc/apic.c +8 more+81 -431 reply
4/6hw/rtc/mc146818rtc: Add a property for the availability of the slew tick policyhw/i386/pc_piix.c hw/isa/lpc_ich9.c hw/isa/piix3.c +2 more+14 -68 replies
5/6hw/rtc/mc146818rtc: Make the mc146818 RTC device target independenthw/rtc/mc146818rtc.c hw/rtc/meson.build include/hw/rtc/mc146818rtc.h+3 -161 reply
6/6softmmu/rtc: Emit warning when using driftfix=slew on systems without mc146818softmmu/rtc.c+5 -11 reply

Reviews trailers per patch

All 6 patches have a Reviewed-by or Acked-by.

PatchPeter MaydellMichael S. TsirkinBernhard BeschowPhilippe Mathieu-Daudé
1/6R-b
2/6R-b R-b R-b
3/6R-b
4/6R-b
5/6R-b
6/6R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.

Read the v1 thread

Cover letter [PATCH 0/6] mc146818rtc related clean-ups and improvements

This patch series is a follow-up of my previous patch
"[PATCH v4] hw/rtc/mc146818rtc: Make this rtc device target independent". It has now been split into multiple patches to ease the review, and some further patches have been added on top.

The basic idea is to change hw/rtc/mc146818rtc.c into target independent code so that the file only has to be compiled once instead of multiple times (and that it can be used in a qemu-system-all binary once we get there).

First two patches are from Bernhard - clean-ups that will help to make it easier to introduce a new "slew-tick-policy-available" property later.

The third patch extracts some functions from the APIC code that will be required for linking when the mc146818rtc becomes target-independent.

The fourth patch introduces the new "slew-tick-policy-available" property that can be used to decide whether the slew-tick policy is available or not once the "#ifdef TARGET..." stuff got removed.

The fifth patch then removes the "#ifdef TARGET" switches and turns the mc146818rtc code into a target-independent file.

The sixth patch just fixes a small cosmetic nit that I discovered along the way: On systems without mc146818, the "-rtc driftfix=slew" simply got ignored silently. We should at least emit a warning in this case.

Bernhard Beschow (2):
hw/i386/pc: Create RTC controllers in south bridges hw/i386/pc: No need for rtc_state to be an out-parameter

Thomas Huth (4):
hw/intc: Extract the IRQ counting functions into a separate file hw/rtc/mc146818rtc: Add a property for the availability of the slew
tick policy
hw/rtc/mc146818rtc: Make the mc146818 RTC device target independent softmmu/rtc: Emit warning when using driftfix=slew on systems without

    mc146818
 include/hw/i386/apic.h          |  2 --
 include/hw/i386/apic_internal.h |  1 -
 include/hw/i386/ich9.h          |  2 ++
 include/hw/i386/pc.h            |  2 +-
 include/hw/intc/kvm_irqcount.h  | 10 +++++++
 include/hw/rtc/mc146818rtc.h    |  2 ++
 include/hw/southbridge/piix.h   |  3 ++
 hw/i386/kvm/i8259.c             |  4 +--
 hw/i386/kvm/ioapic.c            |  4 +--
 hw/i386/pc.c                    | 16 +++++++++--
 hw/i386/pc_piix.c               | 11 +++++++-
 hw/i386/pc_q35.c                |  3 +-
 hw/intc/apic.c                  |  3 +-
 hw/intc/apic_common.c           | 30 ++------------------
 hw/intc/kvm_irqcount.c          | 49 +++++++++++++++++++++++++++++++++
 hw/isa/lpc_ich9.c               |  9 ++++++
 hw/isa/piix3.c                  | 16 +++++++++++
 hw/rtc/mc146818rtc.c            | 33 ++++++++--------------
 softmmu/rtc.c                   |  6 +++-
 hw/intc/meson.build             |  6 ++++
 hw/intc/trace-events            |  9 +++---
 hw/isa/Kconfig                  |  2 ++
 hw/rtc/meson.build              |  3 +-
 23 files changed, 156 insertions(+), 70 deletions(-)
 create mode 100644 include/hw/intc/kvm_irqcount.h
 create mode 100644 hw/intc/kvm_irqcount.c
Signature · 1 line
2.31.1