From nobody Sun May 5 23:36:04 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1569511353; cv=none; d=zoho.com; s=zohoarc; b=CjNiqkfiAu4Wk39ILtZK+CVZVKGkC5xNzD4l0DmNB/yMmv1TnZdAFL4AfTc0pclEkVVd/n9vbRmAt/q5msgbLb+cZnlVO8duCZwlRpPxpzSVSAYwpAG0DvHeRcnmUicuqvWVi2cS9YryFeZGegr1HyubV7cNQB8nUMPpttCxqg8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569511353; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=0lY9RUlWVXDDw5Wi9BSf64mULQz4RPd14oO5BNdbVIE=; b=RnV2/LFmty+JVSTLGkA2VRlVvK5hrRzrpGh1AR6YQISP4gByCm9w5uLiVTYe60e5o1RDfaf5ZGO9wiLFoEgGpTmm96wLZMYY6jvJCpUwh0xiavwNRdvEI1HZCdauP1kJ9QlX4Cj1tPf6qdHGUb7+UVvoeBYzTfhLszj4+z397+E= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1569511353252937.5970056450036; Thu, 26 Sep 2019 08:22:33 -0700 (PDT) Received: from localhost ([::1]:39170 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iDVbB-0005w4-8S for importer@patchew.org; Thu, 26 Sep 2019 11:22:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52252) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iDVWt-0002r2-3p for qemu-devel@nongnu.org; Thu, 26 Sep 2019 11:18:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iDVWn-0004Uy-V4 for qemu-devel@nongnu.org; Thu, 26 Sep 2019 11:17:59 -0400 Received: from mx1.redhat.com ([209.132.183.28]:5765) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iDVWn-0004UM-QH; Thu, 26 Sep 2019 11:17:57 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B06988E582; Thu, 26 Sep 2019 15:17:56 +0000 (UTC) Received: from x1w.redhat.com (unknown [10.40.205.127]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 015B05D6A7; Thu, 26 Sep 2019 15:17:52 +0000 (UTC) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 01/11] hw/acpi/piix4: Convert reset handler to DeviceReset Date: Thu, 26 Sep 2019 17:17:23 +0200 Message-Id: <20190926151733.25349-2-philmd@redhat.com> In-Reply-To: <20190926151733.25349-1-philmd@redhat.com> References: <20190926151733.25349-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Thu, 26 Sep 2019 15:17:56 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Damien Hedde , Peter Maydell , "Michael S. Tsirkin" , qemu-trivial@nongnu.org, Markus Armbruster , Igor Mammedov , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Convert the reset handler into a proper Device reset method. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Igor Mammedov --- hw/acpi/piix4.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/hw/acpi/piix4.c b/hw/acpi/piix4.c index 5742c3df87..4e079b39bd 100644 --- a/hw/acpi/piix4.c +++ b/hw/acpi/piix4.c @@ -27,7 +27,6 @@ #include "hw/pci/pci.h" #include "hw/qdev-properties.h" #include "hw/acpi/acpi.h" -#include "sysemu/reset.h" #include "sysemu/runstate.h" #include "sysemu/sysemu.h" #include "qapi/error.h" @@ -344,9 +343,9 @@ static const VMStateDescription vmstate_acpi =3D { } }; =20 -static void piix4_reset(void *opaque) +static void piix4_pm_reset(DeviceState *dev) { - PIIX4PMState *s =3D opaque; + PIIX4PMState *s =3D PIIX4_PM(dev); PCIDevice *d =3D PCI_DEVICE(s); uint8_t *pci_conf =3D d->config; =20 @@ -542,7 +541,6 @@ static void piix4_pm_realize(PCIDevice *dev, Error **er= rp) =20 s->machine_ready.notify =3D piix4_pm_machine_ready; qemu_add_machine_init_done_notifier(&s->machine_ready); - qemu_register_reset(piix4_reset, s); =20 piix4_acpi_system_hot_add_init(pci_address_space_io(dev), pci_get_bus(dev), s); @@ -692,6 +690,7 @@ static void piix4_pm_class_init(ObjectClass *klass, voi= d *data) k->device_id =3D PCI_DEVICE_ID_INTEL_82371AB_3; k->revision =3D 0x03; k->class_id =3D PCI_CLASS_BRIDGE_OTHER; + dc->reset =3D piix4_pm_reset; dc->desc =3D "PM"; dc->vmsd =3D &vmstate_acpi; dc->props =3D piix4_pm_properties; --=20 2.20.1 From nobody Sun May 5 23:36:04 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1569511379; cv=none; d=zoho.com; s=zohoarc; b=hgoBufQ+wcU2gnCTp0NwTImwsfqGp9An6QNpNTPEXdY+bL2NFtjdwtI7LUr5thEk/aGW9+Ms4/wAz+pp0Sqxz6nN0IQP0ioUxK0WvE6NKKDX/UUpeYjDISY33OIlovBY8Dxd+HrANidbYtEqqsuV6aCJT+tQedgm61IVU07plYw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569511379; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=j18U0YHD9Bws3OO9HGhmD6uzuU1nhyOfkPRCFQgnHaA=; b=LHrhWkuug37zKGUGCsHTECPQSTEhptz7Y7t64lL5mwHhFFe20AMVtSraRmit21Sh5J+YJAkeClOnWhW3ru1vWhXdFVPT0zoD2oHFw+eVgNOIxgfpa31IZIelXU1UCLsTbK6tglhS/Th3u2ZT8yZzw9vgsW8mMzuwsRH7ZhgETVE= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 156951137903514.531775913825072; Thu, 26 Sep 2019 08:22:59 -0700 (PDT) Received: from localhost ([::1]:39174 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iDVbd-0006ko-F7 for importer@patchew.org; Thu, 26 Sep 2019 11:22:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52378) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iDVX4-00035v-QS for qemu-devel@nongnu.org; Thu, 26 Sep 2019 11:18:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iDVX3-0004bc-QX for qemu-devel@nongnu.org; Thu, 26 Sep 2019 11:18:14 -0400 Received: from mx1.redhat.com ([209.132.183.28]:36388) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iDVX1-0004aI-Am; Thu, 26 Sep 2019 11:18:11 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6DBE9806CD; Thu, 26 Sep 2019 15:18:10 +0000 (UTC) Received: from x1w.redhat.com (unknown [10.40.205.127]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 581475D6B0; Thu, 26 Sep 2019 15:17:57 +0000 (UTC) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 02/11] hw/ide/piix: Convert reset handler to DeviceReset Date: Thu, 26 Sep 2019 17:17:24 +0200 Message-Id: <20190926151733.25349-3-philmd@redhat.com> In-Reply-To: <20190926151733.25349-1-philmd@redhat.com> References: <20190926151733.25349-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Thu, 26 Sep 2019 15:18:10 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Damien Hedde , Peter Maydell , qemu-block@nongnu.org, qemu-trivial@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Markus Armbruster , John Snow Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Convert the reset handler into a proper Device reset method. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/ide/piix.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/hw/ide/piix.c b/hw/ide/piix.c index fba6bc8bff..18b2c3b722 100644 --- a/hw/ide/piix.c +++ b/hw/ide/piix.c @@ -30,7 +30,6 @@ #include "sysemu/block-backend.h" #include "sysemu/blockdev.h" #include "sysemu/dma.h" -#include "sysemu/reset.h" =20 #include "hw/ide/pci.h" #include "trace.h" @@ -103,9 +102,9 @@ static void bmdma_setup_bar(PCIIDEState *d) } } =20 -static void piix3_reset(void *opaque) +static void piix3_ide_reset(DeviceState *dev) { - PCIIDEState *d =3D opaque; + PCIIDEState *d =3D PCI_IDE(dev); PCIDevice *pd =3D PCI_DEVICE(d); uint8_t *pci_conf =3D pd->config; int i; @@ -154,8 +153,6 @@ static void pci_piix_ide_realize(PCIDevice *dev, Error = **errp) =20 pci_conf[PCI_CLASS_PROG] =3D 0x80; // legacy ATA mode =20 - qemu_register_reset(piix3_reset, d); - bmdma_setup_bar(d); pci_register_bar(dev, 4, PCI_BASE_ADDRESS_SPACE_IO, &d->bmdma_bar); =20 @@ -247,6 +244,7 @@ static void piix3_ide_class_init(ObjectClass *klass, vo= id *data) DeviceClass *dc =3D DEVICE_CLASS(klass); PCIDeviceClass *k =3D PCI_DEVICE_CLASS(klass); =20 + dc->reset =3D piix3_ide_reset; k->realize =3D pci_piix_ide_realize; k->exit =3D pci_piix_ide_exitfn; k->vendor_id =3D PCI_VENDOR_ID_INTEL; --=20 2.20.1 From nobody Sun May 5 23:36:04 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1569511602; cv=none; d=zoho.com; s=zohoarc; b=fjVHY8zYW39Eu1P/iyxhqhF2MopBT2IsbboeB6XSIOm+dzW/Q6kMogVoGclDIJTIBbjDTLvvPQubPRElDeTCPnhWSCIM2hdh7Hz7aZd7Mkiccdj4xCLm2m8cBxrA171t0gE31UpYl427+TDvVAuw/nVozIluFyQJgM0Szf1jHY0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569511602; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=MDwfo736C35evAic9T53eLWCqNE0E34K4HL0RIX63uE=; b=Phd/Z0nP2m9mTk3oTbJW8P7v1bQSvMtVZZuI2hdiMpu33I/yFgP1xLy+XG64EJq57+TSt83jnxEKt5tqife0U3eDQdjCXjZh1SuxNPR5yCGADQWE03R+u93I2wxvwrjO9u8dKWGspmSjVzBeyQceHCKkxrB9LAmpqfcBiNimFIk= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1569511602883516.0226985600127; Thu, 26 Sep 2019 08:26:42 -0700 (PDT) Received: from localhost ([::1]:39226 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iDVfD-0003nY-6l for importer@patchew.org; Thu, 26 Sep 2019 11:26:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52435) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iDVXD-00037w-EQ for qemu-devel@nongnu.org; Thu, 26 Sep 2019 11:18:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iDVX9-0004dW-GW for qemu-devel@nongnu.org; Thu, 26 Sep 2019 11:18:21 -0400 Received: from mx1.redhat.com ([209.132.183.28]:36440) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iDVX9-0004ct-Bv; Thu, 26 Sep 2019 11:18:19 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id F41FB806D1; Thu, 26 Sep 2019 15:18:16 +0000 (UTC) Received: from x1w.redhat.com (unknown [10.40.205.127]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0694F61F2D; Thu, 26 Sep 2019 15:18:10 +0000 (UTC) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 03/11] hw/isa/piix4: Convert reset handler to DeviceReset Date: Thu, 26 Sep 2019 17:17:25 +0200 Message-Id: <20190926151733.25349-4-philmd@redhat.com> In-Reply-To: <20190926151733.25349-1-philmd@redhat.com> References: <20190926151733.25349-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Thu, 26 Sep 2019 15:18:17 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Damien Hedde , Peter Maydell , "Michael S. Tsirkin" , qemu-trivial@nongnu.org, Markus Armbruster , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Convert the reset handler into a proper Device reset method. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/isa/piix4.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/hw/isa/piix4.c b/hw/isa/piix4.c index 3294056cd5..890d999abf 100644 --- a/hw/isa/piix4.c +++ b/hw/isa/piix4.c @@ -28,7 +28,6 @@ #include "hw/isa/isa.h" #include "hw/sysbus.h" #include "migration/vmstate.h" -#include "sysemu/reset.h" =20 PCIDevice *piix4_dev; =20 @@ -40,9 +39,9 @@ typedef struct PIIX4State { #define PIIX4_PCI_DEVICE(obj) \ OBJECT_CHECK(PIIX4State, (obj), TYPE_PIIX4_PCI_DEVICE) =20 -static void piix4_reset(void *opaque) +static void piix4_isa_reset(DeviceState *dev) { - PIIX4State *d =3D opaque; + PIIX4State *d =3D PIIX4_PCI_DEVICE(dev); uint8_t *pci_conf =3D d->dev.config; =20 pci_conf[0x04] =3D 0x07; // master, memory and I/O @@ -97,7 +96,6 @@ static void piix4_realize(PCIDevice *dev, Error **errp) return; } piix4_dev =3D &d->dev; - qemu_register_reset(piix4_reset, d); } =20 int piix4_init(PCIBus *bus, ISABus **isa_bus, int devfn) @@ -118,6 +116,7 @@ static void piix4_class_init(ObjectClass *klass, void *= data) k->vendor_id =3D PCI_VENDOR_ID_INTEL; k->device_id =3D PCI_DEVICE_ID_INTEL_82371AB_0; k->class_id =3D PCI_CLASS_BRIDGE_ISA; + dc->reset =3D piix4_isa_reset; dc->desc =3D "ISA bridge"; dc->vmsd =3D &vmstate_piix4; /* --=20 2.20.1 From nobody Sun May 5 23:36:04 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1569511385; cv=none; d=zoho.com; s=zohoarc; b=T4+TKQlS4muFSzhGQI5SrCAmlEDge3w/TiomE5a9yLusA0c1xOpYxrlpJFiaREV4ccR0ueupl/eWUq50TGWfVyhUQ4GIUzoCAP7duER+GXFU2QsORArMUTw/YUFGpmkubx1BkBpebnix5uu9fHLgkjrHsaXE9BGzwR2QGuPp1zU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569511385; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=mTPSZKSluJA83TMDEvA7N9kJUVgotGAxRcm5TZ5ns+8=; b=n3dTbcmDQzz9e1k4PtkK1N1hX/UOXTTEdyaYWum5iEUEQrJjEIhSHKFbgAXKZCgD8gSLp3GGoWDyjE2Xh7fCaaanrYGF8I0rUuLxwnxWqiS2bWpQiiJnfpetqHwQrbB2myirApBN99l4LZMAxYf5ce50fR9rrtbuxvG3moZPdZY= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1569511385765181.51225931047873; Thu, 26 Sep 2019 08:23:05 -0700 (PDT) Received: from localhost ([::1]:39178 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iDVbi-0006qq-PT for importer@patchew.org; Thu, 26 Sep 2019 11:23:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52477) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iDVXG-00039M-IZ for qemu-devel@nongnu.org; Thu, 26 Sep 2019 11:18:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iDVXF-0004fe-F1 for qemu-devel@nongnu.org; Thu, 26 Sep 2019 11:18:26 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38710) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iDVXD-0004eI-CJ; Thu, 26 Sep 2019 11:18:25 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DEF6E315C027; Thu, 26 Sep 2019 15:18:20 +0000 (UTC) Received: from x1w.redhat.com (unknown [10.40.205.127]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 72C895D6B0; Thu, 26 Sep 2019 15:18:17 +0000 (UTC) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 04/11] hw/pci-host/piix: Convert reset handler to DeviceReset Date: Thu, 26 Sep 2019 17:17:26 +0200 Message-Id: <20190926151733.25349-5-philmd@redhat.com> In-Reply-To: <20190926151733.25349-1-philmd@redhat.com> References: <20190926151733.25349-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.41]); Thu, 26 Sep 2019 15:18:20 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Damien Hedde , Peter Maydell , "Michael S. Tsirkin" , qemu-trivial@nongnu.org, Markus Armbruster , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Convert the reset handler into a proper Device reset method. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/pci-host/piix.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/hw/pci-host/piix.c b/hw/pci-host/piix.c index 135c645535..a1cd8b8406 100644 --- a/hw/pci-host/piix.c +++ b/hw/pci-host/piix.c @@ -36,7 +36,6 @@ #include "migration/qemu-file-types.h" #include "migration/vmstate.h" #include "hw/pci-host/pam.h" -#include "sysemu/reset.h" #include "sysemu/runstate.h" #include "hw/i386/ioapic.h" #include "qapi/visitor.h" @@ -562,9 +561,9 @@ static void piix3_write_config_xen(PCIDevice *dev, piix3_write_config(dev, address, val, len); } =20 -static void piix3_reset(void *opaque) +static void piix3_reset(DeviceState *dev) { - PIIX3State *d =3D opaque; + PIIX3State *d =3D PIIX3_PCI_DEVICE(dev); uint8_t *pci_conf =3D d->dev.config; =20 pci_conf[0x04] =3D 0x07; /* master, memory and I/O */ @@ -711,8 +710,6 @@ static void piix3_realize(PCIDevice *dev, Error **errp) "piix3-reset-control", 1); memory_region_add_subregion_overlap(pci_address_space_io(dev), RCR_IOP= ORT, &d->rcr_mem, 1); - - qemu_register_reset(piix3_reset, d); } =20 static void pci_piix3_class_init(ObjectClass *klass, void *data) @@ -723,6 +720,7 @@ static void pci_piix3_class_init(ObjectClass *klass, vo= id *data) dc->desc =3D "ISA bridge"; dc->vmsd =3D &vmstate_piix3; dc->hotpluggable =3D false; + dc->reset =3D piix3_reset; k->realize =3D piix3_realize; k->vendor_id =3D PCI_VENDOR_ID_INTEL; /* 82371SB PIIX3 PCI-to-ISA bridge (Step A1) */ --=20 2.20.1 From nobody Sun May 5 23:36:04 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1569511847; cv=none; d=zoho.com; s=zohoarc; b=iWfmcrKbCsndkdHjIeyoLfFruwkMmafszDXbvSCvKWGoAa+yIS4fttxX+mUOj3OQ6qIDpaahH4O+bhYgqK+mKn9sXc6HOzYtXpkaTUL3gbB5QT27kpiWm1KOAEYKpA1clR+RPJf3fAYDstS0auOBf47kQ/wmEq4ogYSbkOG5+3w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569511847; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=8/3bumGTCy+0AkSHC5+lzt5CXBAc9Hj2fXdSepUHjwc=; b=dWEmHWBuDq2Urc1M65KOECcvO9rzucVHmkb5s1mMkq7vEwWpWRmLRZ749JmrSEEVXsIGKCIJs+1Kaq8KoJBpGMYizvU5XVhw6HQNWiSGQrsNeUO/5dN+cDvE4f2DtCF8NNwCbNNhR53lf8fUqZKrmNTk9A9l7yVjwmBsiZwzggs= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1569511847042292.8200282473075; Thu, 26 Sep 2019 08:30:47 -0700 (PDT) Received: from localhost ([::1]:39336 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iDVj8-0000BK-JH for importer@patchew.org; Thu, 26 Sep 2019 11:30:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52558) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iDVXN-0003JB-T9 for qemu-devel@nongnu.org; Thu, 26 Sep 2019 11:18:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iDVXM-0004ka-T7 for qemu-devel@nongnu.org; Thu, 26 Sep 2019 11:18:33 -0400 Received: from mx1.redhat.com ([209.132.183.28]:32872) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iDVXK-0004j2-2p; Thu, 26 Sep 2019 11:18:30 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 450BE30A5A54; Thu, 26 Sep 2019 15:18:29 +0000 (UTC) Received: from x1w.redhat.com (unknown [10.40.205.127]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 56FA05D6B0; Thu, 26 Sep 2019 15:18:21 +0000 (UTC) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 05/11] hw/ide/sii3112: Convert reset handler to DeviceReset Date: Thu, 26 Sep 2019 17:17:27 +0200 Message-Id: <20190926151733.25349-6-philmd@redhat.com> In-Reply-To: <20190926151733.25349-1-philmd@redhat.com> References: <20190926151733.25349-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Thu, 26 Sep 2019 15:18:29 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Damien Hedde , Peter Maydell , qemu-block@nongnu.org, qemu-trivial@nongnu.org, John Snow , Markus Armbruster , qemu-ppc@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Convert the reset handler into a proper Device reset method. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/ide/sii3112.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/hw/ide/sii3112.c b/hw/ide/sii3112.c index 2181260531..06605d7af2 100644 --- a/hw/ide/sii3112.c +++ b/hw/ide/sii3112.c @@ -15,7 +15,6 @@ #include "qemu/osdep.h" #include "hw/ide/pci.h" #include "qemu/module.h" -#include "sysemu/reset.h" #include "trace.h" =20 #define TYPE_SII3112_PCI "sii3112" @@ -237,9 +236,9 @@ static void sii3112_set_irq(void *opaque, int channel, = int level) sii3112_update_irq(s); } =20 -static void sii3112_reset(void *opaque) +static void sii3112_reset(DeviceState *dev) { - SiI3112PCIState *s =3D opaque; + SiI3112PCIState *s =3D SII3112_PCI(dev); int i; =20 for (i =3D 0; i < 2; i++) { @@ -290,7 +289,6 @@ static void sii3112_pci_realize(PCIDevice *dev, Error *= *errp) s->bmdma[i].bus =3D &s->bus[i]; ide_register_restart_cb(&s->bus[i]); } - qemu_register_reset(sii3112_reset, s); } =20 static void sii3112_pci_class_init(ObjectClass *klass, void *data) @@ -303,6 +301,7 @@ static void sii3112_pci_class_init(ObjectClass *klass, = void *data) pd->class_id =3D PCI_CLASS_STORAGE_RAID; pd->revision =3D 1; pd->realize =3D sii3112_pci_realize; + dc->reset =3D sii3112_reset; dc->desc =3D "SiI3112A SATA controller"; set_bit(DEVICE_CATEGORY_STORAGE, dc->categories); } --=20 2.20.1 From nobody Sun May 5 23:36:04 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1569511858; cv=none; d=zoho.com; s=zohoarc; b=k50gduJhaoB2V6MkY/hHIiOvWUHGxdICUsK+YpEcS87tGWBqBnAsQkOzNSoq8biQGT2hBXuJeCWT2+PgSCfj6MTJam8omXlor9yr2+/sHWL3zNHfIuGATC8JiYk97M7OFcLudGzKqjnURFDDLnMyQs8UL38FLbK/lMKcu9ESLdA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569511858; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=OVKZU59hBJiyMfzT0AKB/pfXPldOdQICzsbNJ3WThUo=; b=kLER/56ImnjowV+WWeA1nvXCJdCc4NLQyhDCB+iaOiwt0g2StYAX5iPUB8MAGp3NukGT/uNwAxme7mbB7f4gIlS6zYhehEV3EzULAFDqROQ2ZH6ILx7hLE38oOKfbMzw+3B8mkJ4U1js5eZaiXQB0+BWL86euYZwJqmzNislQR0= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1569511858979502.65239583053176; Thu, 26 Sep 2019 08:30:58 -0700 (PDT) Received: from localhost ([::1]:39338 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iDVjM-0000G4-Ft for importer@patchew.org; Thu, 26 Sep 2019 11:30:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52644) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iDVXU-0003Nh-Ky for qemu-devel@nongnu.org; Thu, 26 Sep 2019 11:18:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iDVXR-0004mc-V3 for qemu-devel@nongnu.org; Thu, 26 Sep 2019 11:18:40 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55946) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iDVXN-0004kh-VC; Thu, 26 Sep 2019 11:18:34 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2D73A155E0; Thu, 26 Sep 2019 15:18:33 +0000 (UTC) Received: from x1w.redhat.com (unknown [10.40.205.127]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BABAE5D6B0; Thu, 26 Sep 2019 15:18:29 +0000 (UTC) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 06/11] hw/ide/via82c: Convert reset handler to DeviceReset Date: Thu, 26 Sep 2019 17:17:28 +0200 Message-Id: <20190926151733.25349-7-philmd@redhat.com> In-Reply-To: <20190926151733.25349-1-philmd@redhat.com> References: <20190926151733.25349-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Thu, 26 Sep 2019 15:18:33 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Damien Hedde , Peter Maydell , qemu-block@nongnu.org, qemu-trivial@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Markus Armbruster , John Snow Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Convert the reset handler into a proper Device reset method. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/ide/via.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/hw/ide/via.c b/hw/ide/via.c index 7087dc676e..053622bd82 100644 --- a/hw/ide/via.c +++ b/hw/ide/via.c @@ -29,7 +29,6 @@ #include "migration/vmstate.h" #include "qemu/module.h" #include "sysemu/dma.h" -#include "sysemu/reset.h" =20 #include "hw/ide/pci.h" #include "trace.h" @@ -120,10 +119,10 @@ static void via_ide_set_irq(void *opaque, int n, int = level) } } =20 -static void via_ide_reset(void *opaque) +static void via_ide_reset(DeviceState *dev) { - PCIIDEState *d =3D opaque; - PCIDevice *pd =3D PCI_DEVICE(d); + PCIIDEState *d =3D PCI_IDE(dev); + PCIDevice *pd =3D PCI_DEVICE(dev); uint8_t *pci_conf =3D pd->config; int i; =20 @@ -172,8 +171,6 @@ static void via_ide_realize(PCIDevice *dev, Error **err= p) pci_set_long(pci_conf + PCI_CAPABILITY_LIST, 0x000000c0); dev->wmask[PCI_INTERRUPT_LINE] =3D 0xf; =20 - qemu_register_reset(via_ide_reset, d); - memory_region_init_io(&d->data_bar[0], OBJECT(d), &pci_ide_data_le_ops, &d->bus[0], "via-ide0-data", 8); pci_register_bar(dev, 0, PCI_BASE_ADDRESS_SPACE_IO, &d->data_bar[0]); @@ -229,6 +226,7 @@ static void via_ide_class_init(ObjectClass *klass, void= *data) DeviceClass *dc =3D DEVICE_CLASS(klass); PCIDeviceClass *k =3D PCI_DEVICE_CLASS(klass); =20 + dc->reset =3D via_ide_reset; k->realize =3D via_ide_realize; k->exit =3D via_ide_exitfn; k->vendor_id =3D PCI_VENDOR_ID_VIA; --=20 2.20.1 From nobody Sun May 5 23:36:04 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1569511616; cv=none; d=zoho.com; s=zohoarc; b=f1uoREPBh7ayQ8U1UqrpY0UEJGsoQrlyfBux3ttmJH0Oj6rctmos94cIzqMdFpQGxInLeANnPR6M1d++pn2a9jE+oOqLTS6RhAc3KLp6owfMePNzBr2WzCWzjD99Tu+ZVMG8Q4AkwiQNneXWlxzGPQjYhqF6bkqCpbH92t5jxYQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569511616; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=ODSyF7tvoDcjfLx4hkPk6ea4B/UD0qU97FLOBcODYAU=; b=nXR5N26ZvxgU5BEh1giQkEn7d33Hi1w0mJjARoxgnGolWZV6Pi1mXHeXYILA6GhWNv7JJM7k827zgwI8r/XUQ6lN5QStbe5oqur+Ki2IbePbfd2b9e6BE/mjnPjzjHWuG4yEsZi9yAtg/+ZLBqMFKjyVbe4mjunEaq6dpSVuuug= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1569511616269684.857777327343; Thu, 26 Sep 2019 08:26:56 -0700 (PDT) Received: from localhost ([::1]:39228 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iDVfR-00047R-MH for importer@patchew.org; Thu, 26 Sep 2019 11:26:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52646) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iDVXU-0003Nj-Lo for qemu-devel@nongnu.org; Thu, 26 Sep 2019 11:18:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iDVXS-0004mo-3t for qemu-devel@nongnu.org; Thu, 26 Sep 2019 11:18:40 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45200) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iDVXR-0004mJ-VM; Thu, 26 Sep 2019 11:18:38 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A258488134E; Thu, 26 Sep 2019 15:18:36 +0000 (UTC) Received: from x1w.redhat.com (unknown [10.40.205.127]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B93BE61F24; Thu, 26 Sep 2019 15:18:33 +0000 (UTC) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 07/11] hw/isa/vt82c686: Convert reset handler to DeviceReset Date: Thu, 26 Sep 2019 17:17:29 +0200 Message-Id: <20190926151733.25349-8-philmd@redhat.com> In-Reply-To: <20190926151733.25349-1-philmd@redhat.com> References: <20190926151733.25349-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.69]); Thu, 26 Sep 2019 15:18:36 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Damien Hedde , Peter Maydell , qemu-trivial@nongnu.org, Markus Armbruster , Aleksandar Rikalo , Aleksandar Markovic , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Convert the reset handler into a proper Device reset method. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/isa/vt82c686.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/hw/isa/vt82c686.c b/hw/isa/vt82c686.c index 50bd28fa82..616f67f347 100644 --- a/hw/isa/vt82c686.c +++ b/hw/isa/vt82c686.c @@ -23,7 +23,6 @@ #include "hw/isa/apm.h" #include "hw/acpi/acpi.h" #include "hw/i2c/pm_smbus.h" -#include "sysemu/reset.h" #include "qemu/module.h" #include "qemu/timer.h" #include "exec/address-spaces.h" @@ -116,11 +115,10 @@ static const MemoryRegionOps superio_ops =3D { }, }; =20 -static void vt82c686b_reset(void * opaque) +static void vt82c686b_isa_reset(DeviceState *dev) { - PCIDevice *d =3D opaque; - uint8_t *pci_conf =3D d->config; - VT82C686BState *vt82c =3D VT82C686B_DEVICE(d); + VT82C686BState *vt82c =3D VT82C686B_DEVICE(dev); + uint8_t *pci_conf =3D vt82c->dev.config; =20 pci_set_long(pci_conf + PCI_CAPABILITY_LIST, 0x000000c0); pci_set_word(pci_conf + PCI_COMMAND, PCI_COMMAND_IO | PCI_COMMAND_MEMO= RY | @@ -476,8 +474,6 @@ static void vt82c686b_realize(PCIDevice *d, Error **err= p) * But we do not emulate a floppy, so just set it here. */ memory_region_add_subregion(isa_bus->address_space_io, 0x3f0, &vt82c->superio); - - qemu_register_reset(vt82c686b_reset, d); } =20 ISABus *vt82c686b_isa_init(PCIBus *bus, int devfn) @@ -501,6 +497,7 @@ static void via_class_init(ObjectClass *klass, void *da= ta) k->device_id =3D PCI_DEVICE_ID_VIA_ISA_BRIDGE; k->class_id =3D PCI_CLASS_BRIDGE_ISA; k->revision =3D 0x40; + dc->reset =3D vt82c686b_isa_reset; dc->desc =3D "ISA bridge"; dc->vmsd =3D &vmstate_via; /* --=20 2.20.1 From nobody Sun May 5 23:36:04 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1569511934; cv=none; d=zoho.com; s=zohoarc; b=VpdwGvGm9zZ5poRGryRsJ/+TxX1eDsKfJQ92RtpZ5eCaK8MaElAUsYTADakwLKVCuk8gV2nntAqZf+ZQcBKhxhdSkD0RkkMu7glNeQ31k1pQhuno38uqwH6UWF/IDroovmMJ7eRB9r0pyC5SBJQwKKpsmAJeHDtgBF8VZUoX1Fc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569511934; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=4JF6vdoVf8WzYA5BKjoxEidrhJo7oUDw8cQ5uuL5j4M=; b=LEZFnCIyrxfbmqV6SlDLhsKrgjiZBhNaIEDt03IPy5iBUNL4B+AHcQkFiz+byObVJfq3hN0dbrNoMRdPucQZeh+w8BJ+RaugbYuVsX0wviv8ZFw+hbFzYeKtaxmxTKAkR/pxdW2enAwu1HjswhI6BbeG/QMDTEM91D8OG3+OOrQ= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1569511934599852.3557303086701; Thu, 26 Sep 2019 08:32:14 -0700 (PDT) Received: from localhost ([::1]:39346 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iDVkZ-00011o-1L for importer@patchew.org; Thu, 26 Sep 2019 11:32:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52807) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iDVXp-0003W8-Jn for qemu-devel@nongnu.org; Thu, 26 Sep 2019 11:19:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iDVXf-0004tE-Lo for qemu-devel@nongnu.org; Thu, 26 Sep 2019 11:18:55 -0400 Received: from mx1.redhat.com ([209.132.183.28]:42862) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iDVXa-0004px-3j; Thu, 26 Sep 2019 11:18:46 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 20F2630BCB97; Thu, 26 Sep 2019 15:18:44 +0000 (UTC) Received: from x1w.redhat.com (unknown [10.40.205.127]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 195335D6B0; Thu, 26 Sep 2019 15:18:36 +0000 (UTC) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 08/11] hw/input/lm832x: Convert reset handler to DeviceReset Date: Thu, 26 Sep 2019 17:17:30 +0200 Message-Id: <20190926151733.25349-9-philmd@redhat.com> In-Reply-To: <20190926151733.25349-1-philmd@redhat.com> References: <20190926151733.25349-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.49]); Thu, 26 Sep 2019 15:18:44 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Damien Hedde , Peter Maydell , qemu-trivial@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Markus Armbruster , qemu-arm@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Convert the reset handler into a proper Device reset method. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/input/lm832x.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/hw/input/lm832x.c b/hw/input/lm832x.c index a37eb854b9..aa629ddbf1 100644 --- a/hw/input/lm832x.c +++ b/hw/input/lm832x.c @@ -24,7 +24,6 @@ #include "migration/vmstate.h" #include "qemu/module.h" #include "qemu/timer.h" -#include "sysemu/reset.h" #include "ui/console.h" =20 #define TYPE_LM8323 "lm8323" @@ -94,8 +93,10 @@ static void lm_kbd_gpio_update(LM823KbdState *s) { } =20 -static void lm_kbd_reset(LM823KbdState *s) +static void lm_kbd_reset(DeviceState *dev) { + LM823KbdState *s =3D LM8323(dev); + s->config =3D 0x80; s->status =3D INT_NOINIT; s->acttime =3D 125; @@ -273,7 +274,7 @@ static void lm_kbd_write(LM823KbdState *s, int reg, int= byte, uint8_t value) =20 case LM832x_CMD_RESET: if (value =3D=3D 0xaa) - lm_kbd_reset(s); + lm_kbd_reset(DEVICE(s)); else lm_kbd_error(s, ERR_BADPAR); s->reg =3D LM832x_GENERAL_ERROR; @@ -476,10 +477,6 @@ static void lm8323_realize(DeviceState *dev, Error **e= rrp) s->pwm.tm[1] =3D timer_new_ns(QEMU_CLOCK_VIRTUAL, lm_kbd_pwm1_tick, s); s->pwm.tm[2] =3D timer_new_ns(QEMU_CLOCK_VIRTUAL, lm_kbd_pwm2_tick, s); qdev_init_gpio_out(dev, &s->nirq, 1); - - lm_kbd_reset(s); - - qemu_register_reset((void *) lm_kbd_reset, s); } =20 void lm832x_key_event(DeviceState *dev, int key, int state) @@ -507,6 +504,7 @@ static void lm8323_class_init(ObjectClass *klass, void = *data) DeviceClass *dc =3D DEVICE_CLASS(klass); I2CSlaveClass *k =3D I2C_SLAVE_CLASS(klass); =20 + dc->reset =3D lm_kbd_reset; dc->realize =3D lm8323_realize; k->event =3D lm_i2c_event; k->recv =3D lm_i2c_rx; --=20 2.20.1 From nobody Sun May 5 23:36:04 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1569512219; cv=none; d=zoho.com; s=zohoarc; b=jXhDb4WjRM1XZQ8rbLSZqfs6woymapCh/6oN5g+s7UdcJikzaxzsDt6iqZxZ2ljgqLdhh0QF7gUlGOzyUNa1vQxtORDS8+dbNzu+O2h5F4i2l78IVJ4fHlNVH9CmQ/cFvjA7YJcPsSQSRwzNCd0akCBw2pLsFiQv5Zi0RhcPTwc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569512219; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=ZyrxBBHNzhobB5rgiPLtgJY8VyVSsEBiAZ/KwmM0WFI=; b=C/T4rlONTc17HGfDKcqBkEy00B11erBoMoc7zspp98qzzX4Uy3p4sQtR3McCAoTiQqVUsTgz6QcdXlP34yAcHFgTY/v3uW6lZhlPHyK9I1bPZ3ch94rKMwfslASZj0BcXnfQuo1LVLOBF0Jg1KHmlX9tumLvc8fFtROvibU55qo= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1569512219916897.1281976275221; Thu, 26 Sep 2019 08:36:59 -0700 (PDT) Received: from localhost ([::1]:39486 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iDVp8-00053K-1M for importer@patchew.org; Thu, 26 Sep 2019 11:36:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52777) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iDVXf-0003T6-Pd for qemu-devel@nongnu.org; Thu, 26 Sep 2019 11:18:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iDVXd-0004sP-Ot for qemu-devel@nongnu.org; Thu, 26 Sep 2019 11:18:51 -0400 Received: from mx1.redhat.com ([209.132.183.28]:58748) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iDVXd-0004rh-Ha; Thu, 26 Sep 2019 11:18:49 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 594DB30860D6; Thu, 26 Sep 2019 15:18:47 +0000 (UTC) Received: from x1w.redhat.com (unknown [10.40.205.127]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 909415D6B0; Thu, 26 Sep 2019 15:18:44 +0000 (UTC) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 09/11] hw/pci-host/bonito: Convert reset handler to DeviceReset Date: Thu, 26 Sep 2019 17:17:31 +0200 Message-Id: <20190926151733.25349-10-philmd@redhat.com> In-Reply-To: <20190926151733.25349-1-philmd@redhat.com> References: <20190926151733.25349-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.44]); Thu, 26 Sep 2019 15:18:47 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Damien Hedde , Peter Maydell , qemu-trivial@nongnu.org, Markus Armbruster , Aleksandar Rikalo , Aleksandar Markovic , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Convert the reset handler into a proper Device reset method. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/pci-host/bonito.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/hw/pci-host/bonito.c b/hw/pci-host/bonito.c index ceee463a11..aaba96bd13 100644 --- a/hw/pci-host/bonito.c +++ b/hw/pci-host/bonito.c @@ -45,7 +45,6 @@ #include "hw/mips/mips.h" #include "hw/pci/pci_host.h" #include "migration/vmstate.h" -#include "sysemu/reset.h" #include "sysemu/runstate.h" #include "exec/address-spaces.h" =20 @@ -570,9 +569,9 @@ static int pci_bonito_map_irq(PCIDevice * pci_dev, int = irq_num) } } =20 -static void bonito_reset(void *opaque) +static void bonito_reset(DeviceState *dev) { - PCIBonitoState *s =3D opaque; + PCIBonitoState *s =3D PCI_BONITO(dev); =20 /* set the default value of north bridge registers */ =20 @@ -671,8 +670,6 @@ static void bonito_realize(PCIDevice *dev, Error **errp) pci_set_byte(dev->config + PCI_INTERRUPT_PIN, 0x01); pci_set_byte(dev->config + PCI_MIN_GNT, 0x3c); pci_set_byte(dev->config + PCI_MAX_LAT, 0x00); - - qemu_register_reset(bonito_reset, s); } =20 PCIBus *bonito_init(qemu_irq *pic) @@ -703,6 +700,7 @@ static void bonito_class_init(ObjectClass *klass, void = *data) DeviceClass *dc =3D DEVICE_CLASS(klass); PCIDeviceClass *k =3D PCI_DEVICE_CLASS(klass); =20 + dc->reset =3D bonito_reset; k->realize =3D bonito_realize; k->vendor_id =3D 0xdf53; k->device_id =3D 0x00d5; --=20 2.20.1 From nobody Sun May 5 23:36:04 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1569512238; cv=none; d=zoho.com; s=zohoarc; b=a5Lk78NAboQODPfSiWJEXlDfGePG6jlzjgGDra/9fP7Ya2NZ9EQeuzgVCob9z9gXVcFgkilsbQA1UpGejgEcsvdt1xdmI5cz3pXeZM0aQtUbKyBuJqi2Wu01kLnm8JIM2G7+L5lioSzV4TKPQmmLmBcAMPEWzFfZVw/zKkTcyas= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569512238; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=opIRml8eu9PM0DVvdUyTYZ/pbI9lL60S0RVPWRjmqK4=; b=g4EBcmZ09px3MZXxgBDJyoHMwN2RT8DYKoFUURlNENhYgo/7xm9J7D9+QhVcA3QL7tZLUyPCsqQTO7WBDxM/yOZlIeWycKG+p7EJ+4mdDQ2a68UEXp2NzOgZFfueHyO1Yi00GxECW3BDND5BFw8HXXa8tFy2WJlUEsvbXqjOpTg= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1569512238489273.50401969805023; Thu, 26 Sep 2019 08:37:18 -0700 (PDT) Received: from localhost ([::1]:39508 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iDVpT-0005SG-2N for importer@patchew.org; Thu, 26 Sep 2019 11:37:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52909) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iDVY4-0003bC-8y for qemu-devel@nongnu.org; Thu, 26 Sep 2019 11:19:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iDVY1-0004zV-GH for qemu-devel@nongnu.org; Thu, 26 Sep 2019 11:19:14 -0400 Received: from mx1.redhat.com ([209.132.183.28]:2497) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iDVXy-0004u2-4O; Thu, 26 Sep 2019 11:19:11 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 862EA7BDA5; Thu, 26 Sep 2019 15:18:52 +0000 (UTC) Received: from x1w.redhat.com (unknown [10.40.205.127]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E206D5D6B0; Thu, 26 Sep 2019 15:18:47 +0000 (UTC) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 10/11] hw/timer/etraxfs: Convert reset handler to DeviceReset Date: Thu, 26 Sep 2019 17:17:32 +0200 Message-Id: <20190926151733.25349-11-philmd@redhat.com> In-Reply-To: <20190926151733.25349-1-philmd@redhat.com> References: <20190926151733.25349-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Thu, 26 Sep 2019 15:18:52 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Damien Hedde , Peter Maydell , qemu-trivial@nongnu.org, Markus Armbruster , "Edgar E. Iglesias" , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Convert the reset handler into a proper Device reset method. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/timer/etraxfs_timer.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/hw/timer/etraxfs_timer.c b/hw/timer/etraxfs_timer.c index d62025b879..c2623ecd59 100644 --- a/hw/timer/etraxfs_timer.c +++ b/hw/timer/etraxfs_timer.c @@ -24,7 +24,6 @@ =20 #include "qemu/osdep.h" #include "hw/sysbus.h" -#include "sysemu/reset.h" #include "sysemu/runstate.h" #include "qemu/main-loop.h" #include "qemu/module.h" @@ -307,9 +306,9 @@ static const MemoryRegionOps timer_ops =3D { } }; =20 -static void etraxfs_timer_reset(void *opaque) +static void etraxfs_timer_reset(DeviceState *dev) { - ETRAXTimerState *t =3D opaque; + ETRAXTimerState *t =3D ETRAX_TIMER(dev); =20 ptimer_stop(t->ptimer_t0); ptimer_stop(t->ptimer_t1); @@ -338,13 +337,13 @@ static void etraxfs_timer_realize(DeviceState *dev, E= rror **errp) memory_region_init_io(&t->mmio, OBJECT(t), &timer_ops, t, "etraxfs-timer", 0x5c); sysbus_init_mmio(sbd, &t->mmio); - qemu_register_reset(etraxfs_timer_reset, t); } =20 static void etraxfs_timer_class_init(ObjectClass *klass, void *data) { DeviceClass *dc =3D DEVICE_CLASS(klass); =20 + dc->reset =3D etraxfs_timer_reset; dc->realize =3D etraxfs_timer_realize; } =20 --=20 2.20.1 From nobody Sun May 5 23:36:04 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1569512509; cv=none; d=zoho.com; s=zohoarc; b=bB8qRsbUhVhdVEx1yPuKeBhm1wqwUSsgjVwvZDAt9dp6kDFO7M5EUaa2z494QuPTVDOIWNR3hbchHfReBtExdzXpuidh09vuwCpjsc5hhJxFRZIVG0gwDjatYZqfoCtPNqW4g3TSESyreErbhqldbBxSoA7WdX2cAq3gXW3Nc0E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569512509; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=k5ZubVduT2TqZXdbuyq2sdutRCVpF/LO/KMfToHF/PY=; b=bHmxykrBl3W16lGU9zIFXBi2GugrLE04dXZ4hxJdsvhiUTFhYdmd6AeE9lsQK52ZRJdFGQyQueIiz+Wa4jWu5+B+N2UnRQ/q3wOASz06c41HWQMPBsrAL74QbS1mn5s4/KR7yp5jHeyl8mW5CRzMFBiGMVS9trf7Ac4ht4g8Ffo= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1569512509432934.0057425579688; Thu, 26 Sep 2019 08:41:49 -0700 (PDT) Received: from localhost ([::1]:39606 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iDVto-0000Yk-BD for importer@patchew.org; Thu, 26 Sep 2019 11:41:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52908) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iDVY4-0003bA-8c for qemu-devel@nongnu.org; Thu, 26 Sep 2019 11:19:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iDVY1-0004yr-9v for qemu-devel@nongnu.org; Thu, 26 Sep 2019 11:19:14 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33982) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iDVXx-0004vd-37; Thu, 26 Sep 2019 11:19:09 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D80AE10DCC9D; Thu, 26 Sep 2019 15:18:59 +0000 (UTC) Received: from x1w.redhat.com (unknown [10.40.205.127]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0E7A15D6B0; Thu, 26 Sep 2019 15:18:52 +0000 (UTC) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 11/11] hw/misc/vmcoreinfo: Convert reset handler to DeviceReset Date: Thu, 26 Sep 2019 17:17:33 +0200 Message-Id: <20190926151733.25349-12-philmd@redhat.com> In-Reply-To: <20190926151733.25349-1-philmd@redhat.com> References: <20190926151733.25349-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.64]); Thu, 26 Sep 2019 15:18:59 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Damien Hedde , Peter Maydell , qemu-trivial@nongnu.org, Markus Armbruster , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Convert the reset handler into a proper Device reset method. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/misc/vmcoreinfo.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/hw/misc/vmcoreinfo.c b/hw/misc/vmcoreinfo.c index 326a3ce8f4..a1c4847cdf 100644 --- a/hw/misc/vmcoreinfo.c +++ b/hw/misc/vmcoreinfo.c @@ -13,7 +13,6 @@ #include "qemu/osdep.h" #include "qapi/error.h" #include "qemu/module.h" -#include "sysemu/reset.h" #include "hw/nvram/fw_cfg.h" #include "migration/vmstate.h" #include "hw/misc/vmcoreinfo.h" @@ -26,7 +25,7 @@ static void fw_cfg_vmci_write(void *dev, off_t offset, si= ze_t len) && s->vmcoreinfo.guest_format !=3D FW_CFG_VMCOREINFO_FORMAT_NONE; } =20 -static void vmcoreinfo_reset(void *dev) +static void vmcoreinfo_reset(DeviceState *dev) { VMCoreInfoState *s =3D VMCOREINFO(dev); =20 @@ -61,7 +60,6 @@ static void vmcoreinfo_realize(DeviceState *dev, Error **= errp) NULL, fw_cfg_vmci_write, s, &s->vmcoreinfo, sizeof(s->vmcoreinfo), false); =20 - qemu_register_reset(vmcoreinfo_reset, dev); vmcoreinfo_state =3D s; } =20 @@ -84,6 +82,7 @@ static void vmcoreinfo_device_class_init(ObjectClass *kla= ss, void *data) DeviceClass *dc =3D DEVICE_CLASS(klass); =20 dc->vmsd =3D &vmstate_vmcoreinfo; + dc->reset =3D vmcoreinfo_reset; dc->realize =3D vmcoreinfo_realize; dc->hotpluggable =3D false; set_bit(DEVICE_CATEGORY_MISC, dc->categories); --=20 2.20.1