qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
	"Sagar Karandikar" <sagark@eecs.berkeley.edu>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	"Mark Cave-Ayland" <mark.cave-ayland@ilande.co.uk>,
	"Max Filippov" <jcmvbkbc@gmail.com>,
	"Alistair Francis" <Alistair.Francis@wdc.com>,
	"Gerd Hoffmann" <kraxel@redhat.com>,
	"Edgar E. Iglesias" <edgar.iglesias@gmail.com>,
	"Stefano Stabellini" <sstabellini@kernel.org>,
	"Paul Durrant" <paul@xen.org>,
	"Magnus Damm" <magnus.damm@gmail.com>,
	"Markus Armbruster" <armbru@redhat.com>,
	"Anthony Perard" <anthony.perard@citrix.com>,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>,
	"David Gibson" <david@gibson.dropbear.id.au>,
	"Eduardo Habkost" <ehabkost@redhat.com>,
	"Alistair Francis" <alistair@alistair23.me>,
	qemu-arm@nongnu.org, xen-devel@lists.xenproject.org,
	qemu-riscv@nongnu.org, "Stafford Horne" <shorne@gmail.com>,
	"Palmer Dabbelt" <palmer@dabbelt.com>,
	"Richard Henderson" <rth@twiddle.net>,
	"Daniel P . Berrange" <berrange@redhat.com>,
	"Thomas Huth" <huth@tuxfamily.org>,
	"Bastian Koppelmann" <kbastian@mail.uni-paderborn.de>,
	"Philippe Mathieu-Daudé" <philmd@redhat.com>,
	"Michael Walle" <michael@walle.cc>,
	qemu-ppc@nongnu.org, "Paolo Bonzini" <pbonzini@redhat.com>,
	"Aurelien Jarno" <aurelien@aurel32.net>
Subject: [RFC PATCH 28/35] hw/ppc/ppc4xx: Emit warning when old code is used
Date: Mon,  8 Jun 2020 18:00:37 +0200	[thread overview]
Message-ID: <20200608160044.15531-29-philmd@redhat.com> (raw)
In-Reply-To: <20200608160044.15531-1-philmd@redhat.com>

This code hasn't been QOM'ified yet. Warn the user.

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 hw/ppc/ppc405_boards.c |  5 +++++
 hw/ppc/ppc405_uc.c     | 21 +++++++++++++++++++++
 hw/ppc/ppc4xx_devs.c   |  7 +++++++
 3 files changed, 33 insertions(+)

diff --git a/hw/ppc/ppc405_boards.c b/hw/ppc/ppc405_boards.c
index 6198ec1035..eb1216b5f0 100644
--- a/hw/ppc/ppc405_boards.c
+++ b/hw/ppc/ppc405_boards.c
@@ -41,6 +41,7 @@
 #include "hw/loader.h"
 #include "exec/address-spaces.h"
 #include "qemu/cutils.h"
+#include "hw/qdev-deprecated.h"
 
 #define BIOS_FILENAME "ppc405_rom.bin"
 #define BIOS_SIZE (2 * MiB)
@@ -129,6 +130,8 @@ static void ref405ep_fpga_init(MemoryRegion *sysmem, uint32_t base)
     ref405ep_fpga_t *fpga;
     MemoryRegion *fpga_memory = g_new(MemoryRegion, 1);
 
+    qdev_warn_deprecated_function_used();
+
     fpga = g_malloc0(sizeof(ref405ep_fpga_t));
     memory_region_init_io(fpga_memory, NULL, &ref405ep_fpga_ops, fpga,
                           "fpga", 0x00000100);
@@ -408,6 +411,8 @@ static void taihu_cpld_init(MemoryRegion *sysmem, uint32_t base)
     taihu_cpld_t *cpld;
     MemoryRegion *cpld_memory = g_new(MemoryRegion, 1);
 
+    qdev_warn_deprecated_function_used();
+
     cpld = g_malloc0(sizeof(taihu_cpld_t));
     memory_region_init_io(cpld_memory, NULL, &taihu_cpld_ops, cpld, "cpld", 0x100);
     memory_region_add_subregion(sysmem, base, cpld_memory);
diff --git a/hw/ppc/ppc405_uc.c b/hw/ppc/ppc405_uc.c
index 381720aced..160604c62e 100644
--- a/hw/ppc/ppc405_uc.c
+++ b/hw/ppc/ppc405_uc.c
@@ -36,6 +36,7 @@
 #include "sysemu/sysemu.h"
 #include "qemu/log.h"
 #include "exec/address-spaces.h"
+#include "hw/qdev-deprecated.h"
 
 //#define DEBUG_OPBA
 //#define DEBUG_SDRAM
@@ -182,6 +183,8 @@ void ppc4xx_plb_init(CPUPPCState *env)
 {
     ppc4xx_plb_t *plb;
 
+    qdev_warn_deprecated_function_used();
+
     plb = g_malloc0(sizeof(ppc4xx_plb_t));
     ppc_dcr_register(env, PLB3A0_ACR, plb, &dcr_read_plb, &dcr_write_plb);
     ppc_dcr_register(env, PLB4A0_ACR, plb, &dcr_read_plb, &dcr_write_plb);
@@ -267,6 +270,8 @@ static void ppc4xx_pob_init(CPUPPCState *env)
 {
     ppc4xx_pob_t *pob;
 
+    qdev_warn_deprecated_function_used();
+
     pob = g_malloc0(sizeof(ppc4xx_pob_t));
     ppc_dcr_register(env, POB0_BEAR, pob, &dcr_read_pob, &dcr_write_pob);
     ppc_dcr_register(env, POB0_BESR0, pob, &dcr_read_pob, &dcr_write_pob);
@@ -351,6 +356,8 @@ static void ppc4xx_opba_init(hwaddr base)
 {
     ppc4xx_opba_t *opba;
 
+    qdev_warn_deprecated_function_used();
+
     opba = g_malloc0(sizeof(ppc4xx_opba_t));
 #ifdef DEBUG_OPBA
     printf("%s: offset " TARGET_FMT_plx "\n", __func__, base);
@@ -549,6 +556,8 @@ void ppc405_ebc_init(CPUPPCState *env)
 {
     ppc4xx_ebc_t *ebc;
 
+    qdev_warn_deprecated_function_used();
+
     ebc = g_malloc0(sizeof(ppc4xx_ebc_t));
     qemu_register_reset(&ebc_reset, ebc);
     ppc_dcr_register(env, EBC0_CFGADDR,
@@ -632,6 +641,8 @@ static void ppc405_dma_init(CPUPPCState *env, qemu_irq irqs[4])
 {
     ppc405_dma_t *dma;
 
+    qdev_warn_deprecated_function_used();
+
     dma = g_malloc0(sizeof(ppc405_dma_t));
     memcpy(dma->irqs, irqs, 4 * sizeof(qemu_irq));
     qemu_register_reset(&ppc405_dma_reset, dma);
@@ -735,6 +746,8 @@ static void ppc405_gpio_init(hwaddr base)
 {
     ppc405_gpio_t *gpio;
 
+    qdev_warn_deprecated_function_used();
+
     gpio = g_malloc0(sizeof(ppc405_gpio_t));
 #ifdef DEBUG_GPIO
     printf("%s: offset " TARGET_FMT_plx "\n", __func__, base);
@@ -897,6 +910,8 @@ static void ppc405_ocm_init(CPUPPCState *env)
 {
     ppc405_ocm_t *ocm;
 
+    qdev_warn_deprecated_function_used();
+
     ocm = g_malloc0(sizeof(ppc405_ocm_t));
     /* XXX: Size is 4096 or 0x04000000 */
     memory_region_init_ram(&ocm->isarc_ram, NULL, "ppc405.ocm", 4 * KiB,
@@ -1142,6 +1157,8 @@ static void ppc4xx_gpt_init(hwaddr base, qemu_irq irqs[5])
     ppc4xx_gpt_t *gpt;
     int i;
 
+    qdev_warn_deprecated_function_used();
+
     gpt = g_malloc0(sizeof(ppc4xx_gpt_t));
     for (i = 0; i < 5; i++) {
         gpt->irqs[i] = irqs[i];
@@ -1410,6 +1427,8 @@ static void ppc405cr_cpc_init (CPUPPCState *env, clk_setup_t clk_setup[7],
 {
     ppc405cr_cpc_t *cpc;
 
+    qdev_warn_deprecated_function_used();
+
     cpc = g_malloc0(sizeof(ppc405cr_cpc_t));
     memcpy(cpc->clk_setup, clk_setup,
            PPC405CR_CLK_NB * sizeof(clk_setup_t));
@@ -1755,6 +1774,8 @@ static void ppc405ep_cpc_init (CPUPPCState *env, clk_setup_t clk_setup[8],
 {
     ppc405ep_cpc_t *cpc;
 
+    qdev_warn_deprecated_function_used();
+
     cpc = g_malloc0(sizeof(ppc405ep_cpc_t));
     memcpy(cpc->clk_setup, clk_setup,
            PPC405EP_CLK_NB * sizeof(clk_setup_t));
diff --git a/hw/ppc/ppc4xx_devs.c b/hw/ppc/ppc4xx_devs.c
index f1651e04d9..b09d7ab5c6 100644
--- a/hw/ppc/ppc4xx_devs.c
+++ b/hw/ppc/ppc4xx_devs.c
@@ -33,6 +33,7 @@
 #include "qemu/log.h"
 #include "exec/address-spaces.h"
 #include "qemu/error-report.h"
+#include "hw/qdev-deprecated.h"
 
 /*#define DEBUG_UIC*/
 
@@ -303,6 +304,8 @@ qemu_irq *ppcuic_init (CPUPPCState *env, qemu_irq *irqs,
     ppcuic_t *uic;
     int i;
 
+    qdev_warn_deprecated_function_used();
+
     uic = g_malloc0(sizeof(ppcuic_t));
     uic->dcr_base = dcr_base;
     uic->irqs = irqs;
@@ -647,6 +650,8 @@ void ppc4xx_sdram_init (CPUPPCState *env, qemu_irq irq, int nbanks,
 {
     ppc4xx_sdram_t *sdram;
 
+    qdev_warn_deprecated_function_used();
+
     sdram = g_malloc0(sizeof(ppc4xx_sdram_t));
     sdram->irq = irq;
     sdram->nbanks = nbanks;
@@ -908,6 +913,8 @@ void ppc4xx_mal_init(CPUPPCState *env, uint8_t txcnum, uint8_t rxcnum,
     ppc4xx_mal_t *mal;
     int i;
 
+    qdev_warn_deprecated_function_used();
+
     assert(txcnum <= 32 && rxcnum <= 32);
     mal = g_malloc0(sizeof(*mal));
     mal->txcnum = txcnum;
-- 
2.21.3



  parent reply	other threads:[~2020-06-08 16:28 UTC|newest]

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-08 16:00 [RFC PATCH 00/35] hw/qdev: Warn when using pre-qdev/QOM devices Philippe Mathieu-Daudé
2020-06-08 16:00 ` [RFC PATCH 01/35] qom/object: Update documentation Philippe Mathieu-Daudé
2020-06-08 16:00 ` [RFC PATCH 02/35] hw/core/qdev: Add qdev_warn_deprecated_function_used() helper Philippe Mathieu-Daudé
2020-06-08 16:00 ` [RFC PATCH 03/35] hw/arm/omap: Emit warning when old code is used Philippe Mathieu-Daudé
2020-06-08 16:00 ` [RFC PATCH 04/35] hw/arm/pxa2xx: " Philippe Mathieu-Daudé
2020-06-08 16:00 ` [RFC PATCH 05/35] hw/arm/nseries: " Philippe Mathieu-Daudé
2020-06-08 16:00 ` [RFC PATCH 06/35] hw/timer/arm_timer: " Philippe Mathieu-Daudé
2020-06-09 11:10   ` Paolo Bonzini
2020-06-08 16:00 ` [RFC PATCH 07/35] hw/char/parallel: " Philippe Mathieu-Daudé
2020-06-08 16:00 ` [RFC PATCH 08/35] hw/display/blizzard: " Philippe Mathieu-Daudé
2020-06-08 16:00 ` [RFC PATCH 09/35] hw/display/ramfb: " Philippe Mathieu-Daudé
2020-06-08 16:00 ` [RFC PATCH 10/35] hw/display/tc6393xb: " Philippe Mathieu-Daudé
2020-06-08 16:00 ` [RFC PATCH 11/35] hw/display/vga-isa-mm: " Philippe Mathieu-Daudé
2020-06-08 16:00 ` [RFC PATCH 12/35] hw/dma/etraxfs_dma: " Philippe Mathieu-Daudé
2020-06-08 16:00 ` [RFC PATCH 13/35] hw/dma/soc_dma: " Philippe Mathieu-Daudé
2020-06-08 16:00 ` [RFC PATCH 14/35] hw/i386/pc: " Philippe Mathieu-Daudé
2020-06-09 11:08   ` Paolo Bonzini
2020-06-08 16:00 ` [RFC PATCH 15/35] hw/i386/xen/xen-hvm: " Philippe Mathieu-Daudé
2020-06-08 16:54   ` Paul Durrant
2020-06-08 17:37     ` Philippe Mathieu-Daudé
2020-06-08 16:00 ` [RFC PATCH 16/35] hw/input/lasips2: " Philippe Mathieu-Daudé
2020-06-08 16:00 ` [RFC PATCH 17/35] hw/input/pckbd: " Philippe Mathieu-Daudé
2020-06-09 11:07   ` Paolo Bonzini
2020-06-08 16:00 ` [RFC PATCH 18/35] hw/input/ps2: " Philippe Mathieu-Daudé
2020-06-09 11:06   ` Paolo Bonzini
2020-06-08 16:00 ` [RFC PATCH 19/35] hw/input/tsc2005: " Philippe Mathieu-Daudé
2020-06-08 16:00 ` [RFC PATCH 20/35] hw/intc/i8259: " Philippe Mathieu-Daudé
2020-06-09 11:10   ` Paolo Bonzini
2020-06-08 16:00 ` [RFC PATCH 21/35] hw/lm32/lm32_hwsetup: " Philippe Mathieu-Daudé
2020-06-09 11:11   ` Paolo Bonzini
2020-06-08 16:00 ` [RFC PATCH 22/35] hw/m68k/mcf520x: " Philippe Mathieu-Daudé
2020-06-08 19:54   ` Thomas Huth
2020-06-08 16:00 ` [RFC PATCH 23/35] hw/misc/applesmc: " Philippe Mathieu-Daudé
2020-06-09 11:05   ` Paolo Bonzini
2020-06-08 16:00 ` [RFC PATCH 24/35] hw/misc/cbus: " Philippe Mathieu-Daudé
2020-06-08 16:00 ` [RFC PATCH 25/35] hw/nvram/eeprom93xx: " Philippe Mathieu-Daudé
2020-06-08 16:00 ` [RFC PATCH 26/35] hw/openrisc/cputimer: " Philippe Mathieu-Daudé
2020-06-09 11:13   ` Paolo Bonzini
2020-06-08 16:00 ` [RFC PATCH 27/35] hw/ppc/ppc: " Philippe Mathieu-Daudé
2020-06-09 11:12   ` Paolo Bonzini
2020-06-08 16:00 ` Philippe Mathieu-Daudé [this message]
2020-06-08 16:00 ` [RFC PATCH 29/35] hw/ppc/ppc_booke: " Philippe Mathieu-Daudé
2020-06-09 11:12   ` Paolo Bonzini
2020-06-08 16:00 ` [RFC PATCH 30/35] hw/ppc/virtex_ml507: " Philippe Mathieu-Daudé
2020-06-09 11:12   ` Paolo Bonzini
2020-06-08 16:00 ` [RFC PATCH 31/35] hw/sh4: " Philippe Mathieu-Daudé
2020-06-08 16:00 ` [RFC PATCH 32/35] hw/riscv: " Philippe Mathieu-Daudé
2020-06-09 11:04   ` Paolo Bonzini
2020-06-08 16:00 ` [RFC PATCH 33/35] hw/timer/slavio_timer: " Philippe Mathieu-Daudé
2020-06-09 11:03   ` Paolo Bonzini
2020-06-08 16:00 ` [RFC PATCH 34/35] hw/usb/hcd-musb: " Philippe Mathieu-Daudé
2020-06-08 16:00 ` [RFC PATCH 35/35] hw/xtensa/xtfpga: " Philippe Mathieu-Daudé
2020-06-08 16:14 ` [RFC PATCH 00/35] hw/qdev: Warn when using pre-qdev/QOM devices Peter Maydell
2020-06-08 16:17   ` Philippe Mathieu-Daudé
2020-06-09 11:14     ` Paolo Bonzini

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=20200608160044.15531-29-philmd@redhat.com \
    --to=philmd@redhat.com \
    --cc=Alistair.Francis@wdc.com \
    --cc=alistair@alistair23.me \
    --cc=anthony.perard@citrix.com \
    --cc=armbru@redhat.com \
    --cc=aurelien@aurel32.net \
    --cc=berrange@redhat.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=edgar.iglesias@gmail.com \
    --cc=ehabkost@redhat.com \
    --cc=huth@tuxfamily.org \
    --cc=jcmvbkbc@gmail.com \
    --cc=kbastian@mail.uni-paderborn.de \
    --cc=kraxel@redhat.com \
    --cc=magnus.damm@gmail.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=mark.cave-ayland@ilande.co.uk \
    --cc=michael@walle.cc \
    --cc=mst@redhat.com \
    --cc=palmer@dabbelt.com \
    --cc=paul@xen.org \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=qemu-riscv@nongnu.org \
    --cc=rth@twiddle.net \
    --cc=sagark@eecs.berkeley.edu \
    --cc=shorne@gmail.com \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xenproject.org \
    /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).