Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/m68k Remove mutex stubs for 68010 that merely fall ...



details:   https://anonhg.NetBSD.org/src/rev/7624d6a693f1
branches:  trunk
changeset: 745623:7624d6a693f1
user:      rin <rin%NetBSD.org@localhost>
date:      Sun Mar 08 06:12:01 2020 +0000

description:
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).

diffstat:

 sys/arch/m68k/include/mutex.h   |  4 +++-
 sys/arch/m68k/m68k/lock_stubs.s |  8 +++-----
 2 files changed, 6 insertions(+), 6 deletions(-)

diffs (63 lines):

diff -r bbd400c3d666 -r 7624d6a693f1 sys/arch/m68k/include/mutex.h
--- a/sys/arch/m68k/include/mutex.h     Sun Mar 08 06:06:46 2020 +0000
+++ b/sys/arch/m68k/include/mutex.h     Sun Mar 08 06:12:01 2020 +0000
@@ -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 @@
 #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 -r bbd400c3d666 -r 7624d6a693f1 sys/arch/m68k/m68k/lock_stubs.s
--- a/sys/arch/m68k/m68k/lock_stubs.s   Sun Mar 08 06:06:46 2020 +0000
+++ b/sys/arch/m68k/m68k/lock_stubs.s   Sun Mar 08 06:12:01 2020 +0000
@@ -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 @@
 
 #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
+1:     jra     _C_LABEL(mutex_vector_exit)
 #endif /* !__mc68010__ */
-1:     jra     _C_LABEL(mutex_vector_exit)
 
 #endif /* !LOCKDEBUG */



Home | Main Index | Thread Index | Old Index