aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-04-29 11:26:51 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-29 11:26:51 -0400
commit5f78e4d33945b291d12765cdd7e4304f437b9361 (patch)
tree113cea729de15a98bb941cc4afb8d13301534ca7 /drivers/base
parent867a89e0b73af48838c7987e80899a1ff26dd6ff (diff)
parent5f0b2976cb2b62668a076f54419c24b8ab677167 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86-bigbox-pci
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86-bigbox-pci: x86: add pci=check_enable_amd_mmconf and dmi check x86: work around io allocation overlap of HT links acpi: get boot_cpu_id as early for k8_scan_nodes x86_64: don't need set default res if only have one root bus x86: double check the multi root bus with fam10h mmconf x86: multi pci root bus with different io resource range, on 64-bit x86: use bus conf in NB conf fun1 to get bus range on, on 64-bit x86: get mp_bus_to_node early x86 pci: remove checking type for mmconfig probe x86: remove unneeded check in mmconf reject driver core: try parent numa_node at first before using default x86: seperate mmconf for fam10h out from setup_64.c x86: if acpi=off, force setting the mmconf for fam10h x86_64: check MSR to get MMCONFIG for AMD Family 10h x86_64: check and enable MMCONFIG for AMD Family 10h x86_64: set cfg_size for AMD Family 10h in case MMCONFIG x86: mmconf enable mcfg early x86: clear pci_mmcfg_virt when mmcfg get rejected x86: validate against acpi motherboard resources Fixed up fairly trivial conflicts in arch/x86/pci/{init.c,pci.h} due to OLPC support manually.
Diffstat (limited to 'drivers/base')
-rw-r--r--drivers/base/core.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/drivers/base/core.c b/drivers/base/core.c
index 9248e0927d08..be288b5e4180 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -787,6 +787,10 @@ int device_add(struct device *dev)
787 parent = get_device(dev->parent); 787 parent = get_device(dev->parent);
788 setup_parent(dev, parent); 788 setup_parent(dev, parent);
789 789
790 /* use parent numa_node */
791 if (parent)
792 set_dev_node(dev, dev_to_node(parent));
793
790 /* first, register with generic layer. */ 794 /* first, register with generic layer. */
791 error = kobject_add(&dev->kobj, dev->kobj.parent, "%s", dev->bus_id); 795 error = kobject_add(&dev->kobj, dev->kobj.parent, "%s", dev->bus_id);
792 if (error) 796 if (error)
@@ -1306,8 +1310,11 @@ int device_move(struct device *dev, struct device *new_parent)
1306 dev->parent = new_parent; 1310 dev->parent = new_parent;
1307 if (old_parent) 1311 if (old_parent)
1308 klist_remove(&dev->knode_parent); 1312 klist_remove(&dev->knode_parent);
1309 if (new_parent) 1313 if (new_parent) {
1310 klist_add_tail(&dev->knode_parent, &new_parent->klist_children); 1314 klist_add_tail(&dev->knode_parent, &new_parent->klist_children);
1315 set_dev_node(dev, dev_to_node(new_parent));
1316 }
1317
1311 if (!dev->class) 1318 if (!dev->class)
1312 goto out_put; 1319 goto out_put;
1313 error = device_move_class_links(dev, old_parent, new_parent); 1320 error = device_move_class_links(dev, old_parent, new_parent);
@@ -1317,9 +1324,12 @@ int device_move(struct device *dev, struct device *new_parent)
1317 if (!kobject_move(&dev->kobj, &old_parent->kobj)) { 1324 if (!kobject_move(&dev->kobj, &old_parent->kobj)) {
1318 if (new_parent) 1325 if (new_parent)
1319 klist_remove(&dev->knode_parent); 1326 klist_remove(&dev->knode_parent);
1320 if (old_parent) 1327 dev->parent = old_parent;
1328 if (old_parent) {
1321 klist_add_tail(&dev->knode_parent, 1329 klist_add_tail(&dev->knode_parent,
1322 &old_parent->klist_children); 1330 &old_parent->klist_children);
1331 set_dev_node(dev, dev_to_node(old_parent));
1332 }
1323 } 1333 }
1324 cleanup_glue_dir(dev, new_parent_kobj); 1334 cleanup_glue_dir(dev, new_parent_kobj);
1325 put_device(new_parent); 1335 put_device(new_parent);