Module Name:    src
Committed By:   oster
Date:           Sun Sep 10 00:15:52 UTC 2023

Modified Files:
        src/sys/arch/vax/include: cpu.h

Log Message:
With the overhaul of the scheduler code the semantics of
ci_want_resched have changed, and for some reason vax
still requires ci_want_resched set to 1 in order to do
preemption.  This commit contains a workaround for the
preemption issued discussed in PR#55415.

XXX pullup-10


To generate a diff of this commit:
cvs rdiff -u -r1.106 -r1.107 src/sys/arch/vax/include/cpu.h

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/include/cpu.h
diff -u src/sys/arch/vax/include/cpu.h:1.106 src/sys/arch/vax/include/cpu.h:1.107
--- src/sys/arch/vax/include/cpu.h:1.106	Sun Dec 11 18:02:40 2022
+++ src/sys/arch/vax/include/cpu.h	Sun Sep 10 00:15:52 2023
@@ -1,4 +1,4 @@
-/*      $NetBSD: cpu.h,v 1.106 2022/12/11 18:02:40 oster Exp $      */
+/*      $NetBSD: cpu.h,v 1.107 2023/09/10 00:15:52 oster Exp $      */
 
 /*
  * Copyright (c) 1994 Ludd, University of Lule}, Sweden
@@ -156,10 +156,15 @@ extern int cpu_printfataltraps;
 #define	curcpu()		(curlwp->l_cpu + 0)
 #define	curlwp			((struct lwp *)mfpr(PR_SSP))
 #define	cpu_number()		(curcpu()->ci_cpuid)
+/* XXX RESCHED_REMOTE isn't the right flag name to be used here,
+but we need to set ci_want_resched to '1' to make things work 
+on vax.  See PR#55415 */
 #define	cpu_need_resched(ci, l, flags)		\
 	do {							\
 		struct pcb *pcb = lwp_getpcb(curlwp);		\
 		__USE(flags);					\
+		/* XXX RESCHED_REMOTE isn't the right flag */   \
+		(ci)->ci_want_resched = RESCHED_REMOTE;		\
 		pcb->P0LR = (pcb->P0LR & ~AST_MASK) | AST_ON;	\
 		mtpr(AST_OK,PR_ASTLVL);				\
 	} while (/*CONSTCOND*/ 0)

Reply via email to