summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorAndreas Gunnarsson <andreas@cvs.openbsd.org>2009-02-13 20:47:06 +0000
committerAndreas Gunnarsson <andreas@cvs.openbsd.org>2009-02-13 20:47:06 +0000
commit7af5c212c5ca44f9e7b10be24718d77b7ae4dd29 (patch)
treea3d1f376f6fdfe63acd1dddacbae19aaff6db92d /sys/arch
parentc687d1e44386e76576eeb74a764e33d2914fad62 (diff)
Make "boot -d" work on amd64 MP.
Prodded by oga@ (a long time ago) and mikeb@ Also ok by kettenis@ and grange@
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/amd64/include/cpu.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/arch/amd64/include/cpu.h b/sys/arch/amd64/include/cpu.h
index 2c21acf44d3..4320592dd16 100644
--- a/sys/arch/amd64/include/cpu.h
+++ b/sys/arch/amd64/include/cpu.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: cpu.h,v 1.39 2008/11/22 18:12:32 art Exp $ */
+/* $OpenBSD: cpu.h,v 1.40 2009/02/13 20:47:05 andreas Exp $ */
/* $NetBSD: cpu.h,v 1.1 2003/04/26 18:39:39 fvdl Exp $ */
/*-
@@ -155,7 +155,7 @@ extern struct cpu_info *cpu_info_list;
#define CPU_INFO_FOREACH(cii, ci) for (cii = 0, ci = cpu_info_list; \
ci != NULL; ci = ci->ci_next)
-#define CPU_INFO_UNIT(ci) ((ci)->ci_dev->dv_unit)
+#define CPU_INFO_UNIT(ci) ((ci)->ci_dev ? (ci)->ci_dev->dv_unit : 0)
/*
* Preempt the current process if in interrupt from user mode,