diff for duplicates of <20180305192134.32207-4-decui@microsoft.com> diff --git a/a/1.txt b/N1/1.txt index acc8a0e..5f36a19 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -1,6 +1,5 @@ When we hot-remove the device, we first receive a PCI_EJECT message and -then receive a PCI_BUS_RELATIONS message with bus_rel->device_count =3D=3D = -0. +then receive a PCI_BUS_RELATIONS message with bus_rel->device_count == 0. The first message is offloaded to hv_eject_device_work(), and the second is offloaded to pci_devices_present_work(). Both the paths can be running @@ -27,52 +26,50 @@ index 04edb24c92ee..aaee41faf55f 100644 +++ b/drivers/pci/host/pci-hyperv.c @@ -461,6 +461,8 @@ struct hv_pcibus_device { struct retarget_msi_interrupt retarget_msi_interrupt_params; -=20 + spinlock_t retarget_msi_interrupt_lock; + + struct workqueue_struct *wq; }; -=20 + /* -@@ -1770,7 +1772,7 @@ static void hv_pci_devices_present(struct hv_pcibus_d= -evice *hbus, +@@ -1770,7 +1772,7 @@ static void hv_pci_devices_present(struct hv_pcibus_device *hbus, spin_unlock_irqrestore(&hbus->device_list_lock, flags); -=20 + get_hvpcibus(hbus); - schedule_work(&dr_wrk->wrk); + queue_work(hbus->wq, &dr_wrk->wrk); } -=20 + /** -@@ -1845,7 +1847,7 @@ static void hv_pci_eject_device(struct hv_pci_dev *hp= -dev) +@@ -1845,7 +1847,7 @@ static void hv_pci_eject_device(struct hv_pci_dev *hpdev) get_pcichild(hpdev, hv_pcidev_ref_pnp); INIT_WORK(&hpdev->wrk, hv_eject_device_work); get_hvpcibus(hpdev->hbus); - schedule_work(&hpdev->wrk); + queue_work(hpdev->hbus->wq, &hpdev->wrk); } -=20 + /** @@ -2460,11 +2462,17 @@ static int hv_pci_probe(struct hv_device *hdev, spin_lock_init(&hbus->retarget_msi_interrupt_lock); sema_init(&hbus->enum_sem, 1); init_completion(&hbus->remove_event); -+ hbus->wq =3D alloc_ordered_workqueue("hv_pci_%x", 0, ++ hbus->wq = alloc_ordered_workqueue("hv_pci_%x", 0, + hbus->sysdata.domain); + if (!hbus->wq) { -+ ret =3D -ENOMEM; ++ ret = -ENOMEM; + goto free_bus; + } -=20 - ret =3D vmbus_open(hdev->channel, pci_ring_size, pci_ring_size, NULL, 0, + + ret = vmbus_open(hdev->channel, pci_ring_size, pci_ring_size, NULL, 0, hv_pci_onchannelcallback, hbus); if (ret) - goto free_bus; + goto destroy_wq; -=20 + hv_set_drvdata(hdev, hbus); -=20 + @@ -2533,6 +2541,8 @@ static int hv_pci_probe(struct hv_device *hdev, hv_free_config_window(hbus); close: @@ -90,5 +87,9 @@ dev) free_page((unsigned long)hbus); return 0; } ---=20 +-- 2.7.4 +_______________________________________________ +devel mailing list +devel@linuxdriverproject.org +http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel diff --git a/a/content_digest b/N1/content_digest index cfd441e..d1ce1bc 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -9,20 +9,18 @@ olaf@aepfle.de <olaf@aepfle.de> apw@canonical.com <apw@canonical.com> " jasowang@redhat.com <jasowang@redhat.com>\0" - "Cc\0linux-kernel@vger.kernel.org <linux-kernel@vger.kernel.org>" + "Cc\0Haiyang Zhang <haiyangz@microsoft.com>" driverdev-devel@linuxdriverproject.org <driverdev-devel@linuxdriverproject.org> - Haiyang Zhang <haiyangz@microsoft.com> - vkuznets@redhat.com <vkuznets@redhat.com> - marcelo.cerri@canonical.com <marcelo.cerri@canonical.com> - Michael Kelley (EOSG) <Michael.H.Kelley@microsoft.com> - Dexuan Cui <decui@microsoft.com> + linux-kernel@vger.kernel.org <linux-kernel@vger.kernel.org> + stable@vger.kernel.org <stable@vger.kernel.org> Jack Morgenstein <jackm@mellanox.com> - " stable@vger.kernel.org <stable@vger.kernel.org>\0" + " Michael Kelley \\(EOSG\\) <Michael.H.Kelley@microsoft.com>" + marcelo.cerri@canonical.com <marcelo.cerri@canonical.com> + " vkuznets@redhat.com <vkuznets@redhat.com>\0" "\00:1\0" "b\0" "When we hot-remove the device, we first receive a PCI_EJECT message and\n" - "then receive a PCI_BUS_RELATIONS message with bus_rel->device_count =3D=3D =\n" - "0.\n" + "then receive a PCI_BUS_RELATIONS message with bus_rel->device_count == 0.\n" "\n" "The first message is offloaded to hv_eject_device_work(), and the second\n" "is offloaded to pci_devices_present_work(). Both the paths can be running\n" @@ -49,52 +47,50 @@ "+++ b/drivers/pci/host/pci-hyperv.c\n" "@@ -461,6 +461,8 @@ struct hv_pcibus_device {\n" " \tstruct retarget_msi_interrupt retarget_msi_interrupt_params;\n" - "=20\n" + " \n" " \tspinlock_t retarget_msi_interrupt_lock;\n" "+\n" "+\tstruct workqueue_struct *wq;\n" " };\n" - "=20\n" + " \n" " /*\n" - "@@ -1770,7 +1772,7 @@ static void hv_pci_devices_present(struct hv_pcibus_d=\n" - "evice *hbus,\n" + "@@ -1770,7 +1772,7 @@ static void hv_pci_devices_present(struct hv_pcibus_device *hbus,\n" " \tspin_unlock_irqrestore(&hbus->device_list_lock, flags);\n" - "=20\n" + " \n" " \tget_hvpcibus(hbus);\n" "-\tschedule_work(&dr_wrk->wrk);\n" "+\tqueue_work(hbus->wq, &dr_wrk->wrk);\n" " }\n" - "=20\n" + " \n" " /**\n" - "@@ -1845,7 +1847,7 @@ static void hv_pci_eject_device(struct hv_pci_dev *hp=\n" - "dev)\n" + "@@ -1845,7 +1847,7 @@ static void hv_pci_eject_device(struct hv_pci_dev *hpdev)\n" " \tget_pcichild(hpdev, hv_pcidev_ref_pnp);\n" " \tINIT_WORK(&hpdev->wrk, hv_eject_device_work);\n" " \tget_hvpcibus(hpdev->hbus);\n" "-\tschedule_work(&hpdev->wrk);\n" "+\tqueue_work(hpdev->hbus->wq, &hpdev->wrk);\n" " }\n" - "=20\n" + " \n" " /**\n" "@@ -2460,11 +2462,17 @@ static int hv_pci_probe(struct hv_device *hdev,\n" " \tspin_lock_init(&hbus->retarget_msi_interrupt_lock);\n" " \tsema_init(&hbus->enum_sem, 1);\n" " \tinit_completion(&hbus->remove_event);\n" - "+\thbus->wq =3D alloc_ordered_workqueue(\"hv_pci_%x\", 0,\n" + "+\thbus->wq = alloc_ordered_workqueue(\"hv_pci_%x\", 0,\n" "+\t\t\t\t\t hbus->sysdata.domain);\n" "+\tif (!hbus->wq) {\n" - "+\t\tret =3D -ENOMEM;\n" + "+\t\tret = -ENOMEM;\n" "+\t\tgoto free_bus;\n" "+\t}\n" - "=20\n" - " \tret =3D vmbus_open(hdev->channel, pci_ring_size, pci_ring_size, NULL, 0,\n" + " \n" + " \tret = vmbus_open(hdev->channel, pci_ring_size, pci_ring_size, NULL, 0,\n" " \t\t\t hv_pci_onchannelcallback, hbus);\n" " \tif (ret)\n" "-\t\tgoto free_bus;\n" "+\t\tgoto destroy_wq;\n" - "=20\n" + " \n" " \thv_set_drvdata(hdev, hbus);\n" - "=20\n" + " \n" "@@ -2533,6 +2541,8 @@ static int hv_pci_probe(struct hv_device *hdev,\n" " \thv_free_config_window(hbus);\n" " close:\n" @@ -112,7 +108,11 @@ " \tfree_page((unsigned long)hbus);\n" " \treturn 0;\n" " }\n" - "--=20\n" - 2.7.4 + "-- \n" + "2.7.4\n" + "_______________________________________________\n" + "devel mailing list\n" + "devel@linuxdriverproject.org\n" + http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel -4b001f2506f6e8340bedd3c412a481ca41b49b07cb79485ebf5391364d796a2e +ea4740f31cb4509ee5f8b182361348f639f403a6cd7e7c613a83da1be6129557
diff --git a/a/1.txt b/N2/1.txt index acc8a0e..21c5f0d 100644 --- a/a/1.txt +++ b/N2/1.txt @@ -1,6 +1,5 @@ When we hot-remove the device, we first receive a PCI_EJECT message and -then receive a PCI_BUS_RELATIONS message with bus_rel->device_count =3D=3D = -0. +then receive a PCI_BUS_RELATIONS message with bus_rel->device_count == 0. The first message is offloaded to hv_eject_device_work(), and the second is offloaded to pci_devices_present_work(). Both the paths can be running @@ -27,52 +26,50 @@ index 04edb24c92ee..aaee41faf55f 100644 +++ b/drivers/pci/host/pci-hyperv.c @@ -461,6 +461,8 @@ struct hv_pcibus_device { struct retarget_msi_interrupt retarget_msi_interrupt_params; -=20 + spinlock_t retarget_msi_interrupt_lock; + + struct workqueue_struct *wq; }; -=20 + /* -@@ -1770,7 +1772,7 @@ static void hv_pci_devices_present(struct hv_pcibus_d= -evice *hbus, +@@ -1770,7 +1772,7 @@ static void hv_pci_devices_present(struct hv_pcibus_device *hbus, spin_unlock_irqrestore(&hbus->device_list_lock, flags); -=20 + get_hvpcibus(hbus); - schedule_work(&dr_wrk->wrk); + queue_work(hbus->wq, &dr_wrk->wrk); } -=20 + /** -@@ -1845,7 +1847,7 @@ static void hv_pci_eject_device(struct hv_pci_dev *hp= -dev) +@@ -1845,7 +1847,7 @@ static void hv_pci_eject_device(struct hv_pci_dev *hpdev) get_pcichild(hpdev, hv_pcidev_ref_pnp); INIT_WORK(&hpdev->wrk, hv_eject_device_work); get_hvpcibus(hpdev->hbus); - schedule_work(&hpdev->wrk); + queue_work(hpdev->hbus->wq, &hpdev->wrk); } -=20 + /** @@ -2460,11 +2462,17 @@ static int hv_pci_probe(struct hv_device *hdev, spin_lock_init(&hbus->retarget_msi_interrupt_lock); sema_init(&hbus->enum_sem, 1); init_completion(&hbus->remove_event); -+ hbus->wq =3D alloc_ordered_workqueue("hv_pci_%x", 0, ++ hbus->wq = alloc_ordered_workqueue("hv_pci_%x", 0, + hbus->sysdata.domain); + if (!hbus->wq) { -+ ret =3D -ENOMEM; ++ ret = -ENOMEM; + goto free_bus; + } -=20 - ret =3D vmbus_open(hdev->channel, pci_ring_size, pci_ring_size, NULL, 0, + + ret = vmbus_open(hdev->channel, pci_ring_size, pci_ring_size, NULL, 0, hv_pci_onchannelcallback, hbus); if (ret) - goto free_bus; + goto destroy_wq; -=20 + hv_set_drvdata(hdev, hbus); -=20 + @@ -2533,6 +2541,8 @@ static int hv_pci_probe(struct hv_device *hdev, hv_free_config_window(hbus); close: @@ -90,5 +87,5 @@ dev) free_page((unsigned long)hbus); return 0; } ---=20 +-- 2.7.4 diff --git a/a/content_digest b/N2/content_digest index cfd441e..7c3ea34 100644 --- a/a/content_digest +++ b/N2/content_digest @@ -21,8 +21,7 @@ "\00:1\0" "b\0" "When we hot-remove the device, we first receive a PCI_EJECT message and\n" - "then receive a PCI_BUS_RELATIONS message with bus_rel->device_count =3D=3D =\n" - "0.\n" + "then receive a PCI_BUS_RELATIONS message with bus_rel->device_count == 0.\n" "\n" "The first message is offloaded to hv_eject_device_work(), and the second\n" "is offloaded to pci_devices_present_work(). Both the paths can be running\n" @@ -49,52 +48,50 @@ "+++ b/drivers/pci/host/pci-hyperv.c\n" "@@ -461,6 +461,8 @@ struct hv_pcibus_device {\n" " \tstruct retarget_msi_interrupt retarget_msi_interrupt_params;\n" - "=20\n" + " \n" " \tspinlock_t retarget_msi_interrupt_lock;\n" "+\n" "+\tstruct workqueue_struct *wq;\n" " };\n" - "=20\n" + " \n" " /*\n" - "@@ -1770,7 +1772,7 @@ static void hv_pci_devices_present(struct hv_pcibus_d=\n" - "evice *hbus,\n" + "@@ -1770,7 +1772,7 @@ static void hv_pci_devices_present(struct hv_pcibus_device *hbus,\n" " \tspin_unlock_irqrestore(&hbus->device_list_lock, flags);\n" - "=20\n" + " \n" " \tget_hvpcibus(hbus);\n" "-\tschedule_work(&dr_wrk->wrk);\n" "+\tqueue_work(hbus->wq, &dr_wrk->wrk);\n" " }\n" - "=20\n" + " \n" " /**\n" - "@@ -1845,7 +1847,7 @@ static void hv_pci_eject_device(struct hv_pci_dev *hp=\n" - "dev)\n" + "@@ -1845,7 +1847,7 @@ static void hv_pci_eject_device(struct hv_pci_dev *hpdev)\n" " \tget_pcichild(hpdev, hv_pcidev_ref_pnp);\n" " \tINIT_WORK(&hpdev->wrk, hv_eject_device_work);\n" " \tget_hvpcibus(hpdev->hbus);\n" "-\tschedule_work(&hpdev->wrk);\n" "+\tqueue_work(hpdev->hbus->wq, &hpdev->wrk);\n" " }\n" - "=20\n" + " \n" " /**\n" "@@ -2460,11 +2462,17 @@ static int hv_pci_probe(struct hv_device *hdev,\n" " \tspin_lock_init(&hbus->retarget_msi_interrupt_lock);\n" " \tsema_init(&hbus->enum_sem, 1);\n" " \tinit_completion(&hbus->remove_event);\n" - "+\thbus->wq =3D alloc_ordered_workqueue(\"hv_pci_%x\", 0,\n" + "+\thbus->wq = alloc_ordered_workqueue(\"hv_pci_%x\", 0,\n" "+\t\t\t\t\t hbus->sysdata.domain);\n" "+\tif (!hbus->wq) {\n" - "+\t\tret =3D -ENOMEM;\n" + "+\t\tret = -ENOMEM;\n" "+\t\tgoto free_bus;\n" "+\t}\n" - "=20\n" - " \tret =3D vmbus_open(hdev->channel, pci_ring_size, pci_ring_size, NULL, 0,\n" + " \n" + " \tret = vmbus_open(hdev->channel, pci_ring_size, pci_ring_size, NULL, 0,\n" " \t\t\t hv_pci_onchannelcallback, hbus);\n" " \tif (ret)\n" "-\t\tgoto free_bus;\n" "+\t\tgoto destroy_wq;\n" - "=20\n" + " \n" " \thv_set_drvdata(hdev, hbus);\n" - "=20\n" + " \n" "@@ -2533,6 +2541,8 @@ static int hv_pci_probe(struct hv_device *hdev,\n" " \thv_free_config_window(hbus);\n" " close:\n" @@ -112,7 +109,7 @@ " \tfree_page((unsigned long)hbus);\n" " \treturn 0;\n" " }\n" - "--=20\n" + "-- \n" 2.7.4 -4b001f2506f6e8340bedd3c412a481ca41b49b07cb79485ebf5391364d796a2e +37062a5fde8079fb89c4b7143e8bed7e4910404b5e50175558c9b7d5497b5ac6
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.