aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorNate Lawson <njl@FreeBSD.org>2005-02-15 07:26:28 +0000
committerNate Lawson <njl@FreeBSD.org>2005-02-15 07:26:28 +0000
commit31e3d3f5b9fa952d9155b7368d7773db6f9a498f (patch)
tree49d47e952cfcc26bc7091714c79a8e58c4679094 /sys
parent1196826af5daa03fe50b8225aa42b3f53d72a7ce (diff)
downloadsrc-31e3d3f5b9fa952d9155b7368d7773db6f9a498f.tar.gz
src-31e3d3f5b9fa952d9155b7368d7773db6f9a498f.zip
MFi386 rev 1.61: Fix a few bugs in the legacy cpu attachment ivars.
Notes
Notes: svn path=/head/; revision=141944
Diffstat (limited to 'sys')
-rw-r--r--sys/amd64/amd64/legacy.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/amd64/amd64/legacy.c b/sys/amd64/amd64/legacy.c
index 112a96a521b6..01c497f98c65 100644
--- a/sys/amd64/amd64/legacy.c
+++ b/sys/amd64/amd64/legacy.c
@@ -293,8 +293,7 @@ cpu_add_child(device_t bus, int order, const char *name, int unit)
return (NULL);
resource_list_init(&cd->cd_rl);
- pc = pcpu_find(unit);
- KASSERT(pc != NULL, ("pcpu_find failed"));
+ pc = pcpu_find(device_get_unit(bus));
cd->cd_pcpu = pc;
child = device_add_child_ordered(bus, order, name, unit);
@@ -322,7 +321,7 @@ cpu_read_ivar(device_t dev, device_t child, int index, uintptr_t *result)
if (index != CPU_IVAR_PCPU)
return (ENOENT);
- cpdev = device_get_ivars(dev);
+ cpdev = device_get_ivars(child);
*result = (uintptr_t)cpdev->cd_pcpu;
return (0);
}