判断pcie卡插在哪个cpu上 https://blog.csdn.net/tiantao2012/article/details/78467743
kernel 有个patch https://patchwork.kernel.org/patch/9746541/
diff --git a/arch/arm64/kernel/pci.c b/arch/arm64/kernel/pci.c
index 4f0e3eb..1082834 100644
--- a/arch/arm64/kernel/pci.c
+++ b/arch/arm64/kernel/pci.c
@@ -108,7 +108,10 @@ int pcibios_root_bridge_prepare(struct pci_host_bridge *bridge)
if (!acpi_disabled) {
struct pci_config_window *cfg = bridge->bus->sysdata;
struct acpi_device *adev = to_acpi_device(cfg->parent);
+ struct device *bus_dev = &bridge->bus->dev;
+
ACPI_COMPANION_SET(&bridge->dev, adev);
+ set_dev_node(bus_dev, acpi_get_node(acpi_device_handle(adev)));
}
return 0;
这个patch的作用很明显,就是在pcie root bridage的时候通过set_dev_node来设置
static inline void set_dev_node(struct device *dev, int node)
{
dev->numa_node = node;
}