Module Name:    src
Committed By:   ad
Date:           Sat Nov 30 15:53:36 UTC 2019

Modified Files:
        src/sys/arch/sh3/include: userret.h
        src/sys/arch/sh3/sh3: exception.c

Log Message:
Revert previous.  Looks like it requires a more extensive fix.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/sh3/include/userret.h
cvs rdiff -u -r1.69 -r1.70 src/sys/arch/sh3/sh3/exception.c

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/sh3/include/userret.h
diff -u src/sys/arch/sh3/include/userret.h:1.15 src/sys/arch/sh3/include/userret.h:1.16
--- src/sys/arch/sh3/include/userret.h:1.15	Fri Nov 29 18:27:32 2019
+++ src/sys/arch/sh3/include/userret.h	Sat Nov 30 15:53:36 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: userret.h,v 1.15 2019/11/29 18:27:32 ad Exp $	*/
+/*	$NetBSD: userret.h,v 1.16 2019/11/30 15:53:36 ad Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -52,16 +52,7 @@ userret(struct lwp *l)
 {
 
 	/* Invoke MI userret code */
-	do {
-		//curcpu()->ci_data.cpu_nast++;
-		l->l_md.md_astpending = 0;
-		mi_userret(l);
-	} while (l->l_md.md_astpending);
-
-	if (l->l_pflag & LP_OWEUPC) {
-		l->l_pflag &= ~LP_OWEUPC;
-		ADDUPROF(l);
-	}
+	mi_userret(l);
 
 #ifdef PTRACE_HOOKS
 	/* Check if lwp is being PT_STEP'ed */

Index: src/sys/arch/sh3/sh3/exception.c
diff -u src/sys/arch/sh3/sh3/exception.c:1.69 src/sys/arch/sh3/sh3/exception.c:1.70
--- src/sys/arch/sh3/sh3/exception.c:1.69	Fri Nov 29 18:27:33 2019
+++ src/sys/arch/sh3/sh3/exception.c	Sat Nov 30 15:53:36 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: exception.c,v 1.69 2019/11/29 18:27:33 ad Exp $	*/
+/*	$NetBSD: exception.c,v 1.70 2019/11/30 15:53:36 ad Exp $	*/
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc. All rights reserved.
@@ -79,7 +79,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: exception.c,v 1.69 2019/11/29 18:27:33 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: exception.c,v 1.70 2019/11/30 15:53:36 ad Exp $");
 
 #include "opt_ddb.h"
 #include "opt_kgdb.h"
@@ -471,5 +471,15 @@ ast(struct lwp *l, struct trapframe *tf)
 	KDASSERT(l != NULL);
 	KDASSERT(l->l_md.md_regs == tf);
 
-	userret(l);
+	while (l->l_md.md_astpending) {
+		//curcpu()->ci_data.cpu_nast++;
+		l->l_md.md_astpending = 0;
+
+		if (l->l_pflag & LP_OWEUPC) {
+			l->l_pflag &= ~LP_OWEUPC;
+			ADDUPROF(l);
+		}
+
+		userret(l);
+	}
 }

Reply via email to