From: Laurent Vivier <laurent@vivier.eu>
To: "Philippe Mathieu-Daudé" <philmd@redhat.com>, qemu-devel@nongnu.org
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
"Michael S. Tsirkin" <mst@redhat.com>,
"Mark Cave-Ayland" <mark.cave-ayland@ilande.co.uk>,
"Alistair Francis" <alistair.francis@wdc.com>,
"Edgar E. Iglesias" <edgar.iglesias@gmail.com>,
qemu-trivial@nongnu.org, "Helge Deller" <deller@gmx.de>,
"Hervé Poussineau" <hpoussin@reactos.org>,
"Joel Stanley" <joel@jms.id.au>,
"Richard Henderson" <rth@twiddle.net>,
"Artyom Tarasenko" <atar4qemu@gmail.com>,
"Laurent Vivier" <lvivier@redhat.com>,
"Thomas Huth" <thuth@redhat.com>,
"Eduardo Habkost" <ehabkost@redhat.com>,
"Alistair Francis" <alistair@alistair23.me>,
qemu-arm@nongnu.org, "Cédric Le Goater" <clg@kaod.org>,
"Igor Mammedov" <imammedo@redhat.com>,
"David Gibson" <david@gibson.dropbear.id.au>,
"Andrew Jeffery" <andrew@aj.id.au>,
"Aleksandar Rikalo" <arikalo@wavecomp.com>,
qemu-ppc@nongnu.org,
"Aleksandar Markovic" <amarkovic@wavecomp.com>,
"Paolo Bonzini" <pbonzini@redhat.com>
Subject: Re: [PATCH v2 03/14] hw: Move MC146818 device from hw/timer/ to hw/rtc/ subdirectory
Date: Thu, 24 Oct 2019 20:14:03 +0200 [thread overview]
Message-ID: <c24b0edf-9364-d6eb-6433-854d937320bc@vivier.eu> (raw)
In-Reply-To: <20191003230404.19384-4-philmd@redhat.com>
Le 04/10/2019 à 01:03, Philippe Mathieu-Daudé a écrit :
> The MC146818 is a Real Time Clock, not a timer.
> Move it under the hw/rtc/ subdirectory.
>
> Use copyright statement from 80cabfad163 for "hw/rtc/mc146818rtc.h".
>
> Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
> Acked-by: David Gibson <david@gibson.dropbear.id.au>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
> v2: Use SPDX identifier (thuth)
> ---
> MAINTAINERS | 4 ++--
> hw/alpha/dp264.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/prep.c | 2 +-
> hw/rtc/Kconfig | 3 +++
> hw/rtc/Makefile.objs | 1 +
> hw/{timer => rtc}/mc146818rtc.c | 2 +-
> hw/timer/Kconfig | 3 ---
> hw/timer/Makefile.objs | 2 --
> hw/timer/hpet.c | 2 +-
> include/hw/{timer => rtc}/mc146818rtc.h | 14 +++++++++++---
> include/hw/{timer => rtc}/mc146818rtc_regs.h | 5 +++--
> tests/rtc-test.c | 2 +-
> 21 files changed, 34 insertions(+), 26 deletions(-)
> rename hw/{timer => rtc}/mc146818rtc.c (99%)
> rename include/hw/{timer => rtc}/mc146818rtc.h (58%)
> rename include/hw/{timer => rtc}/mc146818rtc_regs.h (96%)
>
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 92d27f1206..e3255cdbf2 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -1263,7 +1263,7 @@ F: hw/misc/debugexit.c
> F: hw/misc/pc-testdev.c
> F: hw/timer/hpet*
> F: hw/timer/i8254*
> -F: hw/timer/mc146818rtc*
> +F: hw/rtc/mc146818rtc*
> F: hw/watchdog/wdt_ib700.c
> F: hw/watchdog/wdt_i6300esb.c
> F: include/hw/display/vga.h
> @@ -1275,7 +1275,7 @@ F: include/hw/isa/i8259_internal.h
> F: include/hw/isa/superio.h
> F: include/hw/timer/hpet.h
> F: include/hw/timer/i8254*
> -F: include/hw/timer/mc146818rtc*
> +F: include/hw/rtc/mc146818rtc*
>
> Machine core
> M: Eduardo Habkost <ehabkost@redhat.com>
> diff --git a/hw/alpha/dp264.c b/hw/alpha/dp264.c
> index 51feee8558..51b3cf7a61 100644
> --- a/hw/alpha/dp264.c
> +++ b/hw/alpha/dp264.c
> @@ -14,7 +14,7 @@
> #include "alpha_sys.h"
> #include "qemu/error-report.h"
> #include "sysemu/sysemu.h"
> -#include "hw/timer/mc146818rtc.h"
> +#include "hw/rtc/mc146818rtc.h"
> #include "hw/ide.h"
> #include "hw/timer/i8254.h"
> #include "hw/isa/superio.h"
> diff --git a/hw/hppa/machine.c b/hw/hppa/machine.c
> index 2736ce835e..6598e2469d 100644
> --- a/hw/hppa/machine.c
> +++ b/hw/hppa/machine.c
> @@ -12,7 +12,7 @@
> #include "qemu/error-report.h"
> #include "sysemu/reset.h"
> #include "sysemu/sysemu.h"
> -#include "hw/timer/mc146818rtc.h"
> +#include "hw/rtc/mc146818rtc.h"
> #include "hw/ide.h"
> #include "hw/timer/i8254.h"
> #include "hw/char/serial.h"
> diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
> index 4e0f9f425a..fb53e0b691 100644
> --- a/hw/i386/acpi-build.c
> +++ b/hw/i386/acpi-build.c
> @@ -45,7 +45,7 @@
> #include "hw/acpi/vmgenid.h"
> #include "hw/boards.h"
> #include "sysemu/tpm_backend.h"
> -#include "hw/timer/mc146818rtc_regs.h"
> +#include "hw/rtc/mc146818rtc_regs.h"
> #include "migration/vmstate.h"
> #include "hw/mem/memory-device.h"
> #include "sysemu/numa.h"
> diff --git a/hw/i386/pc.c b/hw/i386/pc.c
> index bcda50efcc..061cdb77f8 100644
> --- a/hw/i386/pc.c
> +++ b/hw/i386/pc.c
> @@ -42,7 +42,7 @@
> #include "elf.h"
> #include "migration/vmstate.h"
> #include "multiboot.h"
> -#include "hw/timer/mc146818rtc.h"
> +#include "hw/rtc/mc146818rtc.h"
> #include "hw/dma/i8257.h"
> #include "hw/timer/i8254.h"
> #include "hw/input/i8042.h"
> diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
> index 8fad20f314..748fc2ee15 100644
> --- a/hw/i386/pc_q35.c
> +++ b/hw/i386/pc_q35.c
> @@ -33,7 +33,7 @@
> #include "hw/loader.h"
> #include "sysemu/arch_init.h"
> #include "hw/i2c/smbus_eeprom.h"
> -#include "hw/timer/mc146818rtc.h"
> +#include "hw/rtc/mc146818rtc.h"
> #include "hw/xen/xen.h"
> #include "sysemu/kvm.h"
> #include "kvm_i386.h"
> diff --git a/hw/mips/mips_fulong2e.c b/hw/mips/mips_fulong2e.c
> index cf537dd7e6..03a27e1767 100644
> --- a/hw/mips/mips_fulong2e.c
> +++ b/hw/mips/mips_fulong2e.c
> @@ -39,7 +39,7 @@
> #include "hw/ide.h"
> #include "elf.h"
> #include "hw/isa/vt82c686.h"
> -#include "hw/timer/mc146818rtc.h"
> +#include "hw/rtc/mc146818rtc.h"
> #include "hw/timer/i8254.h"
> #include "exec/address-spaces.h"
> #include "sysemu/qtest.h"
> diff --git a/hw/mips/mips_jazz.c b/hw/mips/mips_jazz.c
> index c967b97d80..2811a4bd90 100644
> --- a/hw/mips/mips_jazz.c
> +++ b/hw/mips/mips_jazz.c
> @@ -39,7 +39,7 @@
> #include "hw/scsi/esp.h"
> #include "hw/mips/bios.h"
> #include "hw/loader.h"
> -#include "hw/timer/mc146818rtc.h"
> +#include "hw/rtc/mc146818rtc.h"
> #include "hw/timer/i8254.h"
> #include "hw/display/vga.h"
> #include "hw/audio/pcspk.h"
> diff --git a/hw/mips/mips_malta.c b/hw/mips/mips_malta.c
> index 4d9c64b36a..c1c8810e71 100644
> --- a/hw/mips/mips_malta.c
> +++ b/hw/mips/mips_malta.c
> @@ -45,7 +45,7 @@
> #include "hw/irq.h"
> #include "hw/loader.h"
> #include "elf.h"
> -#include "hw/timer/mc146818rtc.h"
> +#include "hw/rtc/mc146818rtc.h"
> #include "hw/timer/i8254.h"
> #include "exec/address-spaces.h"
> #include "hw/sysbus.h" /* SysBusDevice */
> diff --git a/hw/mips/mips_r4k.c b/hw/mips/mips_r4k.c
> index bc0be26544..70024235ae 100644
> --- a/hw/mips/mips_r4k.c
> +++ b/hw/mips/mips_r4k.c
> @@ -28,7 +28,7 @@
> #include "hw/ide.h"
> #include "hw/loader.h"
> #include "elf.h"
> -#include "hw/timer/mc146818rtc.h"
> +#include "hw/rtc/mc146818rtc.h"
> #include "hw/input/i8042.h"
> #include "hw/timer/i8254.h"
> #include "exec/address-spaces.h"
> diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c
> index 3f08db7b9e..4b2649d95b 100644
> --- a/hw/ppc/pnv.c
> +++ b/hw/ppc/pnv.c
> @@ -48,7 +48,7 @@
> #include "hw/isa/isa.h"
> #include "hw/boards.h"
> #include "hw/char/serial.h"
> -#include "hw/timer/mc146818rtc.h"
> +#include "hw/rtc/mc146818rtc.h"
>
> #include <libfdt.h>
>
> diff --git a/hw/ppc/prep.c b/hw/ppc/prep.c
> index 4f3c6bf190..3a51536e1a 100644
> --- a/hw/ppc/prep.c
> +++ b/hw/ppc/prep.c
> @@ -40,7 +40,7 @@
> #include "hw/ide.h"
> #include "hw/irq.h"
> #include "hw/loader.h"
> -#include "hw/timer/mc146818rtc.h"
> +#include "hw/rtc/mc146818rtc.h"
> #include "hw/isa/pc87312.h"
> #include "hw/net/ne2000-isa.h"
> #include "sysemu/arch_init.h"
> diff --git a/hw/rtc/Kconfig b/hw/rtc/Kconfig
> index 8a4383bca9..7ffd702268 100644
> --- a/hw/rtc/Kconfig
> +++ b/hw/rtc/Kconfig
> @@ -1,2 +1,5 @@
> config PL031
> bool
> +
> +config MC146818RTC
> + bool
> diff --git a/hw/rtc/Makefile.objs b/hw/rtc/Makefile.objs
> index 3e1eb42563..3cac0d5a63 100644
> --- a/hw/rtc/Makefile.objs
> +++ b/hw/rtc/Makefile.objs
> @@ -1 +1,2 @@
> common-obj-$(CONFIG_PL031) += pl031.o
> +obj-$(CONFIG_MC146818RTC) += mc146818rtc.o
> diff --git a/hw/timer/mc146818rtc.c b/hw/rtc/mc146818rtc.c
> similarity index 99%
> rename from hw/timer/mc146818rtc.c
> rename to hw/rtc/mc146818rtc.c
> index 6cb378751b..ced15f764f 100644
> --- a/hw/timer/mc146818rtc.c
> +++ b/hw/rtc/mc146818rtc.c
> @@ -34,7 +34,7 @@
> #include "sysemu/replay.h"
> #include "sysemu/reset.h"
> #include "sysemu/runstate.h"
> -#include "hw/timer/mc146818rtc.h"
> +#include "hw/rtc/mc146818rtc.h"
> #include "migration/vmstate.h"
> #include "qapi/error.h"
> #include "qapi/qapi-commands-misc-target.h"
> diff --git a/hw/timer/Kconfig b/hw/timer/Kconfig
> index 27c5dce09e..af415c8ef8 100644
> --- a/hw/timer/Kconfig
> +++ b/hw/timer/Kconfig
> @@ -35,9 +35,6 @@ config ALTERA_TIMER
> bool
> select PTIMER
>
> -config MC146818RTC
> - bool
> -
> config ALLWINNER_A10_PIT
> bool
> select PTIMER
> diff --git a/hw/timer/Makefile.objs b/hw/timer/Makefile.objs
> index 9f64f6e11e..b0159189cf 100644
> --- a/hw/timer/Makefile.objs
> +++ b/hw/timer/Makefile.objs
> @@ -35,8 +35,6 @@ common-obj-$(CONFIG_SH4) += sh_timer.o
> common-obj-$(CONFIG_DIGIC) += digic-timer.o
> common-obj-$(CONFIG_MIPS_CPS) += mips_gictimer.o
>
> -obj-$(CONFIG_MC146818RTC) += mc146818rtc.o
> -
> common-obj-$(CONFIG_ALLWINNER_A10_PIT) += allwinner-a10-pit.o
>
> common-obj-$(CONFIG_STM32F2XX_TIMER) += stm32f2xx_timer.o
> diff --git a/hw/timer/hpet.c b/hw/timer/hpet.c
> index 1ddae4e7d7..02bf8a8ce8 100644
> --- a/hw/timer/hpet.c
> +++ b/hw/timer/hpet.c
> @@ -33,7 +33,7 @@
> #include "qemu/timer.h"
> #include "hw/timer/hpet.h"
> #include "hw/sysbus.h"
> -#include "hw/timer/mc146818rtc.h"
> +#include "hw/rtc/mc146818rtc.h"
> #include "migration/vmstate.h"
> #include "hw/timer/i8254.h"
>
> diff --git a/include/hw/timer/mc146818rtc.h b/include/hw/rtc/mc146818rtc.h
> similarity index 58%
> rename from include/hw/timer/mc146818rtc.h
> rename to include/hw/rtc/mc146818rtc.h
> index fe6ed63f71..2e9331637a 100644
> --- a/include/hw/timer/mc146818rtc.h
> +++ b/include/hw/rtc/mc146818rtc.h
> @@ -1,8 +1,16 @@
> -#ifndef MC146818RTC_H
> -#define MC146818RTC_H
> +/*
> + * QEMU MC146818 RTC emulation
> + *
> + * Copyright (c) 2003-2004 Fabrice Bellard
> + *
> + * SPDX-License-Identifier: MIT
> + */
> +
> +#ifndef HW_RTC_MC146818RTC_H
> +#define HW_RTC_MC146818RTC_H
>
> #include "hw/isa/isa.h"
> -#include "hw/timer/mc146818rtc_regs.h"
> +#include "hw/rtc/mc146818rtc_regs.h"
>
> #define TYPE_MC146818_RTC "mc146818rtc"
>
> diff --git a/include/hw/timer/mc146818rtc_regs.h b/include/hw/rtc/mc146818rtc_regs.h
> similarity index 96%
> rename from include/hw/timer/mc146818rtc_regs.h
> rename to include/hw/rtc/mc146818rtc_regs.h
> index bfbb57e570..dd6c09e2fc 100644
> --- a/include/hw/timer/mc146818rtc_regs.h
> +++ b/include/hw/rtc/mc146818rtc_regs.h
> @@ -22,10 +22,11 @@
> * THE SOFTWARE.
> */
>
> -#ifndef MC146818RTC_REGS_H
> -#define MC146818RTC_REGS_H
> +#ifndef HW_RTC_MC146818RTC_REGS_H
> +#define HW_RTC_MC146818RTC_REGS_H
>
> #include "qemu/timer.h"
> +#include "qemu/host-utils.h"
>
> #define RTC_ISA_IRQ 8
>
> diff --git a/tests/rtc-test.c b/tests/rtc-test.c
> index 6309b0ef6c..79a4ff1ed6 100644
> --- a/tests/rtc-test.c
> +++ b/tests/rtc-test.c
> @@ -15,7 +15,7 @@
>
> #include "libqtest-single.h"
> #include "qemu/timer.h"
> -#include "hw/timer/mc146818rtc_regs.h"
> +#include "hw/rtc/mc146818rtc_regs.h"
>
> #define UIP_HOLD_LENGTH (8 * NANOSECONDS_PER_SECOND / 32768)
>
>
Applied to my trivial-patches branch.
Thanks,
Laurent
next prev parent reply other threads:[~2019-10-24 18:22 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-03 23:03 [PATCH v2 00/14] hw: Split RTC devices from hw/timer/ to hw/rtc/ Philippe Mathieu-Daudé
2019-10-03 23:03 ` [PATCH v2 01/14] hw/timer: Compile devices not target-dependent as common object Philippe Mathieu-Daudé
2019-10-24 18:02 ` Laurent Vivier
2019-10-03 23:03 ` [PATCH v2 02/14] hw: Move PL031 device from hw/timer/ to hw/rtc/ subdirectory Philippe Mathieu-Daudé
2019-10-24 18:04 ` Laurent Vivier
2019-10-03 23:03 ` [PATCH v2 03/14] hw: Move MC146818 " Philippe Mathieu-Daudé
2019-10-24 18:14 ` Laurent Vivier [this message]
2019-10-03 23:03 ` [PATCH v2 04/14] hw: Move M48T59 " Philippe Mathieu-Daudé
2019-10-24 18:21 ` Laurent Vivier
2019-10-03 23:03 ` [PATCH v2 05/14] hw: Move M41T80 " Philippe Mathieu-Daudé
2019-10-24 18:22 ` Laurent Vivier
2019-10-03 23:03 ` [PATCH v2 06/14] hw: Move sun4v hypervisor RTC " Philippe Mathieu-Daudé
2019-10-24 14:10 ` Philippe Mathieu-Daudé
2019-10-24 16:41 ` Artyom Tarasenko
2019-10-24 18:23 ` Laurent Vivier
2019-10-03 23:03 ` [PATCH v2 07/14] hw: Move TWL92230 device " Philippe Mathieu-Daudé
2019-10-24 18:25 ` Laurent Vivier
2019-10-03 23:03 ` [PATCH v2 08/14] hw: Move DS1338 " Philippe Mathieu-Daudé
2019-10-24 18:26 ` Laurent Vivier
2019-10-03 23:03 ` [PATCH v2 09/14] hw: Move Xilinx ZynqMP RTC " Philippe Mathieu-Daudé
2019-10-24 18:28 ` Laurent Vivier
2019-10-03 23:04 ` [PATCH v2 10/14] hw: Move Exynos4210 " Philippe Mathieu-Daudé
2019-10-24 18:30 ` Laurent Vivier
2019-10-03 23:04 ` [PATCH v2 11/14] hw: Move Aspeed " Philippe Mathieu-Daudé
2019-10-24 18:32 ` Laurent Vivier
2019-10-03 23:04 ` [PATCH v2 12/14] hw/rtc/mc146818: Include mc146818rtc_regs.h a bit less Philippe Mathieu-Daudé
2019-10-24 18:33 ` Laurent Vivier
2019-10-03 23:04 ` [PATCH v2 13/14] hw/rtc/xlnx-zynqmp-rtc: Remove unused "ptimer.h" include Philippe Mathieu-Daudé
2019-10-24 18:34 ` Laurent Vivier
2019-10-03 23:04 ` [PATCH v2 14/14] hw/rtc/aspeed_rtc: Remove unused includes Philippe Mathieu-Daudé
2019-10-24 18:35 ` Laurent Vivier
2019-10-24 15:51 ` [PATCH v2 00/14] hw: Split RTC devices from hw/timer/ to hw/rtc/ Peter Maydell
2019-10-24 17:36 ` Laurent Vivier
2019-10-24 17:55 ` Philippe Mathieu-Daudé
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=c24b0edf-9364-d6eb-6433-854d937320bc@vivier.eu \
--to=laurent@vivier.eu \
--cc=alistair.francis@wdc.com \
--cc=alistair@alistair23.me \
--cc=amarkovic@wavecomp.com \
--cc=andrew@aj.id.au \
--cc=arikalo@wavecomp.com \
--cc=atar4qemu@gmail.com \
--cc=clg@kaod.org \
--cc=david@gibson.dropbear.id.au \
--cc=deller@gmx.de \
--cc=edgar.iglesias@gmail.com \
--cc=ehabkost@redhat.com \
--cc=hpoussin@reactos.org \
--cc=imammedo@redhat.com \
--cc=joel@jms.id.au \
--cc=lvivier@redhat.com \
--cc=mark.cave-ayland@ilande.co.uk \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=philmd@redhat.com \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=qemu-trivial@nongnu.org \
--cc=rth@twiddle.net \
--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).