diff options
| author | rin <rin@NetBSD.org> | 2020-03-08 06:12:01 +0000 |
|---|---|---|
| committer | rin <rin@NetBSD.org> | 2020-03-08 06:12:01 +0000 |
| commit | 3e141cf2d9269e263eed1d7577affd0bccdee9c8 (patch) | |
| tree | b90dbb4a1955d4d65dd86361487e96f117d6df8d | |
| parent | b6755297b66bf91ed9d00d553981a11d2cc8f9be (diff) | |
Remove mutex stubs for 68010 that merely fall back to C codes, and
do not work with kern_mutex.c rev 1.85 and later:
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/kern/kern_mutex.c#rev1.85
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/kern/kern_mutex.c#rev1.86
Fix sun2 kernel freeze during early boot stage in mutex_exit(9).
| -rw-r--r-- | sys/arch/m68k/include/mutex.h | 4 | ||||
| -rw-r--r-- | sys/arch/m68k/m68k/lock_stubs.s | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/sys/arch/m68k/include/mutex.h b/sys/arch/m68k/include/mutex.h index bec94b03f83..cb92d03f60b 100644 --- a/sys/arch/m68k/include/mutex.h +++ b/sys/arch/m68k/include/mutex.h @@ -1,4 +1,4 @@ -/* $NetBSD: mutex.h,v 1.9 2019/11/29 22:55:33 riastradh Exp $ */ +/* $NetBSD: mutex.h,v 1.10 2020/03/08 06:12:01 rin Exp $ */ /*- * Copyright (c) 2002, 2007 The NetBSD Foundation, Inc. @@ -60,7 +60,9 @@ struct kmutex { #define mtx_lock u.s.mtxs_lock #define __HAVE_SIMPLE_MUTEXES 1 +#ifndef __mc68010__ #define __HAVE_MUTEX_STUBS 1 +#endif #define MUTEX_CAS(p, o, n) (atomic_cas_uint((p), (o), (n)) == (o)) diff --git a/sys/arch/m68k/m68k/lock_stubs.s b/sys/arch/m68k/m68k/lock_stubs.s index e2912a1d565..a09dce37610 100644 --- a/sys/arch/m68k/m68k/lock_stubs.s +++ b/sys/arch/m68k/m68k/lock_stubs.s @@ -1,4 +1,4 @@ -/* $NetBSD: lock_stubs.s,v 1.9 2013/08/01 13:42:52 matt Exp $ */ +/* $NetBSD: lock_stubs.s,v 1.10 2020/03/08 06:12:01 rin Exp $ */ /*- * Copyright (c) 2007 The NetBSD Foundation, Inc. @@ -83,32 +83,30 @@ STRONG_ALIAS(_atomic_cas_ulong_ni,_atomic_cas_32) #if !defined(LOCKDEBUG) +#if !defined(__mc68010__) /* * void mutex_enter(kmutex_t *mtx); */ ENTRY(mutex_enter) -#if !defined(__mc68010__) movq #0,%d0 movl _C_LABEL(curlwp),%d1 movl 4(%sp),%a0 casl %d0,%d1,(%a0) bnes 1f rts -#endif /* !__mc68010__ */ 1: jra _C_LABEL(mutex_vector_enter) /* * void mutex_exit(kmutex_t *mtx); */ ENTRY(mutex_exit) -#if !defined(__mc68010__) movl _C_LABEL(curlwp),%d0 movq #0,%d1 movl 4(%sp),%a0 casl %d0,%d1,(%a0) bnes 1f rts -#endif /* !__mc68010__ */ 1: jra _C_LABEL(mutex_vector_exit) +#endif /* !__mc68010__ */ #endif /* !LOCKDEBUG */ |
