PCI: Set pci_dev dev_node early so IOAPIC irq_descs are allocated locally
authorYinghai Lu <yinghai@kernel.org>
Mon, 21 Jan 2013 21:20:44 +0000 (13:20 -0800)
committerBjorn Helgaas <bhelgaas@google.com>
Fri, 25 Jan 2013 20:45:04 +0000 (13:45 -0700)
Otherwise irq_desc for PCI bridge with hot-added IOAPIC may not be
allocated on the local node.

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/pci/probe.c

index 2dcd22d9c816f98c681f572a2f48fbba7da5680b..b97dea5784ffca7d9fbf634ccdac31d403a8bc0b 100644 (file)
@@ -1300,6 +1300,7 @@ void pci_device_add(struct pci_dev *dev, struct pci_bus *bus)
        dev->dev.release = pci_release_dev;
        pci_dev_get(dev);
 
+       set_dev_node(&dev->dev, pcibus_to_node(bus));
        dev->dev.dma_mask = &dev->dma_mask;
        dev->dev.dma_parms = &dev->dma_parms;
        dev->dev.coherent_dma_mask = 0xffffffffull;