svn commit: r206279 - user/jmallett/octeon/sys/mips/mips
Juli Mallett
jmallett at FreeBSD.org
Tue Apr 6 18:37:26 UTC 2010
Author: jmallett
Date: Tue Apr 6 18:37:25 2010
New Revision: 206279
URL: http://svn.freebsd.org/changeset/base/206279
Log:
Give KERNLAND a plausible definition on N64.
Modified:
user/jmallett/octeon/sys/mips/mips/trap.c
Modified: user/jmallett/octeon/sys/mips/mips/trap.c
==============================================================================
--- user/jmallett/octeon/sys/mips/mips/trap.c Tue Apr 6 17:57:27 2010 (r206278)
+++ user/jmallett/octeon/sys/mips/mips/trap.c Tue Apr 6 18:37:25 2010 (r206279)
@@ -225,8 +225,8 @@ void stacktrace(struct trapframe *);
void logstacktrace(struct trapframe *);
#endif
-#define KERNLAND(x) ((int)(x) < 0)
-#define DELAYBRANCH(x) ((int)(x) < 0)
+#define KERNLAND(x) ((vm_offset_t)(x) >= VM_MIN_KERNEL_ADDRESS && (vm_offset_t)(x) < VM_MAX_KERNEL_ADDRESS)
+#define DELAYBRANCH(x) ((int)(x) < 0)
/*
* MIPS load/store access type
@@ -503,7 +503,7 @@ dofault:
vm = p->p_vmspace;
map = &vm->vm_map;
va = trunc_page((vm_offset_t)trapframe->badvaddr);
- if ((vm_offset_t)trapframe->badvaddr >= VM_MIN_KERNEL_ADDRESS) {
+ if (KERNLAND(trapframe->badvaddr)) {
/*
* Don't allow user-mode faults in kernel
* address space.
More information about the svn-src-user
mailing list