Before this patch, that routine was being called needlessly a lot of
times on each new partition setup. We just need it once, though, and we
choose to do so at pci_remove_physical_device() (ivshmem has its own
call as well).

Signed-off-by: Gustavo Lima Chaves <[email protected]>
---
 hypervisor/control.c               |  1 -
 hypervisor/include/jailhouse/pci.h |  1 -
 hypervisor/pci.c                   | 11 -----------
 3 files changed, 13 deletions(-)

diff --git a/hypervisor/control.c b/hypervisor/control.c
index 52ef8733..c49532bc 100644
--- a/hypervisor/control.c
+++ b/hypervisor/control.c
@@ -571,7 +571,6 @@ static int cell_start(struct per_cpu *cpu_data, unsigned 
long id)
        cell->comm_page.comm_region.cell_state = JAILHOUSE_CELL_RUNNING;
        cell->comm_page.comm_region.msg_to_cell = JAILHOUSE_MSG_NONE;
 
-       pci_cell_reset(cell);
        arch_cell_reset(cell);
 
        for_each_cpu(cpu, cell->cpu_set) {
diff --git a/hypervisor/include/jailhouse/pci.h 
b/hypervisor/include/jailhouse/pci.h
index 4befef11..d8bb2ce3 100644
--- a/hypervisor/include/jailhouse/pci.h
+++ b/hypervisor/include/jailhouse/pci.h
@@ -181,7 +181,6 @@ enum pci_access pci_cfg_write_moderate(struct pci_device 
*device, u16 address,
 void pci_reset_device(struct pci_device *device);
 
 int pci_cell_init(struct cell *cell);
-void pci_cell_reset(struct cell *cell);
 void pci_cell_exit(struct cell *cell);
 
 void pci_config_commit(struct cell *cell_added_removed);
diff --git a/hypervisor/pci.c b/hypervisor/pci.c
index 5957dfb2..e7f938fb 100644
--- a/hypervisor/pci.c
+++ b/hypervisor/pci.c
@@ -754,8 +754,6 @@ static int pci_add_physical_device(struct cell *cell, 
struct pci_device *device)
        }
 
        device->cell = cell;
-       if (cell != &root_cell)
-               pci_reset_device(device);
 
        return 0;
 
@@ -869,15 +867,6 @@ error:
        return err;
 }
 
-void pci_cell_reset(struct cell *cell)
-{
-       struct pci_device *device;
-
-       for_each_configured_pci_device(device, cell)
-               if (device->cell)
-                       pci_reset_device(device);
-}
-
 static void pci_return_device_to_root_cell(struct pci_device *device)
 {
        struct pci_device *root_device;
-- 
2.14.3

-- 
You received this message because you are subscribed to the Google Groups 
"Jailhouse" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to