summaryrefslogtreecommitdiffstats
path: root/sys/kern/subr_pcpu.c
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2005-11-03 21:06:29 +0000
committerjhb <jhb@FreeBSD.org>2005-11-03 21:06:29 +0000
commit935ba49b57c25a08e0773785ead144bdb08a5368 (patch)
tree964b16e4043ca827aadbfe4948b41e83fc5e3f99 /sys/kern/subr_pcpu.c
parenta5b17cb66c65b7cc57c89f226bda7570ea2ee410 (diff)
downloadFreeBSD-src-935ba49b57c25a08e0773785ead144bdb08a5368.zip
FreeBSD-src-935ba49b57c25a08e0773785ead144bdb08a5368.tar.gz
Fix 'show allpcpu' ddb command on non-x86. CPU IDs are in the range 0 ..
mp_maxid, not 0 .. mp_maxid - 1. The result was that the highest numbered CPU was skipped on Alpha and sparc64. MFC after: 1 week
Diffstat (limited to 'sys/kern/subr_pcpu.c')
-rw-r--r--sys/kern/subr_pcpu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/subr_pcpu.c b/sys/kern/subr_pcpu.c
index bacf5ba..bf9b0c7 100644
--- a/sys/kern/subr_pcpu.c
+++ b/sys/kern/subr_pcpu.c
@@ -158,7 +158,7 @@ DB_SHOW_COMMAND(allpcpu, db_show_cpu_all)
int id;
db_printf("Current CPU: %d\n\n", PCPU_GET(cpuid));
- for (id = 0; id < mp_maxid; id++) {
+ for (id = 0; id <= mp_maxid; id++) {
pc = pcpu_find(id);
if (pc != NULL) {
show_pcpu(pc);
OpenPOWER on IntegriCloud