Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/hppa/hppa port-hppa/56837: RAS support is slightly ...



details:   https://anonhg.NetBSD.org/src/rev/bd397981ed78
branches:  trunk
changeset: 366224:bd397981ed78
user:      skrll <skrll%NetBSD.org@localhost>
date:      Thu May 19 06:41:45 2022 +0000

description:
port-hppa/56837: RAS support is slightly incorrect within hppa kernel, too

While there isn't a bug here (the tf_iioq_tail handling is correct) apply
the change to make the conditional / ras symbols consistent with hppa_ras

diffstat:

 sys/arch/hppa/hppa/intr.c       |  12 ++++++------
 sys/arch/hppa/hppa/lock_stubs.S |   6 +++---
 2 files changed, 9 insertions(+), 9 deletions(-)

diffs (69 lines):

diff -r ed9a0771f737 -r bd397981ed78 sys/arch/hppa/hppa/intr.c
--- a/sys/arch/hppa/hppa/intr.c Thu May 19 04:43:43 2022 +0000
+++ b/sys/arch/hppa/hppa/intr.c Thu May 19 06:41:45 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: intr.c,v 1.6 2022/02/26 03:02:25 macallan Exp $        */
+/*     $NetBSD: intr.c,v 1.7 2022/05/19 06:41:45 skrll Exp $   */
 /*     $OpenBSD: intr.c,v 1.27 2009/12/31 12:52:35 jsing Exp $ */
 
 /*
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.6 2022/02/26 03:02:25 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.7 2022/05/19 06:41:45 skrll Exp $");
 
 #define __MUTEX_PRIVATE
 
@@ -339,8 +339,8 @@
        extern char _lock_cas_ras_end[];
 
        if (frame->tf_iisq_head == HPPA_SID_KERNEL &&
-           frame->tf_iioq_head >= (u_int)_lock_cas_ras_start &&
-           frame->tf_iioq_head <= (u_int)_lock_cas_ras_end) {
+           frame->tf_iioq_head > (u_int)_lock_cas_ras_start &&
+           frame->tf_iioq_head < (u_int)_lock_cas_ras_end) {
                frame->tf_iioq_head = (u_int)_lock_cas_ras_start;
                frame->tf_iioq_tail = (u_int)_lock_cas_ras_start + 4;
        }
@@ -353,8 +353,8 @@
         * the owner value is left unset.
         */
        if (frame->tf_iisq_head == HPPA_SID_KERNEL &&
-           frame->tf_iioq_head >= (u_int)mutex_enter_crit_start &&
-           frame->tf_iioq_head <= (u_int)mutex_enter_crit_end &&
+           frame->tf_iioq_head > (u_int)mutex_enter_crit_start &&
+           frame->tf_iioq_head < (u_int)mutex_enter_crit_end &&
            frame->tf_ret0 != 0)
                ((kmutex_t *)frame->tf_arg0)->mtx_owner = (uintptr_t)curlwp;
 #endif
diff -r ed9a0771f737 -r bd397981ed78 sys/arch/hppa/hppa/lock_stubs.S
--- a/sys/arch/hppa/hppa/lock_stubs.S   Thu May 19 04:43:43 2022 +0000
+++ b/sys/arch/hppa/hppa/lock_stubs.S   Thu May 19 06:41:45 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: lock_stubs.S,v 1.28 2022/03/20 20:19:34 andvar Exp $   */
+/*     $NetBSD: lock_stubs.S,v 1.29 2022/05/19 06:41:45 skrll Exp $    */
 
 /*-
  * Copyright (c) 2006, 2007 The NetBSD Foundation, Inc.
@@ -155,8 +155,8 @@
        GET_CURLWP(%t2)
 
        bv      %r0(%rp)
+        stw    %t2, MTX_OWNER(%arg0)
 mutex_enter_crit_end:
-        stw    %t2, MTX_OWNER(%arg0)
 EXIT(mutex_enter)
 
 #endif /* !LOCKDEBUG */
@@ -171,8 +171,8 @@
        ldw     0(%arg0),%t1
        comb,<> %arg1, %t1, 1f
         copy   %t1,%ret0
+       stw     %arg2,0(%arg0)
 _lock_cas_ras_end:
-       stw     %arg2,0(%arg0)
        copy    %arg1,%ret0
 1:
        bv,n    %r0(%rp)



Home | Main Index | Thread Index | Old Index