Message ID | 20131116002820.GA31073@google.com (mailing list archive) |
---|---|
State | New, archived |
Delegated to: | Bjorn Helgaas |
Headers | show |
Hello, Bjorn. On Fri, Nov 15, 2013 at 05:28:20PM -0700, Bjorn Helgaas wrote: > It would be better to fix PCI so we don't call VF driver .probe() methods > from inside a PF driver .probe() method, but that's a bigger project. Yeah, if pci doesn't need the recursion, we can simply revert restore the lockdep annoation on work_on_cpu(). > @@ -293,7 +293,9 @@ static int pci_call_probe(struct pci_driver *drv, struct pci_dev *dev, > its local memory on the right node without any need to > change it. */ > node = dev_to_node(&dev->dev); > - if (node >= 0) { > + preempt_disable(); > + > + if (node >= 0 && node != numa_node_id()) { A bit of comment here would be nice but yeah I think this should work. Can you please also queue the revert of c2fda509667b ("workqueue: allow work_on_cpu() to be called recursively") after this patch? Please feel free to add my acked-by. Thanks.
diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c index 454853507b7e..accae06aa79a 100644 --- a/drivers/pci/pci-driver.c +++ b/drivers/pci/pci-driver.c @@ -293,7 +293,9 @@ static int pci_call_probe(struct pci_driver *drv, struct pci_dev *dev, its local memory on the right node without any need to change it. */ node = dev_to_node(&dev->dev); - if (node >= 0) { + preempt_disable(); + + if (node >= 0 && node != numa_node_id()) { int cpu; get_online_cpus(); @@ -305,6 +307,8 @@ static int pci_call_probe(struct pci_driver *drv, struct pci_dev *dev, put_online_cpus(); } else error = local_pci_probe(&ddi); + + preempt_enable(); return error; }