diff options
author | jb <jb@FreeBSD.org> | 2006-10-26 21:42:22 +0000 |
---|---|---|
committer | jb <jb@FreeBSD.org> | 2006-10-26 21:42:22 +0000 |
commit | f82c7997354f95e680341bb8e10136ded5fd15eb (patch) | |
tree | 2136d90e7e60f4ef25fe147499787d0e6a155b82 /sys/i386 | |
parent | b3e38fbc69f126c6cc49a0a6e45096d6c01b7c43 (diff) | |
download | FreeBSD-src-f82c7997354f95e680341bb8e10136ded5fd15eb.zip FreeBSD-src-f82c7997354f95e680341bb8e10136ded5fd15eb.tar.gz |
Make KSE a kernel option, turned on by default in all GENERIC
kernel configs except sun4v (which doesn't process signals properly
with KSE).
Reviewed by: davidxu@
Diffstat (limited to 'sys/i386')
-rw-r--r-- | sys/i386/conf/GENERIC | 1 | ||||
-rw-r--r-- | sys/i386/i386/machdep.c | 4 | ||||
-rw-r--r-- | sys/i386/i386/trap.c | 4 |
3 files changed, 9 insertions, 0 deletions
diff --git a/sys/i386/conf/GENERIC b/sys/i386/conf/GENERIC index 0e0a91f..e2c6359 100644 --- a/sys/i386/conf/GENERIC +++ b/sys/i386/conf/GENERIC @@ -58,6 +58,7 @@ options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions options KBD_INSTALL_CDEV # install a CDEV entry in /dev options ADAPTIVE_GIANT # Giant mutex is adaptive. options STOP_NMI # Stop CPUS using NMI instead of IPI +options KSE # KSE support # Debugging for use in -current options KDB # Enable kernel debugger support. diff --git a/sys/i386/i386/machdep.c b/sys/i386/i386/machdep.c index 5f0181b..4317eb9 100644 --- a/sys/i386/i386/machdep.c +++ b/sys/i386/i386/machdep.c @@ -2057,7 +2057,11 @@ init386(first) * This may be done better later if it gets more high level * components in it. If so just link td->td_proc here. */ +#ifdef KSE proc_linkup(&proc0, &ksegrp0, &thread0); +#else + proc_linkup(&proc0, &thread0); +#endif metadata_missing = 0; if (bootinfo.bi_modulep) { diff --git a/sys/i386/i386/trap.c b/sys/i386/i386/trap.c index 236c840..0c3c077 100644 --- a/sys/i386/i386/trap.c +++ b/sys/i386/i386/trap.c @@ -346,8 +346,10 @@ trap(frame) break; case T_PAGEFLT: /* page fault */ +#ifdef KSE if (td->td_pflags & TDP_SA) thread_user_enter(td); +#endif i = trap_pfault(&frame, TRUE, eva); #if defined(I586_CPU) && !defined(NO_F00F_HACK) @@ -935,8 +937,10 @@ syscall(frame) td->td_frame = &frame; if (td->td_ucred != p->p_ucred) cred_update_thread(td); +#ifdef KSE if (p->p_flag & P_SA) thread_user_enter(td); +#endif params = (caddr_t)frame.tf_esp + sizeof(int); code = frame.tf_eax; orig_tf_eflags = frame.tf_eflags; |