Fix an off by one error in r283613: Like regular ffs(), CPU_FFS() returns

1 for CPU 0, etc. so the return value must be decremented to obtain the
first valid CPU ID.

Submitted by:	fabient
MFC after:	1 week
This commit is contained in:
John Baldwin 2015-09-01 17:52:43 +00:00
parent 504a0067c7
commit 7816cb4a0b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=287374

View File

@ -769,7 +769,7 @@ main(int argc, char **argv)
ev->ev_count = -1;
if (option == 'S' || option == 's')
ev->ev_cpu = CPU_FFS(&cpumask);
ev->ev_cpu = CPU_FFS(&cpumask) - 1;
else
ev->ev_cpu = PMC_CPU_ANY;