diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2007-05-14 20:59:18 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2007-05-14 20:59:18 +0000 |
commit | 2bda091d99ae4011f8a5311f07718d6f4fbd1831 (patch) | |
tree | aa2ff12d010d9e2a9b23d419a3d4e15725867a92 /sys | |
parent | d5917096feb9ef17299adc90d0ba61fe531ea007 (diff) |
Use value passed as in ca_reg as cpuid instead of unit number.
ok drahn@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/macppc/macppc/cpu.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/arch/macppc/macppc/cpu.c b/sys/arch/macppc/macppc/cpu.c index d847f2d1e4f..7991344cb3a 100644 --- a/sys/arch/macppc/macppc/cpu.c +++ b/sys/arch/macppc/macppc/cpu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.c,v 1.41 2007/05/03 21:03:06 kettenis Exp $ */ +/* $OpenBSD: cpu.c,v 1.42 2007/05/14 20:59:17 kettenis Exp $ */ /* * Copyright (c) 1997 Per Fogelstrom @@ -236,14 +236,16 @@ ppc_check_procid() void cpuattach(struct device *parent, struct device *dev, void *aux) { + struct confargs *ca = aux; + int *reg = ca->ca_reg; u_int32_t cpu, pvr, hid0; char name[32]; int qhandle, phandle; u_int32_t clock_freq = 0; struct cpu_info *ci; - ci = &cpu_info[dev->dv_unit]; - ci->ci_cpuid = dev->dv_unit; + ci = &cpu_info[reg[0]]; + ci->ci_cpuid = reg[0]; ci->ci_intrdepth = -1; ci->ci_dev = dev; |