diff options
author | Visa Hankala <visa@cvs.openbsd.org> | 2017-05-25 03:54:11 +0000 |
---|---|---|
committer | Visa Hankala <visa@cvs.openbsd.org> | 2017-05-25 03:54:11 +0000 |
commit | ffeee43f8f26376671061af7868d4494fdda7743 (patch) | |
tree | aa64acf49beba4bb5b268536c56dbc8e2e010d36 | |
parent | 38ff43c91b56fbbefd31514a070d6c9b200b46e5 (diff) |
Replace the only usage of x86_pause() with SPINLOCK_SPIN_HOOK.
OK dlg@
-rw-r--r-- | sys/arch/amd64/amd64/lapic.c | 5 | ||||
-rw-r--r-- | sys/arch/amd64/include/cpufunc.h | 8 |
2 files changed, 4 insertions, 9 deletions
diff --git a/sys/arch/amd64/amd64/lapic.c b/sys/arch/amd64/amd64/lapic.c index 740347cf0bc..8ce1462ded9 100644 --- a/sys/arch/amd64/amd64/lapic.c +++ b/sys/arch/amd64/amd64/lapic.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lapic.c,v 1.45 2016/11/01 01:13:19 yasuoka Exp $ */ +/* $OpenBSD: lapic.c,v 1.46 2017/05/25 03:54:10 visa Exp $ */ /* $NetBSD: lapic.c,v 1.2 2003/05/08 01:04:35 fvdl Exp $ */ /*- @@ -41,6 +41,7 @@ #include <machine/codepatch.h> #include <machine/cpu.h> #include <machine/cpufunc.h> +#include <machine/lock.h> #include <machine/pmap.h> #include <machine/vmparam.h> #include <machine/mpbiosvar.h> @@ -571,7 +572,7 @@ lapic_delay(int usec) deltat -= otick - tick; otick = tick; - x86_pause(); + SPINLOCK_SPIN_HOOK; } } diff --git a/sys/arch/amd64/include/cpufunc.h b/sys/arch/amd64/include/cpufunc.h index 0063241a4f9..75cf8a46969 100644 --- a/sys/arch/amd64/include/cpufunc.h +++ b/sys/arch/amd64/include/cpufunc.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cpufunc.h,v 1.15 2017/04/30 13:04:49 mpi Exp $ */ +/* $OpenBSD: cpufunc.h,v 1.16 2017/05/25 03:54:10 visa Exp $ */ /* $NetBSD: cpufunc.h,v 1.3 2003/05/08 10:27:43 fvdl Exp $ */ /*- @@ -41,12 +41,6 @@ #include <machine/specialreg.h> -static __inline void -x86_pause(void) -{ - /* nothing */ -} - #ifdef _KERNEL extern int cpu_feature; |