summaryrefslogtreecommitdiff
path: root/sys/arch/i386/include
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2004-06-25 08:41:20 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2004-06-25 08:41:20 +0000
commitb931374cf34889aaeeb87e3d70dd7c41e3d593bf (patch)
tree3ab69a26487321d6af4330d63ced4be9d1993b28 /sys/arch/i386/include
parentdcccc87f9e630f68e565a5746279342b43553c8f (diff)
Instead of accessing ci_dev (that's an MI field), provide a marco that
translates a cpu_info structure into a human-readable cpu number. drahn@ deraadt@ ok
Diffstat (limited to 'sys/arch/i386/include')
-rw-r--r--sys/arch/i386/include/cpu.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/arch/i386/include/cpu.h b/sys/arch/i386/include/cpu.h
index 18da562cd3b..f30153e7487 100644
--- a/sys/arch/i386/include/cpu.h
+++ b/sys/arch/i386/include/cpu.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: cpu.h,v 1.64 2004/06/21 23:12:14 art Exp $ */
+/* $OpenBSD: cpu.h,v 1.65 2004/06/25 08:41:19 art Exp $ */
/* $NetBSD: cpu.h,v 1.35 1996/05/05 19:29:26 christos Exp $ */
/*-
@@ -170,6 +170,8 @@ extern struct cpu_info *cpu_info_list;
#define CPU_INFO_FOREACH(cii, ci) cii = 0, ci = cpu_info_list; \
ci != NULL; ci = ci->ci_next
+#define CPU_INFO_UNIT(ci) ((ci)->ci_dev.dv_unit)
+
#ifdef MULTIPROCESSOR
#define I386_MAXPROCS 32 /* because we use a bitmask */