diff options
author | njl <njl@FreeBSD.org> | 2005-02-15 07:26:28 +0000 |
---|---|---|
committer | njl <njl@FreeBSD.org> | 2005-02-15 07:26:28 +0000 |
commit | 463116c7e031cff2ebe9ee834bf86458be8c4595 (patch) | |
tree | 49d47e952cfcc26bc7091714c79a8e58c4679094 | |
parent | ea80935c2aea86b616173763d1c4e3257fdb40f1 (diff) | |
download | FreeBSD-src-463116c7e031cff2ebe9ee834bf86458be8c4595.zip FreeBSD-src-463116c7e031cff2ebe9ee834bf86458be8c4595.tar.gz |
MFi386 rev 1.61: Fix a few bugs in the legacy cpu attachment ivars.
-rw-r--r-- | sys/amd64/amd64/legacy.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/amd64/amd64/legacy.c b/sys/amd64/amd64/legacy.c index 112a96a..01c497f 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); } |