Module Name: src
Committed By: skrll
Date: Thu May 19 06:41:45 UTC 2022
Modified Files:
src/sys/arch/hppa/hppa: intr.c lock_stubs.S
Log Message:
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
To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/hppa/hppa/intr.c
cvs rdiff -u -r1.28 -r1.29 src/sys/arch/hppa/hppa/lock_stubs.S
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/hppa/hppa/intr.c
diff -u src/sys/arch/hppa/hppa/intr.c:1.6 src/sys/arch/hppa/hppa/intr.c:1.7
--- src/sys/arch/hppa/hppa/intr.c:1.6 Sat Feb 26 03:02:25 2022
+++ src/sys/arch/hppa/hppa/intr.c Thu May 19 06:41:45 2022
@@ -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 @@ hppa_intr(struct trapframe *frame)
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 @@ hppa_intr(struct trapframe *frame)
* 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
Index: src/sys/arch/hppa/hppa/lock_stubs.S
diff -u src/sys/arch/hppa/hppa/lock_stubs.S:1.28 src/sys/arch/hppa/hppa/lock_stubs.S:1.29
--- src/sys/arch/hppa/hppa/lock_stubs.S:1.28 Sun Mar 20 20:19:34 2022
+++ src/sys/arch/hppa/hppa/lock_stubs.S Thu May 19 06:41:45 2022
@@ -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 @@ mutex_enter_crit_start:
GET_CURLWP(%t2)
bv %r0(%rp)
-mutex_enter_crit_end:
stw %t2, MTX_OWNER(%arg0)
+mutex_enter_crit_end:
EXIT(mutex_enter)
#endif /* !LOCKDEBUG */
@@ -171,8 +171,8 @@ _lock_cas_ras_start:
ldw 0(%arg0),%t1
comb,<> %arg1, %t1, 1f
copy %t1,%ret0
-_lock_cas_ras_end:
stw %arg2,0(%arg0)
+_lock_cas_ras_end:
copy %arg1,%ret0
1:
bv,n %r0(%rp)