Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch fix hppa ucas_*():
details: https://anonhg.NetBSD.org/src/rev/54182f6d15d7
branches: trunk
changeset: 756126:54182f6d15d7
user: chs <chs%NetBSD.org@localhost>
date: Wed Jul 07 01:18:39 2010 +0000
description:
fix hppa ucas_*():
- "ret" is a kernel-space pointer.
- move the ucas RAS check from the device interrupt path
to the page-fault path.
diffstat:
sys/arch/hp700/hp700/intr.c | 14 ++------------
sys/arch/hppa/hppa/copy.S | 14 +++++---------
sys/arch/hppa/hppa/trap.c | 13 +++++++++++--
3 files changed, 18 insertions(+), 23 deletions(-)
diffs (109 lines):
diff -r c1df01a31ec8 -r 54182f6d15d7 sys/arch/hp700/hp700/intr.c
--- a/sys/arch/hp700/hp700/intr.c Wed Jul 07 01:17:49 2010 +0000
+++ b/sys/arch/hp700/hp700/intr.c Wed Jul 07 01:18:39 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: intr.c,v 1.25 2010/03/31 17:46:21 skrll Exp $ */
+/* $NetBSD: intr.c,v 1.26 2010/07/07 01:18:39 chs Exp $ */
/* $OpenBSD: intr.c,v 1.27 2009/12/31 12:52:35 jsing Exp $ */
/*
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.25 2010/03/31 17:46:21 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.26 2010/07/07 01:18:39 chs Exp $");
#define __MUTEX_PRIVATE
@@ -370,9 +370,6 @@
int hp700_intr_ipending_new(struct hp700_int_reg *, int);
struct cpu_info *ci = curcpu();
- extern char ucas_ras_start[];
- extern char ucas_ras_end[];
-
#ifndef LOCKDEBUG
extern char mutex_enter_crit_start[];
extern char mutex_enter_crit_end[];
@@ -399,13 +396,6 @@
((kmutex_t *)frame->tf_arg0)->mtx_owner = (uintptr_t)curlwp;
#endif
- if (frame->tf_iisq_head == HPPA_SID_KERNEL &&
- frame->tf_iioq_head >= (u_int)ucas_ras_start &&
- frame->tf_iioq_head <= (u_int)ucas_ras_end) {
- frame->tf_iioq_head = (u_int)ucas_ras_start;
- frame->tf_iioq_tail = (u_int)ucas_ras_start + 4;
- }
-
/*
* Read the CPU interrupt register and acknowledge all interrupts.
* Starting with this value, get our set of new pending interrupts and
diff -r c1df01a31ec8 -r 54182f6d15d7 sys/arch/hppa/hppa/copy.S
--- a/sys/arch/hppa/hppa/copy.S Wed Jul 07 01:17:49 2010 +0000
+++ b/sys/arch/hppa/hppa/copy.S Wed Jul 07 01:18:39 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: copy.S,v 1.17 2010/06/06 12:13:36 skrll Exp $ */
+/* $NetBSD: copy.S,v 1.18 2010/07/07 01:18:39 chs Exp $ */
/*-
* Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -363,14 +363,11 @@
ucas_ras_start:
ldw 0(%sr1, %arg0), %t1
- comb,<> %arg1, %t1, 2f
- copy %t1, %ret1
-ucas_ras_end:
+ comb,<> %arg1, %t1, ucas_ras_end
+ copy %r0, %ret0
stw %arg2, 0(%sr1, %arg0)
- copy %arg1, %ret1
-2:
- stw %ret1, 0(%sr1, %arg3)
- copy %r0, %ret0
+ucas_ras_end:
+ stw %t1, 0(%arg3)
L$ucas_32_fault:
bv 0(%rp)
@@ -380,4 +377,3 @@
bv 0(%rp)
ldi EFAULT, %ret0
EXIT(ucas_32)
-
diff -r c1df01a31ec8 -r 54182f6d15d7 sys/arch/hppa/hppa/trap.c
--- a/sys/arch/hppa/hppa/trap.c Wed Jul 07 01:17:49 2010 +0000
+++ b/sys/arch/hppa/hppa/trap.c Wed Jul 07 01:18:39 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: trap.c,v 1.92 2010/05/31 20:19:33 skrll Exp $ */
+/* $NetBSD: trap.c,v 1.93 2010/07/07 01:18:39 chs Exp $ */
/*-
* Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@@ -58,7 +58,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.92 2010/05/31 20:19:33 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.93 2010/07/07 01:18:39 chs Exp $");
/* #define INTRDEBUG */
/* #define TRAPDEBUG */
@@ -917,6 +917,15 @@
panic("trap: uvm_fault(%p, %lx, %d): %d",
map, va, vftype, ret);
}
+ } else if ((type & T_USER) == 0) {
+ extern char ucas_ras_start[];
+ extern char ucas_ras_end[];
+
+ if (frame->tf_iioq_head > (u_int)ucas_ras_start &&
+ frame->tf_iioq_head < (u_int)ucas_ras_end) {
+ frame->tf_iioq_head = (u_int)ucas_ras_start;
+ frame->tf_iioq_tail = (u_int)ucas_ras_start + 4;
+ }
}
break;
Home |
Main Index |
Thread Index |
Old Index