diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/powerpc/include/cpu.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/arch/powerpc/include/cpu.h b/sys/arch/powerpc/include/cpu.h index 1116f5db74e..61a65501c97 100644 --- a/sys/arch/powerpc/include/cpu.h +++ b/sys/arch/powerpc/include/cpu.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.h,v 1.42 2008/11/22 14:42:29 art Exp $ */ +/* $OpenBSD: cpu.h,v 1.43 2009/03/15 20:07:14 miod Exp $ */ /* $NetBSD: cpu.h,v 1.1 1996/09/30 16:34:21 ws Exp $ */ /* @@ -95,7 +95,7 @@ curcpu(void) #define curpcb (curcpu()->ci_curpcb) #define curpm (curcpu()->ci_curpm) -#define CPU_INFO_UNIT(ci) ((ci)->ci_dev->dv_unit) +#define CPU_INFO_UNIT(ci) ((ci)->ci_dev ? (ci)->ci_dev->dv_unit : 0) #ifdef MULTIPROCESSOR @@ -115,7 +115,7 @@ void cpu_boot_secondary_processors(void); #define CPU_IS_PRIMARY(ci) ((ci)->ci_cpuid == 0) #define CPU_INFO_ITERATOR int #define CPU_INFO_FOREACH(cii, ci) \ - for (cii = 0, ci = &cpu_info[0]; cii < PPC_MAXPROCS; cii++, ci++) + for (cii = 0, ci = &cpu_info[0]; cii < ncpus; cii++, ci++) void cpu_unidle(struct cpu_info *); |