From 7af5c212c5ca44f9e7b10be24718d77b7ae4dd29 Mon Sep 17 00:00:00 2001 From: Andreas Gunnarsson Date: Fri, 13 Feb 2009 20:47:06 +0000 Subject: Make "boot -d" work on amd64 MP. Prodded by oga@ (a long time ago) and mikeb@ Also ok by kettenis@ and grange@ --- sys/arch/amd64/include/cpu.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/arch/amd64') 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, -- cgit v1.2.3