Subject: [PATCH] PCI, X86: busnum/node boot command line for missing _PXM Some intel new sandybridge or newer two sockets system do support support numa for pci devices. But BIOS does not provide _PXM under those root bus in DSDT. Add boot command line, so user could have chance to input node info before BIOS guys figure out to add _PXM. Fold fix from Ulrich to use ";" instead of ",". | The problem is the pci= parameter | handling uses ',' to separate parameters and therefore the second PCI | root information, separated by a comma, is interpreted as a new pci= | parameter. Reported-by: Ulrich Drepper Tested-by: Ulrich Drepper Signed-off-by: Yinghai Lu diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index a92c5eb..a66485f 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt @@ -2190,6 +2190,10 @@ bytes respectively. Such letter suffixes can also be entirely omitted. off: Turn realloc off on: Turn realloc on realloc same as realloc=on + busnum_node= + Format: + :[; ...] + Specifies node for bus, only works for missing _PXM noari do not use PCIe ARI. pcie_scan_all Scan all possible PCIe devices. Otherwise we only look for one device below a PCIe downstream diff --git a/arch/x86/pci/common.c b/arch/x86/pci/common.c index 0ad990a..a6527fe 100644 --- a/arch/x86/pci/common.c +++ b/arch/x86/pci/common.c @@ -494,6 +494,28 @@ int __init pcibios_init(void) return 0; } +static void __init parse_busnum_node(char *str) +{ + int bus, node, count; + char *p; + + p = str; + while (*p) { + count = 0; + if (sscanf(p, "%x:%x%n", &bus, &node, &count) != 2) { + printk(KERN_ERR "PCI: Can't parse busnum_node input: %s\n", + p); + break; + } + set_mp_bus_to_node(bus, node); + p += count; + if (*p != ';') + break; + p++; + } +} + + char * __devinit pcibios_setup(char *str) { if (!strcmp(str, "off")) { @@ -579,6 +601,9 @@ char * __devinit pcibios_setup(char *str) } else if (!strcmp(str, "nocrs")) { pci_probe |= PCI_ROOT_NO_CRS; return NULL; + } else if (!strncmp(str, "busnum_node=", 12)) { + parse_busnum_node(str + 12); + return NULL; } else if (!strcmp(str, "earlydump")) { pci_early_dump_regs = 1; return NULL;