summaryrefslogtreecommitdiffstats
path: root/sys/amd64/amd64/cpu_switch.S
diff options
context:
space:
mode:
authorLuiz Souza <luiz@netgate.com>2018-02-21 14:21:29 -0300
committerLuiz Souza <luiz@netgate.com>2018-02-21 14:21:29 -0300
commitd3d59b01294138e59995b31d2bcbbbdf45e26a3c (patch)
tree11fbc866b8a4436698a543bf2dc20a8360bcf479 /sys/amd64/amd64/cpu_switch.S
parent63302e53ed4b3fe59711d939ba87433a9a12199d (diff)
downloadFreeBSD-src-d3d59b01294138e59995b31d2bcbbbdf45e26a3c.zip
FreeBSD-src-d3d59b01294138e59995b31d2bcbbbdf45e26a3c.tar.gz
Revert "MFC r328083,328096,328116,328119,328120,328128,328135,328153,328157,"
This reverts commit 430a2bea3907149b30cc75fc722b6cf1f81da82a.
Diffstat (limited to 'sys/amd64/amd64/cpu_switch.S')
-rw-r--r--sys/amd64/amd64/cpu_switch.S11
1 files changed, 2 insertions, 9 deletions
diff --git a/sys/amd64/amd64/cpu_switch.S b/sys/amd64/amd64/cpu_switch.S
index 75599a5..6e4ed35 100644
--- a/sys/amd64/amd64/cpu_switch.S
+++ b/sys/amd64/amd64/cpu_switch.S
@@ -215,10 +215,8 @@ done_tss:
movq %r8,PCPU(RSP0)
movq %r8,PCPU(CURPCB)
/* Update the TSS_RSP0 pointer for the next interrupt */
- cmpb $0,pti(%rip)
- jne 1f
movq %r8,TSS_RSP0(%rdx)
-1: movq %r12,PCPU(CURTHREAD) /* into next thread */
+ movq %r12,PCPU(CURTHREAD) /* into next thread */
/* Test if debug registers should be restored. */
testl $PCB_DBREGS,PCB_FLAGS(%r8)
@@ -295,12 +293,7 @@ do_tss: movq %rdx,PCPU(TSSP)
shrq $8,%rcx
movl %ecx,8(%rax)
movb $0x89,5(%rax) /* unset busy */
- cmpb $0,pti(%rip)
- je 1f
- movq PCPU(PRVSPACE),%rax
- addq $PC_PTI_STACK+PC_PTI_STACK_SZ*8,%rax
- movq %rax,TSS_RSP0(%rdx)
-1: movl $TSSSEL,%eax
+ movl $TSSSEL,%eax
ltr %ax
jmp done_tss
OpenPOWER on IntegriCloud