diff options
author | kib <kib@FreeBSD.org> | 2008-09-08 09:59:05 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2008-09-08 09:59:05 +0000 |
commit | f444f744fafc9bc80a33a896317d5b48cbaf83da (patch) | |
tree | a308fa38f71a058e176d9756194177e9afdf880e /sys/amd64/linux32 | |
parent | 73306a54357999dd00f201e861f8ee335a59a421 (diff) | |
download | FreeBSD-src-f444f744fafc9bc80a33a896317d5b48cbaf83da.zip FreeBSD-src-f444f744fafc9bc80a33a896317d5b48cbaf83da.tar.gz |
The pcb_gs32p should be per-cpu, not per-thread pointer. This is
location in GDT where the segment descriptor from pcb_gs32sd is
copied, and the location is in GDT local to CPU.
Noted and reviewed by: peter
MFC after: 1 week
Diffstat (limited to 'sys/amd64/linux32')
-rw-r--r-- | sys/amd64/linux32/linux32_machdep.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/sys/amd64/linux32/linux32_machdep.c b/sys/amd64/linux32/linux32_machdep.c index ceba561..aecf869 100644 --- a/sys/amd64/linux32/linux32_machdep.c +++ b/sys/amd64/linux32/linux32_machdep.c @@ -694,7 +694,6 @@ linux_clone(struct thread *td, struct linux_clone_args *args) #endif td2->td_pcb->pcb_gsbase = (register_t)info.base_addr; td2->td_pcb->pcb_gs32sd = sd; - td2->td_pcb->pcb_gs32p = &gdt[GUGS32_SEL]; td2->td_pcb->pcb_gs = GSEL(GUGS32_SEL, SEL_UPL); td2->td_pcb->pcb_flags |= PCB_GS32BIT | PCB_32BIT; } @@ -1352,8 +1351,7 @@ linux_set_thread_area(struct thread *td, critical_enter(); td->td_pcb->pcb_gsbase = (register_t)info.base_addr; - td->td_pcb->pcb_gs32sd = gdt[GUGS32_SEL] = sd; - td->td_pcb->pcb_gs32p = &gdt[GUGS32_SEL]; + td->td_pcb->pcb_gs32sd = *PCPU_GET(gs32p) = sd; td->td_pcb->pcb_flags |= PCB_32BIT | PCB_GS32BIT; wrmsr(MSR_KGSBASE, td->td_pcb->pcb_gsbase); critical_exit(); |