From 935ba49b57c25a08e0773785ead144bdb08a5368 Mon Sep 17 00:00:00 2001 From: jhb Date: Thu, 3 Nov 2005 21:06:29 +0000 Subject: 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 --- sys/kern/subr_pcpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys/kern/subr_pcpu.c') 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); -- cgit v1.1