[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Xen-devel] [PATCH 13/32] piix4: convert reset function to QOM
- To: Philippe Mathieu-Daudé <philmd@xxxxxxxxxx>
- From: Aleksandar Markovic <aleksandar.m.mail@xxxxxxxxx>
- Date: Thu, 17 Oct 2019 17:08:22 +0200
- Cc: Laurent Vivier <lvivier@xxxxxxxxxx>, Thomas Huth <thuth@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Eduardo Habkost <ehabkost@xxxxxxxxxx>, "kvm@xxxxxxxxxxxxxxx" <kvm@xxxxxxxxxxxxxxx>, Paul Durrant <paul@xxxxxxx>, "Michael S. Tsirkin" <mst@xxxxxxxxxx>, "qemu-devel@xxxxxxxxxx" <qemu-devel@xxxxxxxxxx>, Igor Mammedov <imammedo@xxxxxxxxxx>, Hervé Poussineau <hpoussin@xxxxxxxxxxx>, Aleksandar Markovic <amarkovic@xxxxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Anthony Perard <anthony.perard@xxxxxxxxxx>, Paolo Bonzini <pbonzini@xxxxxxxxxx>, Aleksandar Rikalo <aleksandar.rikalo@xxxxxxxxx>, Aurelien Jarno <aurelien@xxxxxxxxxxx>, Richard Henderson <rth@xxxxxxxxxxx>
- Delivery-date: Thu, 17 Oct 2019 15:08:29 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On Tuesday, October 15, 2019, Philippe Mathieu-Daudé <philmd@xxxxxxxxxx> wrote:
From: Hervé Poussineau <hpoussin@xxxxxxxxxxx>
Acked-by: Michael S. Tsirkin <mst@xxxxxxxxxx>
Acked-by: Paolo Bonzini <pbonzini@xxxxxxxxxx>
Signed-off-by: Hervé Poussineau <hpoussin@xxxxxxxxxxx>
Message-Id: <20180106153730.30313-15-hpoussin@xxxxxxxxxxx>
Signed-off-by: Philippe Mathieu-Daudé <philmd@xxxxxxxxxx>
---
hw/isa/piix4.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/hw/isa/piix4.c b/hw/isa/piix4.c
index c3a2bd0d70..8998b0ca47 100644
--- a/hw/isa/piix4.c
+++ b/hw/isa/piix4.c
@@ -48,10 +48,10 @@ typedef struct PIIX4State {
#define PIIX4_PCI_DEVICE(obj) \
OBJECT_CHECK(PIIX4State, (obj), TYPE_PIIX4_PCI_DEVICE)
-static void piix4_reset(void *opaque)
+static void piix4_reset(DeviceState *dev)
{
- PIIX4State *d = opaque;
- uint8_t *pci_conf = d->dev.config;
+ PIIX4State *s = PIIX4_PCI_DEVICE(dev);
+ uint8_t *pci_conf = s->dev.config;
pci_conf[0x04] = 0x07; // master, memory and I/O
pci_conf[0x05] = 0x00;
@@ -165,7 +165,6 @@ static void piix4_realize(PCIDevice *pci_dev, Error **errp)
isa_bus_irqs(isa_bus, s->isa);
piix4_dev = pci_dev;
- qemu_register_reset(piix4_reset, s);
}
static void piix4_class_init(ObjectClass *klass, void *data)
@@ -177,6 +176,7 @@ static void piix4_class_init(ObjectClass *klass, void *data)
k->vendor_id = PCI_VENDOR_ID_INTEL;
k->device_id = PCI_DEVICE_ID_INTEL_82371AB_0;
k->class_id = PCI_CLASS_BRIDGE_ISA;
+ dc->reset = piix4_reset;
dc->desc = "ISA bridge";
dc->vmsd = &vmstate_piix4;
/*
--
2.21.0
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel
|