summaryrefslogtreecommitdiffstats
path: root/sys/amd64
diff options
context:
space:
mode:
authordchagin <dchagin@FreeBSD.org>2013-05-09 21:42:43 +0000
committerdchagin <dchagin@FreeBSD.org>2013-05-09 21:42:43 +0000
commitb6dc2308e13784bb221f5d73d1d88e8644ca81df (patch)
tree2da89373a643d390c5af7d72bc797985fcd29770 /sys/amd64
parent69c7d77aefa97e799e83748b4c56d43e900f2ea6 (diff)
downloadFreeBSD-src-b6dc2308e13784bb221f5d73d1d88e8644ca81df.zip
FreeBSD-src-b6dc2308e13784bb221f5d73d1d88e8644ca81df.tar.gz
Retire write-only PCB_GS32BIT pcb flag on amd64.
Diffstat (limited to 'sys/amd64')
-rw-r--r--sys/amd64/amd64/genassym.c1
-rw-r--r--sys/amd64/amd64/machdep.c2
-rw-r--r--sys/amd64/ia32/ia32_signal.c1
-rw-r--r--sys/amd64/include/pcb.h1
-rw-r--r--sys/amd64/linux32/linux32_machdep.c4
-rw-r--r--sys/amd64/linux32/linux32_sysvec.c1
6 files changed, 3 insertions, 7 deletions
diff --git a/sys/amd64/amd64/genassym.c b/sys/amd64/amd64/genassym.c
index 174927a..4448a49 100644
--- a/sys/amd64/amd64/genassym.c
+++ b/sys/amd64/amd64/genassym.c
@@ -167,7 +167,6 @@ ASSYM(PCB_FPUSUSPEND, offsetof(struct pcb, pcb_fpususpend));
ASSYM(PCB_SIZE, sizeof(struct pcb));
ASSYM(PCB_FULL_IRET, PCB_FULL_IRET);
ASSYM(PCB_DBREGS, PCB_DBREGS);
-ASSYM(PCB_GS32BIT, PCB_GS32BIT);
ASSYM(PCB_32BIT, PCB_32BIT);
ASSYM(COMMON_TSS_RSP0, offsetof(struct amd64tss, tss_rsp0));
diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c
index f5e1437..a543421 100644
--- a/sys/amd64/amd64/machdep.c
+++ b/sys/amd64/amd64/machdep.c
@@ -964,7 +964,7 @@ exec_setregs(struct thread *td, struct image_params *imgp, u_long stack)
pcb->pcb_fsbase = 0;
pcb->pcb_gsbase = 0;
- clear_pcb_flags(pcb, PCB_32BIT | PCB_GS32BIT);
+ clear_pcb_flags(pcb, PCB_32BIT);
pcb->pcb_initial_fpucw = __INITIAL_FPUCW__;
set_pcb_flags(pcb, PCB_FULL_IRET);
diff --git a/sys/amd64/ia32/ia32_signal.c b/sys/amd64/ia32/ia32_signal.c
index 09ec7ab..26319e3 100644
--- a/sys/amd64/ia32/ia32_signal.c
+++ b/sys/amd64/ia32/ia32_signal.c
@@ -1001,6 +1001,5 @@ ia32_setregs(struct thread *td, struct image_params *imgp, u_long stack)
/* Return via doreti so that we can change to a different %cs */
set_pcb_flags(pcb, PCB_32BIT | PCB_FULL_IRET);
- clear_pcb_flags(pcb, PCB_GS32BIT);
td->td_retval[1] = 0;
}
diff --git a/sys/amd64/include/pcb.h b/sys/amd64/include/pcb.h
index 22cbbe2..c106edc 100644
--- a/sys/amd64/include/pcb.h
+++ b/sys/amd64/include/pcb.h
@@ -77,7 +77,6 @@ struct pcb {
#define PCB_KERNFPU 0x04 /* kernel uses fpu */
#define PCB_FPUINITDONE 0x08 /* fpu state is initialized */
#define PCB_USERFPUINITDONE 0x10 /* fpu user state is initialized */
-#define PCB_GS32BIT 0x20 /* linux gs switch */
#define PCB_32BIT 0x40 /* process has 32 bit context (segs etc) */
uint16_t pcb_initial_fpucw;
diff --git a/sys/amd64/linux32/linux32_machdep.c b/sys/amd64/linux32/linux32_machdep.c
index 7725163..65f034a 100644
--- a/sys/amd64/linux32/linux32_machdep.c
+++ b/sys/amd64/linux32/linux32_machdep.c
@@ -447,7 +447,7 @@ linux_set_cloned_tls(struct thread *td, void *desc)
pcb->pcb_gsbase = (register_t)info.base_addr;
/* XXXKIB pcb->pcb_gs32sd = sd; */
td->td_frame->tf_gs = GSEL(GUGS32_SEL, SEL_UPL);
- set_pcb_flags(pcb, PCB_GS32BIT | PCB_32BIT);
+ set_pcb_flags(pcb, PCB_32BIT);
}
return (error);
@@ -1026,7 +1026,7 @@ linux_set_thread_area(struct thread *td,
pcb = td->td_pcb;
pcb->pcb_gsbase = (register_t)info.base_addr;
- set_pcb_flags(pcb, PCB_32BIT | PCB_GS32BIT);
+ set_pcb_flags(pcb, PCB_32BIT);
update_gdt_gsbase(td, info.base_addr);
return (0);
diff --git a/sys/amd64/linux32/linux32_sysvec.c b/sys/amd64/linux32/linux32_sysvec.c
index 42500da..c4b66de 100644
--- a/sys/amd64/linux32/linux32_sysvec.c
+++ b/sys/amd64/linux32/linux32_sysvec.c
@@ -868,7 +868,6 @@ exec_linux_setregs(struct thread *td, struct image_params *imgp, u_long stack)
/* Do full restore on return so that we can change to a different %cs */
set_pcb_flags(pcb, PCB_32BIT | PCB_FULL_IRET);
- clear_pcb_flags(pcb, PCB_GS32BIT);
td->td_retval[1] = 0;
}
OpenPOWER on IntegriCloud