summaryrefslogtreecommitdiffstats
path: root/sys/amd64/amd64/db_interface.c
diff options
context:
space:
mode:
authorjake <jake@FreeBSD.org>2001-01-10 04:43:51 +0000
committerjake <jake@FreeBSD.org>2001-01-10 04:43:51 +0000
commit4f5d8ed82579a945555b585b43ab2d09eae30c77 (patch)
tree512839f19fc02786cc9904c4406357f3573a8b09 /sys/amd64/amd64/db_interface.c
parent776ef1f43089579877329277af83423976a699d2 (diff)
downloadFreeBSD-src-4f5d8ed82579a945555b585b43ab2d09eae30c77.zip
FreeBSD-src-4f5d8ed82579a945555b585b43ab2d09eae30c77.tar.gz
Use PCPU_GET, PCPU_PTR and PCPU_SET to access all per-cpu variables
other then curproc.
Diffstat (limited to 'sys/amd64/amd64/db_interface.c')
-rw-r--r--sys/amd64/amd64/db_interface.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/sys/amd64/amd64/db_interface.c b/sys/amd64/amd64/db_interface.c
index fe94264..ee4ab19 100644
--- a/sys/amd64/amd64/db_interface.c
+++ b/sys/amd64/amd64/db_interface.c
@@ -142,11 +142,12 @@ kdb_trap(type, code, regs)
#ifdef CPUSTOP_ON_DDBBREAK
#if defined(VERBOSE_CPUSTOP_ON_DDBBREAK)
- db_printf("\nCPU%d stopping CPUs: 0x%08x...", cpuid, other_cpus);
+ db_printf("\nCPU%d stopping CPUs: 0x%08x...", PCPU_GET(cpuid),
+ PCPU_GET(other_cpus));
#endif /* VERBOSE_CPUSTOP_ON_DDBBREAK */
/* We stop all CPUs except ourselves (obviously) */
- stop_cpus(other_cpus);
+ stop_cpus(PCPU_GET(other_cpus));
#if defined(VERBOSE_CPUSTOP_ON_DDBBREAK)
db_printf(" stopped.\n");
@@ -171,13 +172,14 @@ kdb_trap(type, code, regs)
#ifdef CPUSTOP_ON_DDBBREAK
#if defined(VERBOSE_CPUSTOP_ON_DDBBREAK)
- db_printf("\nCPU%d restarting CPUs: 0x%08x...", cpuid, stopped_cpus);
+ db_printf("\nCPU%d restarting CPUs: 0x%08x...", PCPU_GET(cpuid),
+ stopped_cpus);
#endif /* VERBOSE_CPUSTOP_ON_DDBBREAK */
/* Restart all the CPUs we previously stopped */
- if (stopped_cpus != other_cpus && smp_started != 0) {
+ if (stopped_cpus != PCPU_GET(other_cpus) && smp_started != 0) {
db_printf("whoa, other_cpus: 0x%08x, stopped_cpus: 0x%08x\n",
- other_cpus, stopped_cpus);
+ PCPU_GET(other_cpus), stopped_cpus);
panic("stop_cpus() failed");
}
restart_cpus(stopped_cpus);
OpenPOWER on IntegriCloud