aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/pci/pci-acpi.c
diff options
context:
space:
mode:
authorJonathan Cameron <Jonathan.Cameron@huawei.com>2018-09-12 16:21:40 +0100
committerBjorn Helgaas <bhelgaas@google.com>2018-09-17 16:33:25 -0500
commitbad7dcd94f3956bcfc0a69ef71fdf0fcca3de4a8 (patch)
tree4b8046f276965e20025bdc2dddb1de1233b1250b /drivers/pci/pci-acpi.c
parentx86/PCI: Remove node-local allocation when initialising host controller (diff)
downloadwireguard-linux-bad7dcd94f3956bcfc0a69ef71fdf0fcca3de4a8.tar.xz
wireguard-linux-bad7dcd94f3956bcfc0a69ef71fdf0fcca3de4a8.zip
ACPI/PCI: Pay attention to device-specific _PXM node values
The ACPI specification allows you to provide _PXM entries for devices based on their location on a particular bus. Let us use that if it is provided rather than just assuming it makes sense to put the device into the proximity domain of the root. An example DSDT entry that will supply this is: Device (PCI2) { Name (_HID, "PNP0A08") // PCI Express Root Bridge Name (_CID, "PNP0A03") // Compatible PCI Root Bridge Name(_SEG, 2) // Segment of this Root complex Name(_BBN, 0xF8) // Base Bus Number Name(_CCA, 1) Method (_PXM, 0, NotSerialized) { Return(0x00) } ... Device (BRI0) { Name (_HID, "19E51610") Name (_ADR, 0) Name (_BBN, 0xF9) Device (CAR0) { Name (_HID, "97109912") Name (_ADR, 0) Method (_PXM, 0, NotSerialized) { Return(0x02) } } } } Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/pci/pci-acpi.c')
-rw-r--r--drivers/pci/pci-acpi.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/pci/pci-acpi.c b/drivers/pci/pci-acpi.c
index c2ab57705043..8f75ba068d45 100644
--- a/drivers/pci/pci-acpi.c
+++ b/drivers/pci/pci-acpi.c
@@ -751,10 +751,15 @@ static void pci_acpi_setup(struct device *dev)
{
struct pci_dev *pci_dev = to_pci_dev(dev);
struct acpi_device *adev = ACPI_COMPANION(dev);
+ int node;
if (!adev)
return;
+ node = acpi_get_node(adev->handle);
+ if (node != NUMA_NO_NODE)
+ set_dev_node(dev, node);
+
pci_acpi_optimize_delay(pci_dev, adev->handle);
pci_acpi_add_pm_notifier(adev, pci_dev);