Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1jiKFh-0007rg-E3 for mharc-qemu-riscv@gnu.org; Mon, 08 Jun 2020 12:03:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38366) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jiKFb-0007ou-Rr for qemu-riscv@nongnu.org; Mon, 08 Jun 2020 12:03:51 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:55861 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jiKFa-0008E4-Pc for qemu-riscv@nongnu.org; Mon, 08 Jun 2020 12:03:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1591632229; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+WkHvAzEi0wEkdKvuBuPydWDbkpdF7QxEn1l5oochA0=; b=N4p54fYmCXOpchXnz0ZN1/cwQxg11GtBAtIichPgSaIhepD7fvyuocQ5BEW9A2xBn5qmnR u7q//ZSbVc+0ypI6BlemWubZPd0cg/5D4tktzbM56JpIkJOk3OsNyHV83GqzjL/DjY5Xg/ 9mL5CyiLuPSSk5uZqwujWShVip99JAg= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-452--hTI7tmRO_6nTKWgyuEL_A-1; Mon, 08 Jun 2020 12:03:48 -0400 X-MC-Unique: -hTI7tmRO_6nTKWgyuEL_A-1 Received: by mail-wm1-f72.google.com with SMTP id a7so12837wmf.1 for ; Mon, 08 Jun 2020 09:03:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=+WkHvAzEi0wEkdKvuBuPydWDbkpdF7QxEn1l5oochA0=; b=BuYmTAqMMRiHyvqU/T5XLhv1n0xLRhJwzEviuKqT6mRUfd2dvWSYVf9YMtj76/vpMf GmHVBMnKTYR2vpPRFkDGhZAyw8rr52kmYZi7+FQsTPW8BBuZ5r4uuqtkU4cvuHiRusPL 5LiiUTz4d3Wik6tK0UioGOGl+0DL6teU7kf/xwGa7iCzFa1CSgHjNvOQ3DuvuMJt2dTF hsKDANQwKhcu5ovQimPLc1atZandKALGdnDa3OdYWWFe7KlMWMp6JabR1TANvhInVJFw qtcYnMViJqO6zQ3+1Iq2bZFsxry3daGk5z9OabrguEUxjmSlgBl1erQdRArn7inE0gVK iH3g== X-Gm-Message-State: AOAM533M8g5zRKVkrJw5AeqKDWtcPmPnWRU1e29t/MHyl+n3QisCoqnz zE5ilVfsukjaUh3SgoTPbYE9cf3hjlhi+c8twQFWW39TN3wLtqAE9+XT4sia69eIoQbEm3kWxiO i9RygMlCtIKytLDQ= X-Received: by 2002:a5d:49c5:: with SMTP id t5mr24893734wrs.18.1591632227114; Mon, 08 Jun 2020 09:03:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzrpgU9KBovh6Bb8PslmNvBRv90nOw1Va1g7BnyPuxlNkUnSsxx5Z+mEp10XtU+59c/IEfXNQ== X-Received: by 2002:a5d:49c5:: with SMTP id t5mr24893708wrs.18.1591632226912; Mon, 08 Jun 2020 09:03:46 -0700 (PDT) Received: from localhost.localdomain (181.red-88-10-103.dynamicip.rima-tde.net. [88.10.103.181]) by smtp.gmail.com with ESMTPSA id s8sm181183wrg.50.2020.06.08.09.03.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Jun 2020 09:03:46 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, Markus Armbruster , Max Filippov , Marcel Apfelbaum , Peter Maydell , Michael Walle , "Edgar E. Iglesias" , Aurelien Jarno , Gerd Hoffmann , Stafford Horne , Andrzej Zaborowski , qemu-ppc@nongnu.org, Alistair Francis , Richard Henderson , Mark Cave-Ayland , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , "Daniel P . Berrange" , qemu-riscv@nongnu.org, "Michael S. Tsirkin" , xen-devel@lists.xenproject.org, Sagar Karandikar , Anthony Perard , Palmer Dabbelt , Stefano Stabellini , Paul Durrant , Paolo Bonzini , Alistair Francis , Eduardo Habkost , Thomas Huth , Bastian Koppelmann , David Gibson , Magnus Damm , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [RFC PATCH 31/35] hw/sh4: Emit warning when old code is used Date: Mon, 8 Jun 2020 18:00:40 +0200 Message-Id: <20200608160044.15531-32-philmd@redhat.com> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200608160044.15531-1-philmd@redhat.com> References: <20200608160044.15531-1-philmd@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=UTF-8; text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=205.139.110.120; envelope-from=philmd@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/08 01:05:50 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-riscv@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Jun 2020 16:03:52 -0000 This code hasn't been QOM'ified yet. Warn the user. Signed-off-by: Philippe Mathieu-Daudé --- hw/char/sh_serial.c | 3 +++ hw/intc/sh_intc.c | 3 +++ hw/sh4/r2d.c | 3 +++ hw/sh4/sh7750.c | 4 ++++ hw/timer/sh_timer.c | 5 +++++ 5 files changed, 18 insertions(+) diff --git a/hw/char/sh_serial.c b/hw/char/sh_serial.c index 167f4d8cb9..9366a23dd2 100644 --- a/hw/char/sh_serial.c +++ b/hw/char/sh_serial.c @@ -31,6 +31,7 @@ #include "chardev/char-fe.h" #include "qapi/error.h" #include "qemu/timer.h" +#include "hw/qdev-deprecated.h" //#define DEBUG_SERIAL @@ -382,6 +383,8 @@ void sh_serial_init(MemoryRegion *sysmem, { sh_serial_state *s; + qdev_warn_deprecated_function_used(); + s = g_malloc0(sizeof(sh_serial_state)); s->feat = feat; diff --git a/hw/intc/sh_intc.c b/hw/intc/sh_intc.c index 72a55e32dd..c90fbf47bb 100644 --- a/hw/intc/sh_intc.c +++ b/hw/intc/sh_intc.c @@ -13,6 +13,7 @@ #include "hw/sh4/sh_intc.h" #include "hw/irq.h" #include "hw/sh4/sh.h" +#include "hw/qdev-deprecated.h" //#define DEBUG_INTC //#define DEBUG_INTC_SOURCES @@ -444,6 +445,8 @@ int sh_intc_init(MemoryRegion *sysmem, { unsigned int i, j; + qdev_warn_deprecated_function_used(); + desc->pending = 0; desc->nr_sources = nr_sources; desc->mask_regs = mask_regs; diff --git a/hw/sh4/r2d.c b/hw/sh4/r2d.c index 72bb5285cc..22bbbe7d3c 100644 --- a/hw/sh4/r2d.c +++ b/hw/sh4/r2d.c @@ -43,6 +43,7 @@ #include "hw/usb.h" #include "hw/block/flash.h" #include "exec/address-spaces.h" +#include "hw/qdev-deprecated.h" #define FLASH_BASE 0x00000000 #define FLASH_SIZE (16 * MiB) @@ -187,6 +188,8 @@ static qemu_irq *r2d_fpga_init(MemoryRegion *sysmem, { r2d_fpga_t *s; + qdev_warn_deprecated_function_used(); + s = g_malloc0(sizeof(r2d_fpga_t)); s->irl = irl; diff --git a/hw/sh4/sh7750.c b/hw/sh4/sh7750.c index d660714443..379822e0c2 100644 --- a/hw/sh4/sh7750.c +++ b/hw/sh4/sh7750.c @@ -32,6 +32,7 @@ #include "hw/sh4/sh_intc.h" #include "cpu.h" #include "exec/exec-all.h" +#include "hw/qdev-deprecated.h" #define NB_DEVICES 4 @@ -756,6 +757,8 @@ SH7750State *sh7750_init(SuperHCPU *cpu, MemoryRegion *sysmem) { SH7750State *s; + qdev_warn_deprecated_function_used(); + s = g_malloc0(sizeof(SH7750State)); s->cpu = cpu; s->periph_freq = 60000000; /* 60MHz */ @@ -866,6 +869,7 @@ SH7750State *sh7750_init(SuperHCPU *cpu, MemoryRegion *sysmem) qemu_irq sh7750_irl(SH7750State *s) { + qdev_warn_deprecated_function_used(); sh_intc_toggle_source(sh_intc_source(&s->intc, IRL), 1, 0); /* enable */ return qemu_allocate_irq(sh_intc_set_irl, sh_intc_source(&s->intc, IRL), 0); } diff --git a/hw/timer/sh_timer.c b/hw/timer/sh_timer.c index 13c4051808..d5e33507b0 100644 --- a/hw/timer/sh_timer.c +++ b/hw/timer/sh_timer.c @@ -14,6 +14,7 @@ #include "hw/sh4/sh.h" #include "qemu/timer.h" #include "hw/ptimer.h" +#include "hw/qdev-deprecated.h" //#define DEBUG_TIMER @@ -199,6 +200,8 @@ static void *sh_timer_init(uint32_t freq, int feat, qemu_irq irq) { sh_timer_state *s; + qdev_warn_deprecated_function_used(); + s = (sh_timer_state *)g_malloc0(sizeof(sh_timer_state)); s->freq = freq; s->feat = feat; @@ -319,6 +322,8 @@ void tmu012_init(MemoryRegion *sysmem, hwaddr base, tmu012_state *s; int timer_feat = (feat & TMU012_FEAT_EXTCLK) ? TIMER_FEAT_EXTCLK : 0; + qdev_warn_deprecated_function_used(); + s = (tmu012_state *)g_malloc0(sizeof(tmu012_state)); s->feat = feat; s->timer[0] = sh_timer_init(freq, timer_feat, ch0_irq); -- 2.21.3