Module Name: src
Committed By: kalvisd
Date: Mon Dec 18 22:40:01 UTC 2023
Modified Files:
src/sys/arch/vax/vax: subr.S
Log Message:
vax: preserve AST requests raised when handling software interrupts
PR port-vax/55415
On return from a software interrupt, if the software interrupt LWP
raised an AST request, copy the AST level from its PCB to the PCB
of the interrupted LWP.
Reviewed by <ragge>
To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/sys/arch/vax/vax/subr.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/vax/vax/subr.S
diff -u src/sys/arch/vax/vax/subr.S:1.42 src/sys/arch/vax/vax/subr.S:1.43
--- src/sys/arch/vax/vax/subr.S:1.42 Thu Feb 23 14:57:08 2023
+++ src/sys/arch/vax/vax/subr.S Mon Dec 18 22:40:01 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: subr.S,v 1.42 2023/02/23 14:57:08 riastradh Exp $ */
+/* $NetBSD: subr.S,v 1.43 2023/12/18 22:40:01 kalvisd Exp $ */
/*
* Copyright (c) 1994 Ludd, University of Lule}, Sweden.
@@ -319,7 +319,18 @@ softint_process:
movl %r6,CI_CURLWP(%r8)
/* XXX store-before-load barrier -- see cpu_switchto */
#endif
-
+ /* copy AST level from current LWP to pinned LWP, reset
+ current AST level */
+ mfpr $PR_SSP,%r4 /* current LWP */
+ movl L_PCB(%r4),%r4 /* PCB address */
+ movl P0LR(%r4),%r0 /* LR and ASTLVL field, current PCB */
+ movl P0LR(%r3),%r1 /* same, pinned LWP */
+ cmpl %r0,%r1
+ bgtru 1f /* AST(current) >= AST(pinned) */
+ extv $24,$3,%r0,%r0 /* ASTLVL field for current LWP */
+ insv %r0,$24,$3,P0LR(%r3) /* copy to pinned LWP */
+ insv $4,$24,$3,P0LR(%r4) /* reset AST for current LWP */
+1:
mtpr PCB_PADDR(%r3),$PR_PCBB /* restore PA of interrupted pcb */
ldpctx /* implicitly updates curlwp */
rei