diff options
author | Glauber Costa <glommer@redhat.com> | 2009-11-05 16:05:15 -0200 |
---|---|---|
committer | Blue Swirl <blauwirbel@gmail.com> | 2009-11-07 08:06:58 +0000 |
commit | c169998802505c244b8bcad562633f29de7d74a4 (patch) | |
tree | 70c88e1184c0b4e77b1b4997250cc418d07cde8b /hw/rtl8139.c | |
parent | vga: fix line comparison (diff) | |
download | qemu-kvm-c169998802505c244b8bcad562633f29de7d74a4.tar.gz qemu-kvm-c169998802505c244b8bcad562633f29de7d74a4.tar.bz2 qemu-kvm-c169998802505c244b8bcad562633f29de7d74a4.zip |
v3: don't call reset functions on cpu initialization
There is absolutely no need to call reset functions when initializing
devices. Since we are already registering them, calling qemu_system_reset()
should suffice. Actually, it is what happens when we reboot the machine,
and using the same process instead of a special case semantics will even
allow us to find bugs easier.
Furthermore, the fact that we initialize things like the cpu quite early,
leads to the need to introduce synchronization stuff like qemu_system_cond.
This patch removes it entirely. All we need to do is call qemu_system_reset()
only when we're already sure the system is up and running
I tested it with qemu (with and without io-thread) and qemu-kvm, and it
seems to be doing okay - although qemu-kvm uses a slightly different patch.
[ v2: user mode still needs cpu_reset, so put it in ifdef. ]
[ v3: leave qemu_system_cond for now. ]
Signed-off-by: Glauber Costa <glommer@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'hw/rtl8139.c')
-rw-r--r-- | hw/rtl8139.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/rtl8139.c b/hw/rtl8139.c index d26df4848..27cc618e0 100644 --- a/hw/rtl8139.c +++ b/hw/rtl8139.c @@ -3331,7 +3331,7 @@ static int pci_rtl8139_init(PCIDevice *dev) PCI_ADDRESS_SPACE_MEM, rtl8139_mmio_map); qemu_macaddr_default_if_unset(&s->conf.macaddr); - rtl8139_reset(&s->dev.qdev); + s->vc = qemu_new_vlan_client(NET_CLIENT_TYPE_NIC, s->conf.vlan, s->conf.peer, dev->qdev.info->name, dev->qdev.id, |