summaryrefslogtreecommitdiffstats
path: root/sys/amd64
diff options
context:
space:
mode:
authorjeff <jeff@FreeBSD.org>2008-03-12 10:12:01 +0000
committerjeff <jeff@FreeBSD.org>2008-03-12 10:12:01 +0000
commitacb93d599cf9e4c7fc183f5568b740813472ff16 (patch)
treec3fbc6ec97828161d5fc648204b80efb7998da35 /sys/amd64
parent72babed2a5bcb10d29075f3c1495c9aca3e0af60 (diff)
downloadFreeBSD-src-acb93d599cf9e4c7fc183f5568b740813472ff16.zip
FreeBSD-src-acb93d599cf9e4c7fc183f5568b740813472ff16.tar.gz
Remove kernel support for M:N threading.
While the KSE project was quite successful in bringing threading to FreeBSD, the M:N approach taken by the kse library was never developed to its full potential. Backwards compatibility will be provided via libmap.conf for dynamically linked binaries and static binaries will be broken.
Diffstat (limited to 'sys/amd64')
-rw-r--r--sys/amd64/amd64/machdep.c2
-rw-r--r--sys/amd64/amd64/trap.c8
-rw-r--r--sys/amd64/amd64/vm_machdep.c11
-rw-r--r--sys/amd64/conf/DEFAULTS3
-rw-r--r--sys/amd64/linux32/linux32_sysvec.c3
5 files changed, 2 insertions, 25 deletions
diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c
index 24e9ec8..df831a1 100644
--- a/sys/amd64/amd64/machdep.c
+++ b/sys/amd64/amd64/machdep.c
@@ -1325,7 +1325,7 @@ hammer_time(u_int64_t modulep, u_int64_t physfree)
_ucode32sel = GSEL(GUCODE32_SEL, SEL_UPL);
/* setup proc 0's pcb */
- thread0.td_pcb->pcb_flags = 0; /* XXXKSE */
+ thread0.td_pcb->pcb_flags = 0;
thread0.td_pcb->pcb_cr3 = KPML4phys;
thread0.td_frame = &proc0_tf;
diff --git a/sys/amd64/amd64/trap.c b/sys/amd64/amd64/trap.c
index 38da3f6..df325eb 100644
--- a/sys/amd64/amd64/trap.c
+++ b/sys/amd64/amd64/trap.c
@@ -301,10 +301,6 @@ trap(struct trapframe *frame)
case T_PAGEFLT: /* page fault */
addr = frame->tf_addr;
-#ifdef KSE
- if (td->td_pflags & TDP_SA)
- thread_user_enter(td);
-#endif
i = trap_pfault(frame, TRUE);
if (i == -1)
goto userout;
@@ -782,10 +778,6 @@ syscall(struct trapframe *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_rsp + sizeof(register_t);
code = frame->tf_rax;
orig_tf_rflags = frame->tf_rflags;
diff --git a/sys/amd64/amd64/vm_machdep.c b/sys/amd64/amd64/vm_machdep.c
index aba0fad..c181d42 100644
--- a/sys/amd64/amd64/vm_machdep.c
+++ b/sys/amd64/amd64/vm_machdep.c
@@ -51,7 +51,6 @@ __FBSDID("$FreeBSD$");
#include <sys/systm.h>
#include <sys/bio.h>
#include <sys/buf.h>
-#include <sys/kse.h>
#include <sys/kernel.h>
#include <sys/ktr.h>
#include <sys/lock.h>
@@ -272,22 +271,12 @@ cpu_set_upcall(struct thread *td, struct thread *td0)
* Copy the upcall pcb. This loads kernel regs.
* Those not loaded individually below get their default
* values here.
- *
- * XXXKSE It might be a good idea to simply skip this as
- * the values of the other registers may be unimportant.
- * This would remove any requirement for knowing the KSE
- * at this time (see the matching comment below for
- * more analysis) (need a good safe default).
*/
bcopy(td0->td_pcb, pcb2, sizeof(*pcb2));
pcb2->pcb_flags &= ~PCB_FPUINITDONE;
/*
* Create a new fresh stack for the new thread.
- * Don't forget to set this stack value into whatever supplies
- * the address for the fault handlers.
- * The contexts are filled in at the time we actually DO the
- * upcall as only then do we know which KSE we got.
*/
bcopy(td0->td_frame, td->td_frame, sizeof(struct trapframe));
diff --git a/sys/amd64/conf/DEFAULTS b/sys/amd64/conf/DEFAULTS
index e98b169..3477caf 100644
--- a/sys/amd64/conf/DEFAULTS
+++ b/sys/amd64/conf/DEFAULTS
@@ -18,6 +18,3 @@ device uart_ns8250
# Default partitioning schemes
options GEOM_BSD
options GEOM_MBR
-
-# KSE support went from being default to a kernel option
-options KSE
diff --git a/sys/amd64/linux32/linux32_sysvec.c b/sys/amd64/linux32/linux32_sysvec.c
index 2f9fd9f..3906852 100644
--- a/sys/amd64/linux32/linux32_sysvec.c
+++ b/sys/amd64/linux32/linux32_sysvec.c
@@ -247,8 +247,7 @@ elf_linux_fixup(register_t **stack_base, struct image_params *imgp)
Elf32_Addr *base;
Elf32_Addr *pos;
- KASSERT(curthread->td_proc == imgp->proc &&
- (curthread->td_proc->p_flag & P_SA) == 0,
+ KASSERT(curthread->td_proc == imgp->proc,
("unsafe elf_linux_fixup(), should be curproc"));
base = (Elf32_Addr *)*stack_base;
args = (Elf32_Auxargs *)imgp->auxargs;
OpenPOWER on IntegriCloud