Date: Sat, 23 Mar 2019 10:37:26 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r345443 - stable/12/sys/amd64/amd64 Message-ID: <201903231037.x2NAbQ4X092082@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Sat Mar 23 10:37:26 2019 New Revision: 345443 URL: https://svnweb.freebsd.org/changeset/base/345443 Log: MFC r345225: amd64: rewrite cpu_switch.S fragment to reload tss.rsp0 on context switch. Modified: stable/12/sys/amd64/amd64/cpu_switch.S Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/amd64/amd64/cpu_switch.S ============================================================================== --- stable/12/sys/amd64/amd64/cpu_switch.S Sat Mar 23 10:13:01 2019 (r345442) +++ stable/12/sys/amd64/amd64/cpu_switch.S Sat Mar 23 10:37:26 2019 (r345443) @@ -209,14 +209,11 @@ do_kthread: done_tss: movq %r8,PCPU(RSP0) movq %r8,PCPU(CURPCB) - /* Update the TSS_RSP0 pointer for the next interrupt */ - cmpq $~0,PCPU(UCR3) - je 1f movq PCPU(PTI_RSP0),%rax + cmpq $~0,PCPU(UCR3) + cmove %r8,%rax movq %rax,TSS_RSP0(%rdx) - jmp 2f -1: movq %r8,TSS_RSP0(%rdx) -2: 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)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201903231037.x2NAbQ4X092082>