===================================================================
@@ -2068,6 +2068,11 @@ bytes respectively. Such letter suffixes
hardware access methods are allowed. Use this
if you experience crashes upon bootup and you
suspect they are caused by the BIOS.
+ busnum_node= [X86] Set node for root bus.
+ Format:
+ <bus>:<node>[;...]
+ Specifies node for bus, will override bios _PXM
+ or probed value from hostbridge.
conf1 [X86] Force use of PCI Configuration
Mechanism 1.
conf2 [X86] Force use of PCI Configuration
===================================================================
@@ -494,6 +494,39 @@ int __init pcibios_init(void)
return 0;
}
+static const char *busnum_node_param;
+
+static void remember_busnum_node(const char *str)
+{
+ busnum_node_param = str;
+}
+
+int get_user_busnum_node(int busnum)
+{
+ int bus, node, count;
+ const char *p = busnum_node_param;
+
+ if (!p)
+ return -1;
+
+ 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;
+ }
+ if (bus == busnum)
+ return node;
+ p += count;
+ if (*p != ';')
+ break;
+ p++;
+ }
+
+ return -1;
+}
+
char * __devinit pcibios_setup(char *str)
{
if (!strcmp(str, "off")) {
@@ -579,6 +612,9 @@ char * __devinit pcibios_setup(char *st
} else if (!strcmp(str, "nocrs")) {
pci_probe |= PCI_ROOT_NO_CRS;
return NULL;
+ } else if (!strncmp(str, "busnum_node=", 12)) {
+ remember_busnum_node(str + 12);
+ return NULL;
} else if (!strcmp(str, "earlydump")) {
pci_early_dump_regs = 1;
return NULL;
===================================================================
@@ -46,6 +46,9 @@ enum pci_bf_sort_state {
pci_dmi_bf,
};
+/* pci-common.c */
+int get_user_busnum_node(int busnum);
+
/* pci-i386.c */
void pcibios_resource_survey(void);
===================================================================
@@ -453,7 +453,7 @@ struct pci_bus * __devinit pci_acpi_scan
struct pci_sysdata *sd;
int node;
#ifdef CONFIG_ACPI_NUMA
- int pxm;
+ int pxm = -1;
#endif
if (domain && !pci_domains_supported) {
@@ -463,16 +463,20 @@ struct pci_bus * __devinit pci_acpi_scan
return NULL;
}
- node = -1;
+ node = get_user_busnum_node(busnum);
+ if (node == -1) {
#ifdef CONFIG_ACPI_NUMA
- pxm = acpi_get_pxm(device->handle);
- if (pxm >= 0)
- node = pxm_to_node(pxm);
- if (node != -1)
- set_mp_bus_to_node(busnum, node);
- else
-#endif
+ pxm = acpi_get_pxm(device->handle);
+ if (pxm >= 0)
+ node = pxm_to_node(pxm);
+ if (node != -1)
+ set_mp_bus_to_node(busnum, node);
+ else
+ node = get_mp_bus_to_node(busnum);
+#else
node = get_mp_bus_to_node(busnum);
+#endif
+ }
if (node != -1 && !node_online(node))
node = -1;