From ffeee43f8f26376671061af7868d4494fdda7743 Mon Sep 17 00:00:00 2001 From: Visa Hankala Date: Thu, 25 May 2017 03:54:11 +0000 Subject: Replace the only usage of x86_pause() with SPINLOCK_SPIN_HOOK. OK dlg@ --- sys/arch/amd64/amd64/lapic.c | 5 +++-- 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 #include #include +#include #include #include #include @@ -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 -static __inline void -x86_pause(void) -{ - /* nothing */ -} - #ifdef _KERNEL extern int cpu_feature; -- cgit v1.2.3