aboutsummaryrefslogtreecommitdiff
path: root/sys/amd64/amd64/vm_machdep.c
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2009-03-02 18:43:50 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2009-03-02 18:43:50 +0000
commit2883703e00a4a50e97f2ee18676d8cef1687f032 (patch)
tree5f5d7fb10b6b06ba54298bb9f7cd6d0cabab9055 /sys/amd64/amd64/vm_machdep.c
parente2c10e7d4a1c12a35664d16561eebfede3c6059e (diff)
downloadsrc-2883703e00a4a50e97f2ee18676d8cef1687f032.tar.gz
src-2883703e00a4a50e97f2ee18676d8cef1687f032.zip
Use the p_sysent->sv_flags flag SV_ILP32 to detect 32bit process
executing on 64bit kernel. This eliminates the direct comparisions of p_sysent with &ia32_freebsd_sysvec, that were left intact after r185169.
Notes
Notes: svn path=/head/; revision=189282
Diffstat (limited to 'sys/amd64/amd64/vm_machdep.c')
-rw-r--r--sys/amd64/amd64/vm_machdep.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/sys/amd64/amd64/vm_machdep.c b/sys/amd64/amd64/vm_machdep.c
index 0cc9b039a226..1e87bdc6fbf8 100644
--- a/sys/amd64/amd64/vm_machdep.c
+++ b/sys/amd64/amd64/vm_machdep.c
@@ -62,6 +62,7 @@ __FBSDID("$FreeBSD$");
#include <sys/sf_buf.h>
#include <sys/smp.h>
#include <sys/sysctl.h>
+#include <sys/sysent.h>
#include <sys/unistd.h>
#include <sys/vnode.h>
#include <sys/vmmeter.h>
@@ -80,12 +81,6 @@ __FBSDID("$FreeBSD$");
#include <amd64/isa/isa.h>
-#ifdef COMPAT_IA32
-
-extern struct sysentvec ia32_freebsd_sysvec;
-
-#endif
-
static void cpu_reset_real(void);
#ifdef SMP
static void cpu_reset_proxy(void);
@@ -331,7 +326,7 @@ cpu_set_upcall_kse(struct thread *td, void (*entry)(void *), void *arg,
cpu_thread_clean(td);
#ifdef COMPAT_IA32
- if (td->td_proc->p_sysent == &ia32_freebsd_sysvec) {
+ if (td->td_proc->p_sysent->sv_flags & SV_ILP32) {
/*
* Set the trap frame to point at the beginning of the uts
* function.
@@ -377,7 +372,7 @@ cpu_set_user_tls(struct thread *td, void *tls_base)
return (EINVAL);
#ifdef COMPAT_IA32
- if (td->td_proc->p_sysent == &ia32_freebsd_sysvec) {
+ if (td->td_proc->p_sysent->sv_flags & SV_ILP32) {
if (td == curthread) {
critical_enter();
td->td_pcb->pcb_gsbase = (register_t)tls_base;