Index: alpha/include/cpu.h
===================================================================
RCS file: /space2/ncvs/src/sys/alpha/include/cpu.h,v
retrieving revision 1.39
diff -u -p -r1.39 cpu.h
--- alpha/include/cpu.h	20 Jun 2004 03:52:48 -0000	1.39
+++ alpha/include/cpu.h	3 Aug 2004 18:26:22 -0000
@@ -93,6 +93,7 @@ struct clockframe {
 #ifdef _KERNEL
 
 #define	cpu_getstack(td)	(alpha_pal_rdusp())
+#define	cpu_spinwait()		/* nothing */
 #define	get_cyclecount		alpha_rpcc
 
 void	cpu_halt(void);
Index: amd64/include/cpu.h
===================================================================
RCS file: /space2/ncvs/src/sys/amd64/include/cpu.h,v
retrieving revision 1.73
diff -u -p -r1.73 cpu.h
--- amd64/include/cpu.h	20 Jun 2004 03:52:48 -0000	1.73
+++ amd64/include/cpu.h	3 Aug 2004 18:25:59 -0000
@@ -50,9 +50,10 @@
 #undef	COPY_SIGCODE		/* don't copy sigcode above user stack in exec */
 
 #define	cpu_exec(p)	/* nothing */
-#define cpu_swapin(p)	/* nothing */
+#define	cpu_swapin(p)	/* nothing */
 #define	cpu_getstack(td)		((td)->td_frame->tf_rsp)
-#define cpu_setstack(td, ap)		((td)->td_frame->tf_rsp = (ap))
+#define	cpu_setstack(td, ap)		((td)->td_frame->tf_rsp = (ap))
+#define	cpu_spinwait()			ia32_pause()
 
 #define	TRAPF_USERMODE(framep) \
 	(ISPL((framep)->tf_cs) == SEL_UPL)
Index: arm/include/cpu.h
===================================================================
RCS file: /space2/ncvs/src/sys/arm/include/cpu.h,v
retrieving revision 1.1
diff -u -p -r1.1 cpu.h
--- arm/include/cpu.h	14 May 2004 11:46:44 -0000	1.1
+++ arm/include/cpu.h	3 Aug 2004 18:28:33 -0000
@@ -32,6 +32,7 @@ get_cyclecount(void)
 
 #define cpu_getstack(td)        ((td)->td_frame->tf_usr_sp)
 #define cpu_setstack(td, sp)    ((td)->td_frame->tf_usr_sp = (sp))
+#define cpu_spinwait()		/* nothing */
 
 #define ARM_NVEC		8
 #define ARM_VEC_ALL		0xffffffff
Index: i386/include/cpu.h
===================================================================
RCS file: /space2/ncvs/src/sys/i386/include/cpu.h,v
retrieving revision 1.72
diff -u -p -r1.72 cpu.h
--- i386/include/cpu.h	20 Jun 2004 03:52:49 -0000	1.72
+++ i386/include/cpu.h	3 Aug 2004 18:25:44 -0000
@@ -50,9 +50,10 @@
 #undef	COPY_SIGCODE		/* don't copy sigcode above user stack in exec */
 
 #define	cpu_exec(p)	/* nothing */
-#define cpu_swapin(p)	/* nothing */
+#define	cpu_swapin(p)	/* nothing */
 #define	cpu_getstack(td)		((td)->td_frame->tf_esp)
-#define cpu_setstack(td, ap)		((td)->td_frame->tf_esp = (ap))
+#define	cpu_setstack(td, ap)		((td)->td_frame->tf_esp = (ap))
+#define	cpu_spinwait()			ia32_pause()
 
 #define	TRAPF_USERMODE(framep) \
 	((ISPL((framep)->tf_cs) == SEL_UPL) || ((framep)->tf_eflags & PSL_VM))
Index: ia64/include/cpu.h
===================================================================
RCS file: /space2/ncvs/src/sys/ia64/include/cpu.h,v
retrieving revision 1.43
diff -u -p -r1.43 cpu.h
--- ia64/include/cpu.h	20 Jun 2004 03:52:49 -0000	1.43
+++ ia64/include/cpu.h	3 Aug 2004 18:25:52 -0000
@@ -86,6 +86,7 @@ struct clockframe {
 
 /* Used by signaling code. */
 #define	cpu_getstack(td)	((td)->td_frame->tf_special.sp)
+#define	cpu_spinwait()		/* nothing */
 
 void	cpu_halt(void);
 void	cpu_reset(void);
Index: powerpc/include/cpu.h
===================================================================
RCS file: /space2/ncvs/src/sys/powerpc/include/cpu.h,v
retrieving revision 1.16
diff -u -p -r1.16 cpu.h
--- powerpc/include/cpu.h	26 Sep 2003 09:02:24 -0000	1.16
+++ powerpc/include/cpu.h	3 Aug 2004 18:26:16 -0000
@@ -89,6 +89,7 @@ get_cyclecount(void)
 }
 
 #define	cpu_getstack(td)	((td)->td_frame->fixreg[1])
+#define	cpu_spinwait()		/* nothing */
 
 void	cpu_halt(void);
 void	cpu_reset(void);
Index: sparc64/include/cpu.h
===================================================================
RCS file: /space2/ncvs/src/sys/sparc64/include/cpu.h,v
retrieving revision 1.14
diff -u -p -r1.14 cpu.h
--- sparc64/include/cpu.h	20 Jun 2004 03:52:50 -0000	1.14
+++ sparc64/include/cpu.h	3 Aug 2004 18:26:29 -0000
@@ -48,6 +48,7 @@
 
 #define	cpu_getstack(td)	((td)->td_frame->tf_sp)
 #define	cpu_setstack(td, sp)	((td)->td_frame->tf_sp = (sp))
+#define	cpu_spinwait()		/* nothing */
 
 /*
  * CTL_MACHDEP definitions.
Index: kern/kern_mutex.c
===================================================================
RCS file: /space2/ncvs/src/sys/kern/kern_mutex.c,v
retrieving revision 1.145
diff -u -p -r1.145 kern_mutex.c
--- kern/kern_mutex.c	27 Jul 2004 16:34:47 -0000	1.145
+++ kern/kern_mutex.c	3 Aug 2004 18:26:49 -0000
@@ -465,9 +465,7 @@ _mtx_lock_sleep(struct mtx *m, int opts,
 		 */
 		if (v == MTX_UNOWNED) {
 			turnstile_release(&m->mtx_object);
-#if defined(__i386__) || defined(__amd64__)
-			ia32_pause();
-#endif
+			cpu_spinwait();
 			continue;
 		}
 
@@ -497,9 +495,7 @@ _mtx_lock_sleep(struct mtx *m, int opts,
 		    !atomic_cmpset_ptr(&m->mtx_lock, (void *)v,
 			(void *)(v | MTX_CONTESTED))) {
 			turnstile_release(&m->mtx_object);
-#if defined(__i386__) || defined(__amd64__)
-			ia32_pause();
-#endif
+			cpu_spinwait();
 			continue;
 		}
 
@@ -516,9 +512,7 @@ _mtx_lock_sleep(struct mtx *m, int opts,
 #endif
 			turnstile_release(&m->mtx_object);
 			while (mtx_owner(m) == owner && TD_IS_RUNNING(owner)) {
-#if defined(__i386__) || defined(__amd64__)
-				ia32_pause();
-#endif
+				cpu_spinwait();
 			}
 			continue;
 		}
@@ -583,9 +577,7 @@ _mtx_lock_spin(struct mtx *m, int opts, 
 		critical_exit();
 		while (m->mtx_lock != MTX_UNOWNED) {
 			if (i++ < 10000000) {
-#if defined(__i386__) || defined(__amd64__)
-				ia32_pause();
-#endif
+				cpu_spinwait();
 				continue;
 			}
 			if (i < 60000000)
@@ -599,9 +591,7 @@ _mtx_lock_spin(struct mtx *m, int opts, 
 #endif
 				panic("spin lock held too long");
 			}
-#if defined(__i386__) || defined(__amd64__)
-			ia32_pause();
-#endif
+			cpu_spinwait();
 		}
 		critical_enter();
 	}
