diff options
author | Luiz Souza <luiz@netgate.com> | 2018-02-21 14:28:38 -0300 |
---|---|---|
committer | Luiz Souza <luiz@netgate.com> | 2018-02-21 14:28:38 -0300 |
commit | 5919c0a9658dde48bd090704915aa3a85a6c0d26 (patch) | |
tree | 3f9a90f72e0203014f38d39eb5c8cf64ae252e03 /sys/amd64/amd64/cpu_switch.S | |
parent | 72b499fe038338698da9878361ba68f79cd05af6 (diff) | |
download | FreeBSD-src-5919c0a9658dde48bd090704915aa3a85a6c0d26.zip FreeBSD-src-5919c0a9658dde48bd090704915aa3a85a6c0d26.tar.gz |
Revert "MFC r322762, r322799, r322832, r322833:"
This reverts commit 2589da26b930eaf9441b6bf27c0f410062adf507.
Diffstat (limited to 'sys/amd64/amd64/cpu_switch.S')
-rw-r--r-- | sys/amd64/amd64/cpu_switch.S | 25 |
1 files changed, 1 insertions, 24 deletions
diff --git a/sys/amd64/amd64/cpu_switch.S b/sys/amd64/amd64/cpu_switch.S index 552f481..64a3485 100644 --- a/sys/amd64/amd64/cpu_switch.S +++ b/sys/amd64/amd64/cpu_switch.S @@ -87,6 +87,7 @@ END(cpu_throw) ENTRY(cpu_switch) /* Switch to new thread. First, save context. */ movq TD_PCB(%rdi),%r8 + orl $PCB_FULL_IRET,PCB_FLAGS(%r8) movq (%rsp),%rax /* Hardware registers */ movq %r15,PCB_R15(%r8) @@ -98,30 +99,6 @@ ENTRY(cpu_switch) movq %rbx,PCB_RBX(%r8) movq %rax,PCB_RIP(%r8) - testl $PCB_FULL_IRET,PCB_FLAGS(%r8) - jnz 2f - orl $PCB_FULL_IRET,PCB_FLAGS(%r8) - testl $TDP_KTHREAD,TD_PFLAGS(%rdi) - jnz 2f - testb $CPUID_STDEXT_FSGSBASE,cpu_stdext_feature(%rip) - jz 2f - movl %fs,%eax - cmpl $KUF32SEL,%eax - jne 1f - rdfsbaseq %rax - movq %rax,PCB_FSBASE(%r8) -1: movl %gs,%eax - cmpl $KUG32SEL,%eax - jne 2f - movq %rdx,%r12 - movl $MSR_KGSBASE,%ecx /* Read user gs base */ - rdmsr - shlq $32,%rdx - orq %rdx,%rax - movq %rax,PCB_GSBASE(%r8) - movq %r12,%rdx - -2: testl $PCB_DBREGS,PCB_FLAGS(%r8) jnz store_dr /* static predict not taken */ done_store_dr: |