Message ID | 20231117123802.55454-1-ioanna-maria.alifieraki@canonical.com |
---|---|
State | New |
Headers | show |
Series | [jammy,SRU] Revert "PCI: hv: Use async probing to reduce boot time" | expand |
On 11/17/23 5:38 AM, Ioanna Alifieraki wrote: > BugLink: https://bugs.launchpad.net/bugs/2042568 > > This reverts commit a0dce2ed5fecc580963e6cf490d9c5b6c627cf0d. > > Signed-off-by: Ioanna Alifieraki <ioanna-maria.alifieraki@canonical.com> > --- > drivers/pci/controller/pci-hyperv.c | 11 ++--------- > 1 file changed, 2 insertions(+), 9 deletions(-) > > diff --git a/drivers/pci/controller/pci-hyperv.c b/drivers/pci/controller/pci-hyperv.c > index 8a59d9a89ab1..bc986967b126 100644 > --- a/drivers/pci/controller/pci-hyperv.c > +++ b/drivers/pci/controller/pci-hyperv.c > @@ -2288,16 +2288,12 @@ static int create_root_hv_pci_bus(struct hv_pcibus_device *hbus) > if (error) > return error; > > + pci_lock_rescan_remove(); > hv_pci_assign_properties(hbus); > - /* > - * pci_lock_rescan_remove() and pci_unlock_rescan_remove() are > - * unnecessary here, because we hold the hbus->state_lock, meaning > - * hv_eject_device_work() and pci_devices_present_work() can't race > - * with create_root_hv_pci_bus(). > - */ > pci_bus_assign_resources(bridge->bus); > hv_pci_assign_slots(hbus); > pci_bus_add_devices(bridge->bus); > + pci_unlock_rescan_remove(); > hbus->state = hv_pcibus_installed; > return 0; > } > @@ -3973,9 +3969,6 @@ static struct hv_driver hv_pci_drv = { > .remove = hv_pci_remove, > .suspend = hv_pci_suspend, > .resume = hv_pci_resume, > - .driver = { > - .probe_type = PROBE_PREFER_ASYNCHRONOUS, > - }, > }; > > static void __exit exit_hv_pci_drv(void) Just a nit, but the subject should be "[jammy/linux-azure]" to be clear that this patch is not intended for the primary kernel.
diff --git a/drivers/pci/controller/pci-hyperv.c b/drivers/pci/controller/pci-hyperv.c index 8a59d9a89ab1..bc986967b126 100644 --- a/drivers/pci/controller/pci-hyperv.c +++ b/drivers/pci/controller/pci-hyperv.c @@ -2288,16 +2288,12 @@ static int create_root_hv_pci_bus(struct hv_pcibus_device *hbus) if (error) return error; + pci_lock_rescan_remove(); hv_pci_assign_properties(hbus); - /* - * pci_lock_rescan_remove() and pci_unlock_rescan_remove() are - * unnecessary here, because we hold the hbus->state_lock, meaning - * hv_eject_device_work() and pci_devices_present_work() can't race - * with create_root_hv_pci_bus(). - */ pci_bus_assign_resources(bridge->bus); hv_pci_assign_slots(hbus); pci_bus_add_devices(bridge->bus); + pci_unlock_rescan_remove(); hbus->state = hv_pcibus_installed; return 0; } @@ -3973,9 +3969,6 @@ static struct hv_driver hv_pci_drv = { .remove = hv_pci_remove, .suspend = hv_pci_suspend, .resume = hv_pci_resume, - .driver = { - .probe_type = PROBE_PREFER_ASYNCHRONOUS, - }, }; static void __exit exit_hv_pci_drv(void)
BugLink: https://bugs.launchpad.net/bugs/2042568 This reverts commit a0dce2ed5fecc580963e6cf490d9c5b6c627cf0d. Signed-off-by: Ioanna Alifieraki <ioanna-maria.alifieraki@canonical.com> --- drivers/pci/controller/pci-hyperv.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-)