summaryrefslogtreecommitdiffstats
path: root/sys/x86
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2010-06-11 18:46:34 +0000
committerjhb <jhb@FreeBSD.org>2010-06-11 18:46:34 +0000
commit9b74a62d735d756ad10a232bb6b9bf1d5803a473 (patch)
tree6823a317037813f606c0b52d6cfa18c924eb9a1d /sys/x86
parent4945d8d26d66a088d72189bf54f9678981e78766 (diff)
downloadFreeBSD-src-9b74a62d735d756ad10a232bb6b9bf1d5803a473.zip
FreeBSD-src-9b74a62d735d756ad10a232bb6b9bf1d5803a473.tar.gz
Update several places that iterate over CPUs to use CPU_FOREACH().
Diffstat (limited to 'sys/x86')
-rw-r--r--sys/x86/x86/mca.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/x86/x86/mca.c b/sys/x86/x86/mca.c
index eb8ab27..089c65b 100644
--- a/sys/x86/x86/mca.c
+++ b/sys/x86/x86/mca.c
@@ -558,7 +558,7 @@ mca_scan(enum scan_mode mode)
* If this is a bank this CPU monitors via CMCI,
* update the threshold.
*/
- if (PCPU_GET(cmci_mask) & (1 << i))
+ if (PCPU_GET(cmci_mask) & 1 << i)
cmci_update(mode, i, valid, &rec);
#endif
}
@@ -580,9 +580,7 @@ mca_scan_cpus(void *context, int pending)
td = curthread;
count = 0;
thread_lock(td);
- for (cpu = 0; cpu <= mp_maxid; cpu++) {
- if (CPU_ABSENT(cpu))
- continue;
+ CPU_FOREACH(cpu) {
sched_bind(td, cpu);
thread_unlock(td);
count += mca_scan(POLLED);
OpenPOWER on IntegriCloud