Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/powerpc Switch to use new common cpu_ast routine.



details:   https://anonhg.NetBSD.org/src/rev/c02c9972a422
branches:  trunk
changeset: 766374:c02c9972a422
user:      matt <matt%NetBSD.org@localhost>
date:      Tue Jun 21 06:38:50 2011 +0000

description:
Switch to use new common cpu_ast routine.

diffstat:

 sys/arch/powerpc/booke/trap.c   |  14 +++-----------
 sys/arch/powerpc/ibm4xx/trap.c  |  15 +++------------
 sys/arch/powerpc/powerpc/trap.c |  14 +++-----------
 3 files changed, 9 insertions(+), 34 deletions(-)

diffs (108 lines):

diff -r 268324723438 -r c02c9972a422 sys/arch/powerpc/booke/trap.c
--- a/sys/arch/powerpc/booke/trap.c     Tue Jun 21 06:32:36 2011 +0000
+++ b/sys/arch/powerpc/booke/trap.c     Tue Jun 21 06:38:50 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: trap.c,v 1.11 2011/06/20 20:24:28 matt Exp $   */
+/*     $NetBSD: trap.c,v 1.12 2011/06/21 06:38:50 matt Exp $   */
 /*-
  * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -39,7 +39,7 @@
 
 #include <sys/cdefs.h>
 
-__KERNEL_RCSID(1, "$NetBSD: trap.c,v 1.11 2011/06/20 20:24:28 matt Exp $");
+__KERNEL_RCSID(1, "$NetBSD: trap.c,v 1.12 2011/06/21 06:38:50 matt Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -793,15 +793,7 @@
                break;
        case T_AST:
                KASSERT(usertrap);
-               l->l_md.md_astpending = 0;      /* we are about to do it */
-               ci->ci_data.cpu_nsoft++;
-               if (l->l_pflag & LP_OWEUPC) {
-                       l->l_pflag &= ~LP_OWEUPC;
-                       ADDUPROF(l);
-               }
-               /* Check whether we are being preempted. */
-               if (ci->ci_want_resched)
-                       preempt();
+               cpu_ast(l, ci);
                if (tf->tf_fixreg[1] & 0x80000000) {
                        printf("%s(ast-exit): pid %d.%d (%s): invalid sp %#lx\n",
                            __func__, p->p_pid, l->l_lid, p->p_comm,
diff -r 268324723438 -r c02c9972a422 sys/arch/powerpc/ibm4xx/trap.c
--- a/sys/arch/powerpc/ibm4xx/trap.c    Tue Jun 21 06:32:36 2011 +0000
+++ b/sys/arch/powerpc/ibm4xx/trap.c    Tue Jun 21 06:38:50 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: trap.c,v 1.61 2011/06/18 06:41:41 matt Exp $   */
+/*     $NetBSD: trap.c,v 1.62 2011/06/21 06:38:50 matt Exp $   */
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -67,7 +67,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.61 2011/06/18 06:41:41 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.62 2011/06/21 06:38:50 matt Exp $");
 
 #include "opt_altivec.h"
 #include "opt_ddb.h"
@@ -297,18 +297,9 @@
                break;
 
        case EXC_AST|EXC_USER:
-               l->l_md.md_astpending = 0;      /* we are about to do it */
-               //curcpu()->ci_data.cpu_nast++;
-               if (l->l_pflag & LP_OWEUPC) {
-                       l->l_pflag &= ~LP_OWEUPC;
-                       ADDUPROF(l);
-               }
-               /* Check whether we are being preempted. */
-               if (curcpu()->ci_want_resched)
-                       preempt();
+               cpu_ast(l, curcpu());
                break;
 
-
        case EXC_ALI|EXC_USER:
                if (fix_unaligned(l, tf) != 0) {
                        KSI_INIT_TRAP(&ksi);
diff -r 268324723438 -r c02c9972a422 sys/arch/powerpc/powerpc/trap.c
--- a/sys/arch/powerpc/powerpc/trap.c   Tue Jun 21 06:32:36 2011 +0000
+++ b/sys/arch/powerpc/powerpc/trap.c   Tue Jun 21 06:38:50 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: trap.c,v 1.143 2011/06/20 05:59:06 matt Exp $  */
+/*     $NetBSD: trap.c,v 1.144 2011/06/21 06:38:50 matt Exp $  */
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.143 2011/06/20 05:59:06 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.144 2011/06/21 06:38:50 matt Exp $");
 
 #include "opt_altivec.h"
 #include "opt_ddb.h"
@@ -345,15 +345,7 @@
                break;
 
        case EXC_AST|EXC_USER:
-               l->l_md.md_astpending = 0;      /* we are about to do it */
-               //ci->ci_data.cpu_nast++;
-               if (l->l_pflag & LP_OWEUPC) {
-                       l->l_pflag &= ~LP_OWEUPC;
-                       ADDUPROF(l);
-               }
-               /* Check whether we are being preempted. */
-               if (ci->ci_want_resched)
-                       preempt();
+               cpu_ast(l, ci);
                break;
 
        case EXC_ALI|EXC_USER:



Home | Main Index | Thread Index | Old Index