Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/mips/mips Do not attempt mips3 style cache flush on...



details:   https://anonhg.NetBSD.org/src/rev/4987be064824
branches:  trunk
changeset: 495385:4987be064824
user:      jeffs <jeffs%NetBSD.org@localhost>
date:      Thu Jul 27 06:28:06 2000 +0000

description:
Do not attempt mips3 style cache flush on mips1 in setregs() as it
is illegal to flush on user addresses.  In theory the race exists
on MIPS1, but it is rather unlikely in common use.  I have
seen it with regress/sys/kern/sigtramp on a QED 5231 system.

diffstat:

 sys/arch/mips/mips/mips_machdep.c |  9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diffs (32 lines):

diff -r 0df08ccb6c5b -r 4987be064824 sys/arch/mips/mips/mips_machdep.c
--- a/sys/arch/mips/mips/mips_machdep.c Thu Jul 27 06:18:13 2000 +0000
+++ b/sys/arch/mips/mips/mips_machdep.c Thu Jul 27 06:28:06 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mips_machdep.c,v 1.95 2000/07/20 18:33:42 jeffs Exp $  */
+/*     $NetBSD: mips_machdep.c,v 1.96 2000/07/27 06:28:06 jeffs Exp $  */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -52,7 +52,7 @@
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: mips_machdep.c,v 1.95 2000/07/20 18:33:42 jeffs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mips_machdep.c,v 1.96 2000/07/27 06:28:06 jeffs Exp $");
 
 #include "opt_compat_netbsd.h"
 #include "opt_compat_ultrix.h"
@@ -669,10 +669,11 @@
         * Make sure sigreturn trampoline is coherent.
         */
 #ifdef MIPS3
-       if (CPUISMIPS3)
+       if (CPUISMIPS3) {
                MachFlushDCache((vaddr_t)p->p_sigacts->ps_sigcode, szsigcode);
+               MachFlushICache((vaddr_t)p->p_sigacts->ps_sigcode, szsigcode);
+       }
 #endif
-       MachFlushICache((vaddr_t)p->p_sigacts->ps_sigcode, szsigcode);
 
        memset(f, 0, sizeof(struct frame));
        f->f_regs[SP] = (int) stack;



Home | Main Index | Thread Index | Old Index