[PATCH v2 00/14] hw: Split RTC devices from hw/timer/ to hw/rtc/

Philippe Mathieu-Daudé posted 14 patches 4 years, 6 months ago
Test checkpatch passed
Test docker-mingw@fedora passed
Test docker-quick@centos7 passed
Test docker-clang@ubuntu failed
Test asan passed
Test FreeBSD passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20191003230404.19384-1-philmd@redhat.com
Maintainers: Aleksandar Markovic <amarkovic@wavecomp.com>, Aurelien Jarno <aurelien@aurel32.net>, Joel Stanley <joel@jms.id.au>, Andrew Jeffery <andrew@aj.id.au>, Thomas Huth <thuth@redhat.com>, "Cédric Le Goater" <clg@kaod.org>, "Hervé Poussineau" <hpoussin@reactos.org>, David Gibson <david@gibson.dropbear.id.au>, Laurent Vivier <lvivier@redhat.com>, Eduardo Habkost <ehabkost@redhat.com>, "Michael S. Tsirkin" <mst@redhat.com>, Richard Henderson <rth@twiddle.net>, Peter Maydell <peter.maydell@linaro.org>, Igor Mammedov <imammedo@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>, Artyom Tarasenko <atar4qemu@gmail.com>, "Edgar E. Iglesias" <edgar.iglesias@gmail.com>, Aleksandar Rikalo <arikalo@wavecomp.com>, Alistair Francis <alistair@alistair23.me>, Helge Deller <deller@gmx.de>, Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
MAINTAINERS                                  | 20 +++----
Makefile.objs                                |  1 +
hw/Kconfig                                   |  1 +
hw/Makefile.objs                             |  1 +
hw/alpha/dp264.c                             |  2 +-
hw/arm/musca.c                               |  2 +-
hw/hppa/machine.c                            |  2 +-
hw/i386/acpi-build.c                         |  2 +-
hw/i386/pc.c                                 |  2 +-
hw/i386/pc_q35.c                             |  2 +-
hw/mips/mips_fulong2e.c                      |  2 +-
hw/mips/mips_jazz.c                          |  2 +-
hw/mips/mips_malta.c                         |  2 +-
hw/mips/mips_r4k.c                           |  2 +-
hw/ppc/pnv.c                                 |  2 +-
hw/ppc/ppc405_boards.c                       |  2 +-
hw/ppc/prep.c                                |  4 +-
hw/rtc/Kconfig                               | 23 ++++++++
hw/rtc/Makefile.objs                         | 13 +++++
hw/{timer => rtc}/aspeed_rtc.c               |  2 +-
hw/{timer => rtc}/ds1338.c                   |  0
hw/{timer => rtc}/exynos4210_rtc.c           |  0
hw/{timer => rtc}/m41t80.c                   |  0
hw/{timer => rtc}/m48t59-internal.h          |  0
hw/{timer => rtc}/m48t59-isa.c               |  4 +-
hw/{timer => rtc}/m48t59.c                   |  2 +-
hw/{timer => rtc}/mc146818rtc.c              |  3 +-
hw/{timer => rtc}/pl031.c                    |  2 +-
hw/{timer => rtc}/sun4v-rtc.c                |  2 +-
hw/rtc/trace-events                          | 19 +++++++
hw/{timer => rtc}/twl92230.c                 |  0
hw/{timer => rtc}/xlnx-zynqmp-rtc.c          |  3 +-
hw/sparc/sun4m.c                             |  2 +-
hw/sparc64/niagara.c                         |  2 +-
hw/sparc64/sun4u.c                           |  2 +-
hw/timer/Kconfig                             | 24 ---------
hw/timer/Makefile.objs                       | 35 ++++--------
hw/timer/hpet.c                              |  3 +-
hw/timer/trace-events                        | 18 -------
include/hw/arm/aspeed_soc.h                  |  2 +-
include/hw/arm/xlnx-zynqmp.h                 |  2 +-
include/hw/{timer => rtc}/aspeed_rtc.h       |  9 ++--
include/hw/rtc/m48t59.h                      | 57 ++++++++++++++++++++
include/hw/{timer => rtc}/mc146818rtc.h      | 13 +++--
include/hw/{timer => rtc}/mc146818rtc_regs.h |  5 +-
include/hw/{timer => rtc}/pl031.h            |  5 +-
include/hw/rtc/sun4v-rtc.h                   | 19 +++++++
include/hw/{timer => rtc}/xlnx-zynqmp-rtc.h  |  6 +--
include/hw/timer/m48t59.h                    | 32 -----------
include/hw/timer/sun4v-rtc.h                 |  1 -
tests/rtc-test.c                             |  2 +-
51 files changed, 208 insertions(+), 155 deletions(-)
create mode 100644 hw/rtc/Kconfig
create mode 100644 hw/rtc/Makefile.objs
rename hw/{timer => rtc}/aspeed_rtc.c (99%)
rename hw/{timer => rtc}/ds1338.c (100%)
rename hw/{timer => rtc}/exynos4210_rtc.c (100%)
rename hw/{timer => rtc}/m41t80.c (100%)
rename hw/{timer => rtc}/m48t59-internal.h (100%)
rename hw/{timer => rtc}/m48t59-isa.c (98%)
rename hw/{timer => rtc}/m48t59.c (99%)
rename hw/{timer => rtc}/mc146818rtc.c (99%)
rename hw/{timer => rtc}/pl031.c (99%)
rename hw/{timer => rtc}/sun4v-rtc.c (98%)
create mode 100644 hw/rtc/trace-events
rename hw/{timer => rtc}/twl92230.c (100%)
rename hw/{timer => rtc}/xlnx-zynqmp-rtc.c (99%)
rename include/hw/{timer => rtc}/aspeed_rtc.h (80%)
create mode 100644 include/hw/rtc/m48t59.h
rename include/hw/{timer => rtc}/mc146818rtc.h (63%)
rename include/hw/{timer => rtc}/mc146818rtc_regs.h (96%)
rename include/hw/{timer => rtc}/pl031.h (93%)
create mode 100644 include/hw/rtc/sun4v-rtc.h
rename include/hw/{timer => rtc}/xlnx-zynqmp-rtc.h (95%)
delete mode 100644 include/hw/timer/m48t59.h
delete mode 100644 include/hw/timer/sun4v-rtc.h
[PATCH v2 00/14] hw: Split RTC devices from hw/timer/ to hw/rtc/
Posted by Philippe Mathieu-Daudé 4 years, 6 months ago
Since v1: https://lists.gnu.org/archive/html/qemu-devel/2019-09/msg03334.html
- addressed review comments (described in patches 3 and 4)
- added R-b/A-b tags

Whole series now reviewed.

v1 blurb:

When working on timers, I found it confuse to have RTC devices
mixed in the hw/timer/ directory.

We can see the models use slighly different APIs:

  $ git grep '#include' hw/timer/|cut -d: -f3-|sort|uniq -c|egrep -v '^      1 '|sort -rn
     33 #include "qemu/osdep.h"
     29 #include "hw/irq.h"
     28 #include "qemu/module.h"
     23 #include "migration/vmstate.h"
     21 #include "hw/sysbus.h"
     20 #include "qemu/timer.h"
     20 #include "qemu/main-loop.h"
     17 #include "qemu/log.h"
     14 #include "hw/qdev-properties.h"
     14 #include "hw/ptimer.h"
      9 #include "trace.h"
      7 #include "qapi/error.h"
      5 #include "hw/hw.h"
      3 #include "sysemu/runstate.h"
      3 #include "qemu/error-report.h"
      3 #include "hw/timer/i8254.h"
      2 #include "qemu/bitops.h"
      2 #include "hw/timer/i8254_internal.h"
      2 #include "hw/registerfields.h"
      2 #include "hw/core/cpu.h"
      2 #include "hw/arm/omap.h"
      2 #include "hw/arm/exynos4210.h"

  $ git grep '#include' hw/rtc/|cut -d: -f3-|sort|uniq -c|egrep -v '^      1 '|sort -rn
     11 #include "qemu/osdep.h"
     10 #include "qemu/module.h"
      9 #include "qemu-common.h"
      8 #include "qemu/timer.h"
      8 #include "migration/vmstate.h"
      6 #include "qemu/bcd.h"
      6 #include "hw/irq.h"
      5 #include "sysemu/sysemu.h"
      5 #include "qemu/log.h"
      5 #include "hw/sysbus.h"
      4 #include "trace.h"
      4 #include "hw/qdev-properties.h"
      3 #include "qemu/cutils.h"
      3 #include "hw/i2c/i2c.h"
      2 #include "sysemu/runstate.h"
      2 #include "m48t59-internal.h"
      2 #include "hw/rtc/m48t59.h"
      2 #include "exec/address-spaces.h"

Split the RTC-related files in the new hw/rtc/ directory.

Philippe Mathieu-Daudé (14):
  hw/timer: Compile devices not target-dependent as common object
  hw: Move PL031 device from hw/timer/ to hw/rtc/ subdirectory
  hw: Move MC146818 device from hw/timer/ to hw/rtc/ subdirectory
  hw: Move M48T59 device from hw/timer/ to hw/rtc/ subdirectory
  hw: Move M41T80 device from hw/timer/ to hw/rtc/ subdirectory
  hw: Move sun4v hypervisor RTC from hw/timer/ to hw/rtc/ subdirectory
  hw: Move TWL92230 device from hw/timer/ to hw/rtc/ subdirectory
  hw: Move DS1338 device from hw/timer/ to hw/rtc/ subdirectory
  hw: Move Xilinx ZynqMP RTC from hw/timer/ to hw/rtc/ subdirectory
  hw: Move Exynos4210 RTC from hw/timer/ to hw/rtc/ subdirectory
  hw: Move Aspeed RTC from hw/timer/ to hw/rtc/ subdirectory
  hw/rtc/mc146818: Include mc146818rtc_regs.h a bit less
  hw/rtc/xlnx-zynqmp-rtc: Remove unused "ptimer.h" include
  hw/rtc/aspeed_rtc: Remove unused includes

 MAINTAINERS                                  | 20 +++----
 Makefile.objs                                |  1 +
 hw/Kconfig                                   |  1 +
 hw/Makefile.objs                             |  1 +
 hw/alpha/dp264.c                             |  2 +-
 hw/arm/musca.c                               |  2 +-
 hw/hppa/machine.c                            |  2 +-
 hw/i386/acpi-build.c                         |  2 +-
 hw/i386/pc.c                                 |  2 +-
 hw/i386/pc_q35.c                             |  2 +-
 hw/mips/mips_fulong2e.c                      |  2 +-
 hw/mips/mips_jazz.c                          |  2 +-
 hw/mips/mips_malta.c                         |  2 +-
 hw/mips/mips_r4k.c                           |  2 +-
 hw/ppc/pnv.c                                 |  2 +-
 hw/ppc/ppc405_boards.c                       |  2 +-
 hw/ppc/prep.c                                |  4 +-
 hw/rtc/Kconfig                               | 23 ++++++++
 hw/rtc/Makefile.objs                         | 13 +++++
 hw/{timer => rtc}/aspeed_rtc.c               |  2 +-
 hw/{timer => rtc}/ds1338.c                   |  0
 hw/{timer => rtc}/exynos4210_rtc.c           |  0
 hw/{timer => rtc}/m41t80.c                   |  0
 hw/{timer => rtc}/m48t59-internal.h          |  0
 hw/{timer => rtc}/m48t59-isa.c               |  4 +-
 hw/{timer => rtc}/m48t59.c                   |  2 +-
 hw/{timer => rtc}/mc146818rtc.c              |  3 +-
 hw/{timer => rtc}/pl031.c                    |  2 +-
 hw/{timer => rtc}/sun4v-rtc.c                |  2 +-
 hw/rtc/trace-events                          | 19 +++++++
 hw/{timer => rtc}/twl92230.c                 |  0
 hw/{timer => rtc}/xlnx-zynqmp-rtc.c          |  3 +-
 hw/sparc/sun4m.c                             |  2 +-
 hw/sparc64/niagara.c                         |  2 +-
 hw/sparc64/sun4u.c                           |  2 +-
 hw/timer/Kconfig                             | 24 ---------
 hw/timer/Makefile.objs                       | 35 ++++--------
 hw/timer/hpet.c                              |  3 +-
 hw/timer/trace-events                        | 18 -------
 include/hw/arm/aspeed_soc.h                  |  2 +-
 include/hw/arm/xlnx-zynqmp.h                 |  2 +-
 include/hw/{timer => rtc}/aspeed_rtc.h       |  9 ++--
 include/hw/rtc/m48t59.h                      | 57 ++++++++++++++++++++
 include/hw/{timer => rtc}/mc146818rtc.h      | 13 +++--
 include/hw/{timer => rtc}/mc146818rtc_regs.h |  5 +-
 include/hw/{timer => rtc}/pl031.h            |  5 +-
 include/hw/rtc/sun4v-rtc.h                   | 19 +++++++
 include/hw/{timer => rtc}/xlnx-zynqmp-rtc.h  |  6 +--
 include/hw/timer/m48t59.h                    | 32 -----------
 include/hw/timer/sun4v-rtc.h                 |  1 -
 tests/rtc-test.c                             |  2 +-
 51 files changed, 208 insertions(+), 155 deletions(-)
 create mode 100644 hw/rtc/Kconfig
 create mode 100644 hw/rtc/Makefile.objs
 rename hw/{timer => rtc}/aspeed_rtc.c (99%)
 rename hw/{timer => rtc}/ds1338.c (100%)
 rename hw/{timer => rtc}/exynos4210_rtc.c (100%)
 rename hw/{timer => rtc}/m41t80.c (100%)
 rename hw/{timer => rtc}/m48t59-internal.h (100%)
 rename hw/{timer => rtc}/m48t59-isa.c (98%)
 rename hw/{timer => rtc}/m48t59.c (99%)
 rename hw/{timer => rtc}/mc146818rtc.c (99%)
 rename hw/{timer => rtc}/pl031.c (99%)
 rename hw/{timer => rtc}/sun4v-rtc.c (98%)
 create mode 100644 hw/rtc/trace-events
 rename hw/{timer => rtc}/twl92230.c (100%)
 rename hw/{timer => rtc}/xlnx-zynqmp-rtc.c (99%)
 rename include/hw/{timer => rtc}/aspeed_rtc.h (80%)
 create mode 100644 include/hw/rtc/m48t59.h
 rename include/hw/{timer => rtc}/mc146818rtc.h (63%)
 rename include/hw/{timer => rtc}/mc146818rtc_regs.h (96%)
 rename include/hw/{timer => rtc}/pl031.h (93%)
 create mode 100644 include/hw/rtc/sun4v-rtc.h
 rename include/hw/{timer => rtc}/xlnx-zynqmp-rtc.h (95%)
 delete mode 100644 include/hw/timer/m48t59.h
 delete mode 100644 include/hw/timer/sun4v-rtc.h

-- 
2.20.1


Re: [PATCH v2 00/14] hw: Split RTC devices from hw/timer/ to hw/rtc/
Posted by Peter Maydell 4 years, 6 months ago
On Fri, 4 Oct 2019 at 00:04, Philippe Mathieu-Daudé <philmd@redhat.com> wrote:
>
> Since v1: https://lists.gnu.org/archive/html/qemu-devel/2019-09/msg03334.html
> - addressed review comments (described in patches 3 and 4)
> - added R-b/A-b tags
>
> Whole series now reviewed.

for the arm parts:
Acked-by: Peter Maydell <peter.maydell@linaro.org>

-- PMM

Re: [PATCH v2 00/14] hw: Split RTC devices from hw/timer/ to hw/rtc/
Posted by Laurent Vivier 4 years, 6 months ago
On 24/10/2019 17:51, Peter Maydell wrote:
> On Fri, 4 Oct 2019 at 00:04, Philippe Mathieu-Daudé <philmd@redhat.com> wrote:
>>
>> Since v1: https://lists.gnu.org/archive/html/qemu-devel/2019-09/msg03334.html
>> - addressed review comments (described in patches 3 and 4)
>> - added R-b/A-b tags
>>
>> Whole series now reviewed.
> 
> for the arm parts:
> Acked-by: Peter Maydell <peter.maydell@linaro.org>
> 

I'm going to queue this series in qemu-trivial queue, so I guess your
Acked-by is for patches 2, 10 and 11?

Thanks,
Laurent


Re: [PATCH v2 00/14] hw: Split RTC devices from hw/timer/ to hw/rtc/
Posted by Philippe Mathieu-Daudé 4 years, 6 months ago
On 10/24/19 7:36 PM, Laurent Vivier wrote:
> On 24/10/2019 17:51, Peter Maydell wrote:
>> On Fri, 4 Oct 2019 at 00:04, Philippe Mathieu-Daudé <philmd@redhat.com> wrote:
>>>
>>> Since v1: https://lists.gnu.org/archive/html/qemu-devel/2019-09/msg03334.html
>>> - addressed review comments (described in patches 3 and 4)
>>> - added R-b/A-b tags
>>>
>>> Whole series now reviewed.
>>
>> for the arm parts:
>> Acked-by: Peter Maydell <peter.maydell@linaro.org>
>>
> 
> I'm going to queue this series in qemu-trivial queue, so I guess your
> Acked-by is for patches 2, 10 and 11?

ARM: 2, 7-11, 13-14:

   hw: Move PL031 device from hw/timer/ to hw/rtc/ subdirectory
   hw: Move TWL92230 device from hw/timer/ to hw/rtc/ subdirectory
   hw: Move DS1338 device from hw/timer/ to hw/rtc/ subdirectory
   hw: Move Xilinx ZynqMP RTC from hw/timer/ to hw/rtc/ subdirectory
   hw: Move Exynos4210 RTC from hw/timer/ to hw/rtc/ subdirectory
   hw: Move Aspeed RTC from hw/timer/ to hw/rtc/ subdirectory
   hw/rtc/xlnx-zynqmp-rtc: Remove unused "ptimer.h" include
   hw/rtc/aspeed_rtc: Remove unused includes

PPC: 3-5

   hw: Move MC146818 device from hw/timer/ to hw/rtc/ subdirectory
   hw: Move M48T59 device from hw/timer/ to hw/rtc/ subdirectory
   hw: Move M41T80 device from hw/timer/ to hw/rtc/ subdirectory

SPARC: 6

   hw: Move sun4v hypervisor RTC from hw/timer/ to hw/rtc/ subdirectory