From nobody Wed Aug 31 01:32:15 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4MHRVl5dq9z4bqCP; Wed, 31 Aug 2022 01:32:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4MHRVl4nHRz3Cf3; Wed, 31 Aug 2022 01:32:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1661909535; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RjQgWLdh1wGKJvCmSRatGzi8y1Pfgp+IASgg+3jCTbs=; b=jz7WzFKK2IEYr0e4g2UJGL2h9uQvdyF7R+nobLj0i/yYZqOVXXrbE3i8vohcQSfiHzVdLD 9SWsc/xJvt1x0YcMccSEQaFOgBTNqfOI2dYr1UoVu0/Lpp13JyRyYnaSuhqu2lGdWXOebR pAdrXDDHCaV+GBdTAh/4S8KCG8IarzYi35UJ5BRD0bpYP2FZB6wyNtLW1z/GmYh14SVxwX +euip2Fd8WrabA2trzWQT8T99jblg1r2x2ydcKPhYj7ay4RnYarAWtE6CAvR2r3NV6Hj+p svuG9fXV5B4ZdNZruLzvsN2zNuZHBHN4Yn/aq2WKBbIZ5Ny+Jm/wKTpcK96PHw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4MHRVl3pGGzxy0; Wed, 31 Aug 2022 01:32:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 27V1WFgW033207; Wed, 31 Aug 2022 01:32:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 27V1WFe7033206; Wed, 31 Aug 2022 01:32:15 GMT (envelope-from git) Date: Wed, 31 Aug 2022 01:32:15 GMT Message-Id: <202208310132.27V1WFe7033206@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: bf71e2e26745 - stable/13 - i386: simplify flow control in irettraps List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: bf71e2e2674547dd2ef554c37de86ee30a54eb50 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1661909535; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RjQgWLdh1wGKJvCmSRatGzi8y1Pfgp+IASgg+3jCTbs=; b=CfEt4/vrJfVw2nDVKhYEXxpR3yxXcHOD89C0wTEsVrtUuzO0dsK9dpTZwtd4HtRYVgGcT4 hdPwk2a5I7gb4K4gFHDWJfX/CK4bPCO+fQMicUS0Q8aPu3EbtkIFq4DcTrOJzoDLjpkFA/ bsW2I9Fm31DGcpn/VzzAzKTvPjzukhz18SNVY/uoBP2QygQtwHESyvL5jbjtwtLDfdWiKV kfHEhdbAPB2fWJJfwJxu0kvH4uqnmroLwJKj2IDmy/5UuJR8dAEM4D1uQM1/+H1rCRxuXk P7DSTpoWMklxwwbFg99J5UDeXvlkdp6yzLNdP+925QDM8gDGrv/VvDbpJDrnAg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1661909535; a=rsa-sha256; cv=none; b=E3E8Y4lJej9ZIIdRGVObc/NYcC0T9qq53ZnfYhu1SkjoGC6FTktHf3DtJsw5sRcWEhYNh/ DjrVSdWZlNJ/IP9BQv1lAv2DOovWq7GYbXQjwMnx5S9w5yTOli16zb+YXFVJkgEpcci0WL 9RQb/dfVNBd8cXTzTNYXkYFCweMUxNXJMPDCWkx3EVbasvGwDqJRkAJw6+q7vHaOkMcsfb O5ZyNVi/vGEkzQFdOUBxiRG57GQdHHH6ez8eCdJCF1+lOrB9mXGbVoFazTsmc4HXFQ0Nck nurNm1kn4I7ejXg9n7Qs1N1TT2gpCohRaGuLT1f0gI4Fe0O0dKjxPumOlygqbQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=bf71e2e2674547dd2ef554c37de86ee30a54eb50 commit bf71e2e2674547dd2ef554c37de86ee30a54eb50 Author: Konstantin Belousov AuthorDate: 2022-08-22 05:56:45 +0000 Commit: Konstantin Belousov CommitDate: 2022-08-31 01:20:27 +0000 i386: simplify flow control in irettraps (cherry picked from commit 54e1546e09340682c871ad1387e42a765e117ad3) --- sys/i386/i386/exception.s | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/sys/i386/i386/exception.s b/sys/i386/i386/exception.s index 90c3182f9b13..4e347642cc0f 100644 --- a/sys/i386/i386/exception.s +++ b/sys/i386/i386/exception.s @@ -236,27 +236,24 @@ irettraps: jne 2f /* -8 because exception did not switch ring */ movl $(2 * TF_SZ - TF_EIP - 8), %ecx - jmp 6f + jmp 5f 2: leal (doreti_popl_ds - 1b)(%ebx), %edx cmpl %edx, TF_EIP(%esp) jne 3f movl $(2 * TF_SZ - TF_DS - 8), %ecx - jmp 6f + jmp 5f 3: leal (doreti_popl_es - 1b)(%ebx), %edx cmpl %edx, TF_EIP(%esp) jne 4f movl $(2 * TF_SZ - TF_ES - 8), %ecx - jmp 6f + jmp 5f 4: leal (doreti_popl_fs - 1b)(%ebx), %edx cmpl %edx, TF_EIP(%esp) - jne 5f + jne calltrap movl $(2 * TF_SZ - TF_FS - 8), %ecx jmp 6f - /* kernel mode, normal */ -5: FAKE_MCOUNT(TF_EIP(%esp)) - jmp calltrap -6: cmpl $PMAP_TRM_MIN_ADDRESS, %esp /* trampoline stack ? */ - jb 5b /* if not, no need to change stacks */ +5: cmpl $PMAP_TRM_MIN_ADDRESS, %esp /* trampoline stack ? */ + jb calltrap /* if not, no need to change stacks */ movl (tramp_idleptd - 1b)(%ebx), %eax movl %eax, %cr3 movl PCPU(KESP0), %edx @@ -265,7 +262,7 @@ irettraps: movl %esp, %esi rep; movsb movl %edx, %esp - FAKE_MCOUNT(TF_EIP(%esp)) + /* kernel mode, normal */ jmp calltrap /*