diff --git a/sys/alpha/alpha/mp_machdep.c b/sys/alpha/alpha/mp_machdep.c index 393802da1651..c2e2fccb42d9 100644 --- a/sys/alpha/alpha/mp_machdep.c +++ b/sys/alpha/alpha/mp_machdep.c @@ -282,6 +282,7 @@ globaldata_init(struct globaldata *globaldata, int cpuno, size_t sz) globaldata->gd_other_cpus = all_cpus & ~(1 << cpuno); globaldata->gd_next_asn = 0; globaldata->gd_current_asngen = 1; + globaldata->gd_cpuid = cpuno; cpuno_to_globaldata[cpuno] = globaldata; } @@ -369,10 +370,14 @@ s_lock_try(struct simplelock *lkp) /* lock around the MP rendezvous */ static struct simplelock smp_rv_lock; +/* only 1 CPU can panic at a time :) */ +struct simplelock panic_lock; + static void init_locks(void) { s_lock_init(&smp_rv_lock); + s_lock_init(&panic_lock); } void diff --git a/sys/alpha/include/globaldata.h b/sys/alpha/include/globaldata.h index 361ae09109c5..5fd6c5948564 100644 --- a/sys/alpha/include/globaldata.h +++ b/sys/alpha/include/globaldata.h @@ -62,6 +62,7 @@ struct globaldata { u_int gd_astpending; SLIST_ENTRY(globaldata) gd_allcpu; int gd_witness_spin_check; + u_int gd_cpuid; #ifdef KTR_PERCPU volatile int gd_ktr_idx; /* Index into trace table */ char *gd_ktr_buf; diff --git a/sys/alpha/include/lock.h b/sys/alpha/include/lock.h index f2e3448e2de3..ebca86165b28 100644 --- a/sys/alpha/include/lock.h +++ b/sys/alpha/include/lock.h @@ -55,6 +55,8 @@ s_unlock(struct simplelock *lkp) lkp->lock_data = 0; } +extern struct simplelock panic_lock; + #if !defined(SIMPLELOCK_DEBUG) && MAXCPU > 1 /* * This set of defines turns on the real functions in i386/isa/apic_ipl.s. diff --git a/sys/alpha/include/pcpu.h b/sys/alpha/include/pcpu.h index 361ae09109c5..5fd6c5948564 100644 --- a/sys/alpha/include/pcpu.h +++ b/sys/alpha/include/pcpu.h @@ -62,6 +62,7 @@ struct globaldata { u_int gd_astpending; SLIST_ENTRY(globaldata) gd_allcpu; int gd_witness_spin_check; + u_int gd_cpuid; #ifdef KTR_PERCPU volatile int gd_ktr_idx; /* Index into trace table */ char *gd_ktr_buf; diff --git a/sys/powerpc/include/globaldata.h b/sys/powerpc/include/globaldata.h index 361ae09109c5..5fd6c5948564 100644 --- a/sys/powerpc/include/globaldata.h +++ b/sys/powerpc/include/globaldata.h @@ -62,6 +62,7 @@ struct globaldata { u_int gd_astpending; SLIST_ENTRY(globaldata) gd_allcpu; int gd_witness_spin_check; + u_int gd_cpuid; #ifdef KTR_PERCPU volatile int gd_ktr_idx; /* Index into trace table */ char *gd_ktr_buf; diff --git a/sys/powerpc/include/pcpu.h b/sys/powerpc/include/pcpu.h index 361ae09109c5..5fd6c5948564 100644 --- a/sys/powerpc/include/pcpu.h +++ b/sys/powerpc/include/pcpu.h @@ -62,6 +62,7 @@ struct globaldata { u_int gd_astpending; SLIST_ENTRY(globaldata) gd_allcpu; int gd_witness_spin_check; + u_int gd_cpuid; #ifdef KTR_PERCPU volatile int gd_ktr_idx; /* Index into trace table */ char *gd_ktr_buf;