[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [qemu-xen-unstable] pass-through: non-idempotent __insert_to_pci_slot()



commit af000130f7ac0eb2524cde7f021f0dce9abed027
Author: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
Date:   Wed Jun 3 15:38:45 2009 +0100

    pass-through: non-idempotent __insert_to_pci_slot()
    
    As of "qemu-xen: hot-plug PCI devices at boot-time" register_real_dev()
    no longer needs to call __insert_to_pci_slot() and thus there
    is no need for __insert_to_pci_slot() to be idempotent.
    
    This is because register_real_dev()'s now only has one caller,
    power_on_php_slot(), which always  passes a valid e_slot to
    register_real_dev().
    
    Cc: Masaki Kanno <kanno.masaki@xxxxxxxxxxxxxx>
    Cc: Edwin Zhai <edwin.zhai@xxxxxxxxx>
    Signed-off-by: Simon Horman <horms@xxxxxxxxxxxx>
---
 hw/pass-through.c |    9 ---------
 1 files changed, 0 insertions(+), 9 deletions(-)

diff --git a/hw/pass-through.c b/hw/pass-through.c
index a5b34ff..cf04924 100644
--- a/hw/pass-through.c
+++ b/hw/pass-through.c
@@ -917,9 +917,6 @@ static int __insert_to_pci_slot(int bus, int dev, int func, 
int slot,
         if ( !test_pci_slot(slot) &&
              !pci_devfn_in_use(e_bus, PCI_DEVFN(slot, 0)) )
             goto found;
-        if ( pci_slot_match(bus, dev, func, slot) )
-            /* The slot is already here, just return */
-            return slot;
         return -2;
     }
 
@@ -3987,12 +3984,6 @@ static struct pt_dev * register_real_device(PCIBus 
*e_bus,
     pci_fill_info(pci_dev, PCI_FILL_IRQ | PCI_FILL_BASES | PCI_FILL_ROM_BASE | 
PCI_FILL_SIZES);
     pt_libpci_fixup(pci_dev);
 
-    e_slot = __insert_to_pci_slot(r_bus, r_dev, r_func, e_slot, NULL);
-    if ( e_slot < 0 ) {
-        PT_LOG("Error: no free virtual PCI slot\n");
-        return NULL;
-    }
-
     msi_translate = direct_pci_msitranslate;
     power_mgmt = direct_pci_power_mgmt;
     while (opt) {
--
generated by git-patchbot for /home/xen/git/qemu-xen-unstable.git

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.