Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch fix a ldtlb handling bug:
details: https://anonhg.NetBSD.org/src/rev/36e75228e460
branches: trunk
changeset: 513737:36e75228e460
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Fri Aug 10 18:27:08 2001 +0000
description:
fix a ldtlb handling bug:
- set to PTE{H,L,A} and call LDTLB must do atomically.
- never call LDTLB when it's unnecessary.
Broken kernel oocasionally causes cpu reset when /etc/security is called.
Now fix this problem.
diffstat:
sys/arch/dreamcast/dreamcast/locore.s | 3 +--
sys/arch/evbsh3/evbsh3/locore.s | 3 +--
sys/arch/hpcsh/hpcsh/locore.s | 3 +--
sys/arch/mmeye/mmeye/locore.s | 3 +--
sys/arch/sh3/sh3/trap.c | 4 +++-
5 files changed, 7 insertions(+), 9 deletions(-)
diffs (93 lines):
diff -r 43312ea334e4 -r 36e75228e460 sys/arch/dreamcast/dreamcast/locore.s
--- a/sys/arch/dreamcast/dreamcast/locore.s Fri Aug 10 18:24:20 2001 +0000
+++ b/sys/arch/dreamcast/dreamcast/locore.s Fri Aug 10 18:27:08 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: locore.s,v 1.8 2001/05/15 08:54:57 msaitoh Exp $ */
+/* $NetBSD: locore.s,v 1.9 2001/08/10 18:27:12 msaitoh Exp $ */
/*-
* Copyright (c) 1993, 1994, 1995, 1997
@@ -1335,7 +1335,6 @@
nop
add #4, r15 /* pop dummy code */
EXCEPT_DISABLE
- ldtlb
INTRFASTEXIT
.align 2
diff -r 43312ea334e4 -r 36e75228e460 sys/arch/evbsh3/evbsh3/locore.s
--- a/sys/arch/evbsh3/evbsh3/locore.s Fri Aug 10 18:24:20 2001 +0000
+++ b/sys/arch/evbsh3/evbsh3/locore.s Fri Aug 10 18:27:08 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: locore.s,v 1.32 2001/05/15 08:54:56 msaitoh Exp $ */
+/* $NetBSD: locore.s,v 1.33 2001/08/10 18:27:12 msaitoh Exp $ */
/*-
* Copyright (c) 1993, 1994, 1995, 1997
@@ -1336,7 +1336,6 @@
nop
add #4, r15 /* pop dummy code */
EXCEPT_DISABLE
- ldtlb
INTRFASTEXIT
.align 2
diff -r 43312ea334e4 -r 36e75228e460 sys/arch/hpcsh/hpcsh/locore.s
--- a/sys/arch/hpcsh/hpcsh/locore.s Fri Aug 10 18:24:20 2001 +0000
+++ b/sys/arch/hpcsh/hpcsh/locore.s Fri Aug 10 18:27:08 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: locore.s,v 1.8 2001/05/15 08:54:57 msaitoh Exp $ */
+/* $NetBSD: locore.s,v 1.9 2001/08/10 18:27:13 msaitoh Exp $ */
/*-
* Copyright (c) 1993, 1994, 1995, 1997
@@ -1193,7 +1193,6 @@
nop
add #4, r15 /* pop dummy code */
EXCEPT_DISABLE
- ldtlb
INTRFASTEXIT
.align 2
diff -r 43312ea334e4 -r 36e75228e460 sys/arch/mmeye/mmeye/locore.s
--- a/sys/arch/mmeye/mmeye/locore.s Fri Aug 10 18:24:20 2001 +0000
+++ b/sys/arch/mmeye/mmeye/locore.s Fri Aug 10 18:27:08 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: locore.s,v 1.21 2001/02/05 18:14:43 thorpej Exp $ */
+/* $NetBSD: locore.s,v 1.22 2001/08/10 18:27:13 msaitoh Exp $ */
/*-
* Copyright (c) 1993, 1994, 1995, 1997
@@ -1150,7 +1150,6 @@
nop
add #4, r15 /* pop dummy code */
EXCEPT_DISABLE
- ldtlb
INTRFASTEXIT
.align 2
diff -r 43312ea334e4 -r 36e75228e460 sys/arch/sh3/sh3/trap.c
--- a/sys/arch/sh3/sh3/trap.c Fri Aug 10 18:24:20 2001 +0000
+++ b/sys/arch/sh3/sh3/trap.c Fri Aug 10 18:27:08 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: trap.c,v 1.27 2001/06/24 05:34:07 msaitoh Exp $ */
+/* $NetBSD: trap.c,v 1.28 2001/08/10 18:27:08 msaitoh Exp $ */
/*-
* Copyright (c) 1995 Charles M. Hannum. All rights reserved.
@@ -691,6 +691,7 @@
#else
SHREG_PTEL = pte & PTEL_VALIDBITS;
#endif
+ __asm __volatile ("ldtlb; nop");
return;
}
@@ -841,6 +842,7 @@
#endif
}
}
+ __asm __volatile("ldtlb; nop");
if (user)
userret(p, frame.tf_spc, sticks);
return;
Home |
Main Index |
Thread Index |
Old Index