Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 Feb 2008 14:18:05 GMT
From:      "Randall R. Stewart" <rrs@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 136245 for review
Message-ID:  <200802261418.m1QEI5nD046363@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=136245

Change 136245 by rrs@rrs-mips2-jnpr on 2008/02/26 14:17:52

	New do_ast

Affected files ...

.. //depot/projects/mips2-jnpr/src/sys/mips/include/asm.h#13 edit

Differences ...

==== //depot/projects/mips2-jnpr/src/sys/mips/include/asm.h#13 (text+ko) ====

@@ -306,21 +306,30 @@
 /*
  * Call ast if required
  */
-#define DO_AST							\
-	GET_CPU_PCPU(a0)					\
-	lw	a0, PC_CURTHREAD(a0);				\
-	lw	t0, TD_FLAGS(a0);			        \
-	and	t0, t0, (TDF_ASTPENDING|TDF_NEEDRESCHED);	\
-	beq	t0, zero, 27f;					\
-	nop;							\
-	lw	a0, TD_FRAME(a0);				\
-	lw	t0, TF_REG_SR(a0);				\
-	and	t0, t0, SR_KSU_USER;				\
-	beq	t0, zero, 27f;					\
-	nop;							\
-	jal	ast;						\
-	nop;							\
-27:					
+#define DO_AST				             \
+44:				                     \
+        GET_CPU_PCPU(a1)                            ;\
+	lw	a1, PC_CURPCB(a1)                   ;\
+	la	s0, _C_LABEL(disableintr)           ;\
+	jalr	s0                                  ;\
+	nop                                         ;\
+	GET_CPU_PCPU(s1)                            ;\
+	lw	s3, PC_CURPCB(s1)                   ;\
+	lw	s1, PC_CURTHREAD(s1)                ;\
+	lw	s2, TD_FLAGS(s1)                    ;\
+	li	s0, TDF_ASTPENDING | TDF_NEEDRESCHED;\
+	and	s2, s0                              ;\
+	la	s0, _C_LABEL(enableintr)            ;\
+	jalr	s0                                  ;\
+	nop                                         ;\
+	beq	s2, zero, 4f                        ;\
+	nop                                         ;\
+	la	s0, _C_LABEL(ast)                   ;\
+	jalr	s0                                  ;\
+	addu	a0, s3, U_PCB_REGS                  ;\
+	j 44b			                    ;\
+4:
+
 
 /*
  * XXX retain dialects XXX



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200802261418.m1QEI5nD046363>