sparc64:This fixes the numa_node attributes displayed in sysfs.
authorAllen Pais <allen.pais@oracle.com>
Wed, 11 Jan 2017 09:11:16 +0000 (14:41 +0530)
committerChuck Anderson <chuck.anderson@oracle.com>
Thu, 9 Mar 2017 03:30:06 +0000 (19:30 -0800)
Orabug: 22748961

Signed-off-by: Chris Hyser <chris.hyser@oracle.com>
Signed-off-by: Allen Pais <allen.pais@oracle.com>
arch/sparc/kernel/pci.c

index 553ea40b2913a67bd7ef6f7ab19c4d005814c0fb..d21f046fa23b853584c5e8334285c32233404334 100644 (file)
@@ -685,6 +685,13 @@ struct pci_bus *pci_scan_one_pbm(struct pci_pbm_info *pbm,
                return NULL;
        }
 
+       /* adding the device later will overwrite this value with the parent and
+        * then trash the entire subtree.
+        */
+       set_dev_node(&bus->dev, pbm->numa_node);
+       if (bus->dev.parent)
+               set_dev_node(bus->dev.parent, pbm->numa_node);
+
        pci_of_scan_bus(pbm, node, bus);
        pci_bus_register_of_sysfs(bus);