diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2017-05-29 14:19:51 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2017-05-29 14:19:51 +0000 |
commit | 9fbf631ea4d32275e2a0b73042a7f5c42b84dddf (patch) | |
tree | 35a6f3a16e30d51a8bcd59b8df375c0d878e41b0 /sys/arch/hppa | |
parent | 3074148f150ad1764336ec65e48c9c96ac9404c9 (diff) |
Kill SPINLOCK_SPIN_HOOK, use CPU_BUSY_CYCLE() instead.
ok visa@, kettenis@
Diffstat (limited to 'sys/arch/hppa')
-rw-r--r-- | sys/arch/hppa/hppa/lock_machdep.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/sys/arch/hppa/hppa/lock_machdep.c b/sys/arch/hppa/hppa/lock_machdep.c index 444e2858f64..972b5bb8886 100644 --- a/sys/arch/hppa/hppa/lock_machdep.c +++ b/sys/arch/hppa/hppa/lock_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lock_machdep.c,v 1.10 2017/04/30 16:45:45 mpi Exp $ */ +/* $OpenBSD: lock_machdep.c,v 1.11 2017/05/29 14:19:49 mpi Exp $ */ /* * Copyright (c) 2007 Artur Grabowski <art@openbsd.org> @@ -22,6 +22,7 @@ #include <machine/atomic.h> #include <machine/intr.h> #include <machine/psl.h> +#include <machine/cpu.h> #include <ddb/db_output.h> @@ -72,19 +73,17 @@ __mp_lock_init(struct __mp_lock *lock) extern int __mp_lock_spinout; #endif -#define SPINLOCK_SPIN_HOOK /**/ - static __inline void __mp_lock_spin(struct __mp_lock *mpl) { #ifndef MP_LOCKDEBUG while (mpl->mpl_count != 0) - SPINLOCK_SPIN_HOOK; + CPU_BUSY_CYCLE(); #else int nticks = __mp_lock_spinout; while (mpl->mpl_count != 0 && --nticks > 0) - SPINLOCK_SPIN_HOOK; + CPU_BUSY_CYCLE(); if (nticks == 0) { db_printf("__mp_lock(%p): lock spun out", mpl); |