summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/amd64/amd64/cpu.c4
-rw-r--r--sys/arch/amd64/amd64/gdt.c6
-rw-r--r--sys/arch/amd64/amd64/intr.c6
-rw-r--r--sys/arch/amd64/amd64/ipi.c6
-rw-r--r--sys/arch/amd64/amd64/pmap.c12
-rw-r--r--sys/arch/amd64/include/cpu.h6
-rw-r--r--sys/arch/hppa64/include/cpu.h4
-rw-r--r--sys/arch/i386/i386/gdt.c6
-rw-r--r--sys/arch/i386/i386/pmap.c10
-rw-r--r--sys/arch/i386/include/cpu.h6
-rw-r--r--sys/kern/kern_sysctl.c6
11 files changed, 36 insertions, 36 deletions
diff --git a/sys/arch/amd64/amd64/cpu.c b/sys/arch/amd64/amd64/cpu.c
index 3d628ab3f4c..2e34b0c5e5c 100644
--- a/sys/arch/amd64/amd64/cpu.c
+++ b/sys/arch/amd64/amd64/cpu.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cpu.c,v 1.10 2005/07/26 08:38:29 art Exp $ */
+/* $OpenBSD: cpu.c,v 1.11 2005/09/25 20:48:18 miod Exp $ */
/* $NetBSD: cpu.c,v 1.1 2003/04/26 18:39:26 fvdl Exp $ */
/*-
@@ -563,7 +563,7 @@ cpu_debug_dump(void)
CPU_INFO_ITERATOR cii;
db_printf("addr dev id flags ipis curproc fpcurproc\n");
- for (CPU_INFO_FOREACH(cii, ci)) {
+ CPU_INFO_FOREACH(cii, ci) {
db_printf("%p %s %u %x %x %10p %10p\n",
ci,
ci->ci_dev == NULL ? "BOOT" : ci->ci_dev->dv_xname,
diff --git a/sys/arch/amd64/amd64/gdt.c b/sys/arch/amd64/amd64/gdt.c
index 19900d362c0..73a267ca697 100644
--- a/sys/arch/amd64/amd64/gdt.c
+++ b/sys/arch/amd64/amd64/gdt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: gdt.c,v 1.5 2004/07/08 04:23:04 david Exp $ */
+/* $OpenBSD: gdt.c,v 1.6 2005/09/25 20:48:18 miod Exp $ */
/* $NetBSD: gdt.c,v 1.1 2003/04/26 18:39:28 fvdl Exp $ */
/*-
@@ -105,7 +105,7 @@ set_mem_gdt(sd, base, limit, type, dpl, gran, def32, is64)
set_mem_segment(sd, base, limit, type, dpl, gran, def32, is64);
off = (char *)sd - gdtstore;
- for (CPU_INFO_FOREACH(cii, ci)) {
+ CPU_INFO_FOREACH(cii, ci) {
if (ci->ci_gdt != NULL)
*(struct mem_segment_descriptor *)(ci->ci_gdt + off) =
*sd;
@@ -125,7 +125,7 @@ set_sys_gdt(sd, base, limit, type, dpl, gran)
set_sys_segment(sd, base, limit, type, dpl, gran);
off = (char *)sd - gdtstore;
- for (CPU_INFO_FOREACH(cii, ci)) {
+ CPU_INFO_FOREACH(cii, ci) {
if (ci->ci_gdt != NULL)
*(struct sys_segment_descriptor *)(ci->ci_gdt + off) =
*sd;
diff --git a/sys/arch/amd64/amd64/intr.c b/sys/arch/amd64/amd64/intr.c
index d04ebb5cdfe..33007b95447 100644
--- a/sys/arch/amd64/amd64/intr.c
+++ b/sys/arch/amd64/amd64/intr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: intr.c,v 1.10 2005/07/26 08:07:39 art Exp $ */
+/* $OpenBSD: intr.c,v 1.11 2005/09/25 20:48:18 miod Exp $ */
/* $NetBSD: intr.c,v 1.3 2003/03/03 22:16:20 fvdl Exp $ */
/*
@@ -322,7 +322,7 @@ other:
/*
* ..now try the others.
*/
- for (CPU_INFO_FOREACH(cii, ci)) {
+ CPU_INFO_FOREACH(cii, ci) {
if (CPU_IS_PRIMARY(ci))
continue;
error = intr_allocate_slot_cpu(ci, pic, pin, &slot);
@@ -687,7 +687,7 @@ intr_printconfig(void)
struct cpu_info *ci;
CPU_INFO_ITERATOR cii;
- for (CPU_INFO_FOREACH(cii, ci)) {
+ CPU_INFO_FOREACH(cii, ci) {
printf("cpu%d: interrupt masks:\n", ci->ci_apicid);
for (i = 0; i < NIPL; i++)
printf("IPL %d mask %lx unmask %lx\n", i,
diff --git a/sys/arch/amd64/amd64/ipi.c b/sys/arch/amd64/amd64/ipi.c
index 8cdecb60207..3bee6bfd3dd 100644
--- a/sys/arch/amd64/amd64/ipi.c
+++ b/sys/arch/amd64/amd64/ipi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ipi.c,v 1.1 2004/06/25 11:03:27 art Exp $ */
+/* $OpenBSD: ipi.c,v 1.2 2005/09/25 20:48:18 miod Exp $ */
/* $NetBSD: ipi.c,v 1.2 2003/03/01 13:05:37 fvdl Exp $ */
/*-
@@ -90,7 +90,7 @@ x86_broadcast_ipi (int ipimask)
CPU_INFO_ITERATOR cii;
- for (CPU_INFO_FOREACH(cii, ci)) {
+ CPU_INFO_FOREACH(cii, ci) {
if (ci == self)
continue;
if ((ci->ci_flags & CPUF_RUNNING) == 0)
@@ -116,7 +116,7 @@ x86_multicast_ipi(int cpumask, int ipimask)
if (cpumask == 0)
return;
- for (CPU_INFO_FOREACH(cii, ci)) {
+ CPU_INFO_FOREACH(cii, ci) {
if ((cpumask & (1U << ci->ci_cpuid)) == 0)
continue;
x86_send_ipi(ci, ipimask);
diff --git a/sys/arch/amd64/amd64/pmap.c b/sys/arch/amd64/amd64/pmap.c
index 3998d216fde..28522d327cf 100644
--- a/sys/arch/amd64/amd64/pmap.c
+++ b/sys/arch/amd64/amd64/pmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.c,v 1.11 2005/07/26 08:38:29 art Exp $ */
+/* $OpenBSD: pmap.c,v 1.12 2005/09/25 20:48:18 miod Exp $ */
/* $NetBSD: pmap.c,v 1.3 2003/05/08 18:13:13 thorpej Exp $ */
/*
@@ -489,7 +489,7 @@ pmap_apte_flush(struct pmap *pmap)
*
* XXXthorpej -- find a way to defer the IPI.
*/
- for (CPU_INFO_FOREACH(cii, ci)) {
+ CPU_INFO_FOREACH(cii, ci) {
if (ci == self)
continue;
if (pmap_is_active(pmap, ci->ci_cpuid)) {
@@ -1024,7 +1024,7 @@ pmap_init(void)
* pmap_remove_pv: remove a mappiing from a pv_head list
*
* NOTE: pmap_enter_pv expects to lock the pvh itself
- * pmap_remove_pv expects te caller to lock the pvh before calling
+ * pmap_remove_pv expects the caller to lock the pvh before calling
*/
/*
@@ -2901,7 +2901,7 @@ pmap_tlb_shootnow(int32_t cpumask)
/*
* Send the TLB IPI to other CPUs pending shootdowns.
*/
- for (CPU_INFO_FOREACH(cii, ci)) {
+ CPU_INFO_FOREACH(cii, ci) {
if (ci == self)
continue;
if (cpumask & (1U << ci->ci_cpuid))
@@ -2953,7 +2953,7 @@ pmap_tlb_shootdown(pmap, va, pte, cpumaskp)
printf("doshootdown %lx\n", va);
#endif
- for (CPU_INFO_FOREACH(cii, ci)) {
+ CPU_INFO_FOREACH(cii, ci) {
/* Note: we queue shootdown events for ourselves here! */
if (pmap_is_active(pmap, ci->ci_cpuid) == 0)
continue;
@@ -3055,7 +3055,7 @@ pmap_do_tlb_shootdown(struct cpu_info *self)
}
#ifdef MULTIPROCESSOR
- for (CPU_INFO_FOREACH(cii, ci))
+ CPU_INFO_FOREACH(cii, ci)
x86_atomic_clearbits_ul(&ci->ci_tlb_ipi_mask,
(1U << cpu_id));
#endif
diff --git a/sys/arch/amd64/include/cpu.h b/sys/arch/amd64/include/cpu.h
index f5b9a201917..6e5a9d49cb3 100644
--- a/sys/arch/amd64/include/cpu.h
+++ b/sys/arch/amd64/include/cpu.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: cpu.h,v 1.15 2005/09/20 23:00:34 deraadt Exp $ */
+/* $OpenBSD: cpu.h,v 1.16 2005/09/25 20:48:21 miod Exp $ */
/* $NetBSD: cpu.h,v 1.1 2003/04/26 18:39:39 fvdl Exp $ */
/*-
@@ -141,8 +141,8 @@ extern struct cpu_info cpu_info_primary;
extern struct cpu_info *cpu_info_list;
#define CPU_INFO_ITERATOR int
-#define CPU_INFO_FOREACH(cii, ci) cii = 0, ci = cpu_info_list; \
- ci != NULL; ci = ci->ci_next
+#define CPU_INFO_FOREACH(cii, ci) for (cii = 0, ci = cpu_info_list; \
+ ci != NULL; ci = ci->ci_next)
#define CPU_INFO_UNIT(ci) ((ci)->ci_dev->dv_unit)
diff --git a/sys/arch/hppa64/include/cpu.h b/sys/arch/hppa64/include/cpu.h
index a8d83bfdbbc..f8b6770b7cd 100644
--- a/sys/arch/hppa64/include/cpu.h
+++ b/sys/arch/hppa64/include/cpu.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: cpu.h,v 1.7 2005/09/20 23:00:34 deraadt Exp $ */
+/* $OpenBSD: cpu.h,v 1.8 2005/09/25 20:48:21 miod Exp $ */
/*
* Copyright (c) 2005 Michael Shalayeff
@@ -142,7 +142,7 @@ struct cpu_info *curcpu(void);
#define CPU_IS_PRIMARY(ci) ((ci)->ci_number == 0)
#define CPU_INFO_ITERATOR int
#define CPU_INFO_FOREACH(cii,ci) \
- cii = 0, ci = curcpu(); ci != NULL; ci = ci->ci_next
+ for (cii = 0, ci = curcpu(); ci != NULL; ci = ci->ci_next)
#define CPU_INFO_UNIT(ci) ((ci)->ci_number)
#ifdef DIAGNOSTIC
diff --git a/sys/arch/i386/i386/gdt.c b/sys/arch/i386/i386/gdt.c
index bbe43b9b4f9..bfe166f6bea 100644
--- a/sys/arch/i386/i386/gdt.c
+++ b/sys/arch/i386/i386/gdt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: gdt.c,v 1.22 2004/12/06 23:40:43 hshoexer Exp $ */
+/* $OpenBSD: gdt.c,v 1.23 2005/09/25 20:48:21 miod Exp $ */
/* $NetBSD: gdt.c,v 1.28 2002/12/14 09:38:50 junyoung Exp $ */
/*-
@@ -116,7 +116,7 @@ setgdt(int sel, void *base, size_t limit, int type, int dpl, int def32,
struct cpu_info *ci;
setsegment(sd, base, limit, type, dpl, def32, gran);
- for (CPU_INFO_FOREACH(cii, ci))
+ CPU_INFO_FOREACH(cii, ci)
if (ci->ci_gdt != NULL && ci->ci_gdt != gdt)
ci->ci_gdt[sel].sd = *sd;
}
@@ -210,7 +210,7 @@ gdt_grow()
gdt_size <<= 1;
new_len = old_len << 1;
- for (CPU_INFO_FOREACH(cii, ci)) {
+ CPU_INFO_FOREACH(cii, ci) {
for (va = (vaddr_t)(ci->ci_gdt) + old_len;
va < (vaddr_t)(ci->ci_gdt) + new_len;
va += PAGE_SIZE) {
diff --git a/sys/arch/i386/i386/pmap.c b/sys/arch/i386/i386/pmap.c
index f8f4ca15cca..ba0868220b6 100644
--- a/sys/arch/i386/i386/pmap.c
+++ b/sys/arch/i386/i386/pmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.c,v 1.82 2005/07/12 21:12:03 hshoexer Exp $ */
+/* $OpenBSD: pmap.c,v 1.83 2005/09/25 20:48:21 miod Exp $ */
/* $NetBSD: pmap.c,v 1.91 2000/06/02 17:46:37 thorpej Exp $ */
/*
@@ -598,7 +598,7 @@ pmap_apte_flush(struct pmap *pmap)
*
* XXXthorpej -- find a way to defer the IPI.
*/
- for (CPU_INFO_FOREACH(cii, ci)) {
+ CPU_INFO_FOREACH(cii, ci) {
if (ci == self)
continue;
if (pmap_is_active(pmap, ci->ci_cpuid)) {
@@ -3515,7 +3515,7 @@ pmap_tlb_shootnow(int32_t cpumask)
/*
* Send the TLB IPI to other CPUs pending shootdowns.
*/
- for (CPU_INFO_FOREACH(cii, ci)) {
+ CPU_INFO_FOREACH(cii, ci) {
if (ci == self)
continue;
if (cpumask & (1U << ci->ci_cpuid))
@@ -3566,7 +3566,7 @@ pmap_tlb_shootdown(pmap, va, pte, cpumaskp)
printf("dshootdown %lx\n", va);
#endif
- for (CPU_INFO_FOREACH(cii, ci)) {
+ CPU_INFO_FOREACH(cii, ci) {
/* Note: we queue shootdown events for ourselves here! */
if (pmap_is_active(pmap, ci->ci_cpuid) == 0)
continue;
@@ -3687,7 +3687,7 @@ pmap_do_tlb_shootdown(struct cpu_info *self)
}
#ifdef MULTIPROCESSOR
- for (CPU_INFO_FOREACH(cii, ci))
+ CPU_INFO_FOREACH(cii, ci)
i386_atomic_clearbits_l(&ci->ci_tlb_ipi_mask,
(1U << cpu_id));
#endif
diff --git a/sys/arch/i386/include/cpu.h b/sys/arch/i386/include/cpu.h
index 156c7268ed9..6b963f4dbeb 100644
--- a/sys/arch/i386/include/cpu.h
+++ b/sys/arch/i386/include/cpu.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: cpu.h,v 1.70 2005/09/20 23:00:34 deraadt Exp $ */
+/* $OpenBSD: cpu.h,v 1.71 2005/09/25 20:48:23 miod Exp $ */
/* $NetBSD: cpu.h,v 1.35 1996/05/05 19:29:26 christos Exp $ */
/*-
@@ -167,8 +167,8 @@ extern struct cpu_info cpu_info_primary;
extern struct cpu_info *cpu_info_list;
#define CPU_INFO_ITERATOR int
-#define CPU_INFO_FOREACH(cii, ci) cii = 0, ci = cpu_info_list; \
- ci != NULL; ci = ci->ci_next
+#define CPU_INFO_FOREACH(cii, ci) for (cii = 0, ci = cpu_info_list; \
+ ci != NULL; ci = ci->ci_next)
#define CPU_INFO_UNIT(ci) ((ci)->ci_dev.dv_unit)
diff --git a/sys/kern/kern_sysctl.c b/sys/kern/kern_sysctl.c
index 0457c18241c..bf03966144c 100644
--- a/sys/kern/kern_sysctl.c
+++ b/sys/kern/kern_sysctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_sysctl.c,v 1.130 2005/09/20 23:01:06 deraadt Exp $ */
+/* $OpenBSD: kern_sysctl.c,v 1.131 2005/09/25 20:48:23 miod Exp $ */
/* $NetBSD: kern_sysctl.c,v 1.17 1996/05/20 17:49:05 mrg Exp $ */
/*-
@@ -460,7 +460,7 @@ kern_sysctl(name, namelen, oldp, oldlenp, newp, newlen, p)
bzero(cp_time, sizeof(cp_time));
- for (CPU_INFO_FOREACH(cii, ci)) {
+ CPU_INFO_FOREACH(cii, ci) {
for (i = 0; i < CPUSTATES; i++)
cp_time[i] += ci->ci_schedstate.spc_cp_time[i];
}
@@ -1902,7 +1902,7 @@ sysctl_cptime2(int *name, u_int namelen, void *oldp, size_t *oldlenp,
i = name[0];
- for (CPU_INFO_FOREACH(cii, ci)) {
+ CPU_INFO_FOREACH(cii, ci) {
if (i-- == 0)
break;
}