From nobody Thu Oct 13 04:46:10 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 4Mnxmf6mNCz4dyXj; Thu, 13 Oct 2022 04:46:10 +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 4Mnxmf6Hlyz3WPv; Thu, 13 Oct 2022 04:46:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1665636370; 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=YL0ycdf4Ye00Q+omwBcbB4ajLUpudtwF8zEiUZz0ajo=; b=HU1ZXVuVJGWTJYDIWFYLTBCAcqxzgKqYlDpq92cgPN6wm4r/ePwO72QJnWJ007qdkmLpxK FD6+F/jXf6s6M40klFdbWkNtQ9b6BHIKl0XIB80bHauGhXGt5Run0cx0qoQn/Iu9wRoC6U f9xiTGvsMFqQu27V2k4ukvT15SF5/4FWG3plRDRsmUNtyQ5BhjI9LVXpLmQIAAYi0so9Ln oyUxqts1A9MqmCVkUN75gJ5l+epVq7IVh4g2qjdyXktyd7heGv2fBymAxVKzvGI4hHk1l6 8aAbbphgW0JsAKAiO1AV/tIdpyroJTpKEbauXPCAluNtpKvDtvzlUkqYWNDKuA== 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 4Mnxmf5PWbzJjx; Thu, 13 Oct 2022 04:46:10 +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 29D4kAnl002691; Thu, 13 Oct 2022 04:46:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 29D4kApr002690; Thu, 13 Oct 2022 04:46:10 GMT (envelope-from git) Date: Thu, 13 Oct 2022 04:46:10 GMT Message-Id: <202210130446.29D4kApr002690@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: e70ce8d3ae1b - stable/13 - amd64: remove useless addr2 variables in page range invalidation handlers 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: e70ce8d3ae1ba3d73e8efe833c941cda6a3bcf5a Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1665636370; 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=YL0ycdf4Ye00Q+omwBcbB4ajLUpudtwF8zEiUZz0ajo=; b=tkyEKdDSNzwywDxa9cikH7h9W1/FW8Ic2hHV5Ozaeoj40bLxG0Qjnd6IZQYbgsRml92Vn0 8ubND1YBBCPu6Qde7ZA8s8d73WC/Vm5RF4hNTCOZXIAZbRQO13j2AARciuwQEKJdOZEO3j eTyGWAebZJVXr7RsgQPwn9b4HVXxw8jpYdkZE21R9VVoK/2OtK+b0O6a1An4lL+jKflcW0 Bqfw+htVarK4J8Zm/RpmfeY1pW4CXNlZj/LXbgYF3hnyGs77wZrQC8tZ70e48domnuMEWA IBrBN7Y7ezMxUE+g47gKYZkKV5ybetw2dk7NN0R3COZyMFSiZeesNWmnyzw5Mw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1665636370; a=rsa-sha256; cv=none; b=BL4X1yu1bc7je0mBnZ6Tr72nu/v3iQn9teiVIPLjCp7BT9EuwlGn9ihXo8kJiHGcz63Z+L a4+BRuX6QsPa67t2Ez7zOL/4xaszAP4TyktTdSYTOPa8HA6TibEhvVywxqADMEhgCQk+/l BDcoBXGaGzqTrbiyvUXajkZnIQLwn7Rkc80NqrqJq9Xfo77XWYoiKotzLhPamd96sOtpwY Jkz4kiz90vAgnV2NVfxpCGKduwhkRv4sk10M99HVGwunw/xb+aoEaZfoyHn3IZvNNdDYrw zKpnNB5V1lqiPSPM6kUm63IRusZ0C1DRCFfVe5mvyFNXnYmbv862or/LRQBmKw== 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=e70ce8d3ae1ba3d73e8efe833c941cda6a3bcf5a commit e70ce8d3ae1ba3d73e8efe833c941cda6a3bcf5a Author: Konstantin Belousov AuthorDate: 2022-10-08 08:33:11 +0000 Commit: Konstantin Belousov CommitDate: 2022-10-13 04:46:02 +0000 amd64: remove useless addr2 variables in page range invalidation handlers (cherry picked from commit 273d0715f6b168ab7be6e79a768d97fbdea81c8d) --- sys/amd64/amd64/mp_machdep.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/sys/amd64/amd64/mp_machdep.c b/sys/amd64/amd64/mp_machdep.c index a13099981690..5e94ba822871 100644 --- a/sys/amd64/amd64/mp_machdep.c +++ b/sys/amd64/amd64/mp_machdep.c @@ -902,7 +902,7 @@ invlpg_pcid_handler(pmap_t smp_tlb_pmap, vm_offset_t smp_tlb_addr1) static void invlrng_handler(vm_offset_t smp_tlb_addr1, vm_offset_t smp_tlb_addr2) { - vm_offset_t addr, addr2; + vm_offset_t addr; #ifdef COUNT_XINVLTLB_HITS xhits_rng[PCPU_GET(cpuid)]++; @@ -912,11 +912,10 @@ invlrng_handler(vm_offset_t smp_tlb_addr1, vm_offset_t smp_tlb_addr2) #endif /* COUNT_IPIS */ addr = smp_tlb_addr1; - addr2 = smp_tlb_addr2; do { invlpg(addr); addr += PAGE_SIZE; - } while (addr < addr2); + } while (addr < smp_tlb_addr2); } static void @@ -924,7 +923,7 @@ invlrng_invpcid_handler(pmap_t smp_tlb_pmap, vm_offset_t smp_tlb_addr1, vm_offset_t smp_tlb_addr2) { struct invpcid_descr d; - vm_offset_t addr, addr2; + vm_offset_t addr; #ifdef COUNT_XINVLTLB_HITS xhits_rng[PCPU_GET(cpuid)]++; @@ -934,11 +933,10 @@ invlrng_invpcid_handler(pmap_t smp_tlb_pmap, vm_offset_t smp_tlb_addr1, #endif /* COUNT_IPIS */ addr = smp_tlb_addr1; - addr2 = smp_tlb_addr2; do { invlpg(addr); addr += PAGE_SIZE; - } while (addr < addr2); + } while (addr < smp_tlb_addr2); if (smp_tlb_pmap == PCPU_GET(curpmap) && smp_tlb_pmap->pm_ucr3 != PMAP_NO_CR3 && PCPU_GET(ucr3_load_mask) == PMAP_UCR3_NOMASK) { @@ -949,7 +947,7 @@ invlrng_invpcid_handler(pmap_t smp_tlb_pmap, vm_offset_t smp_tlb_addr1, do { invpcid(&d, INVPCID_ADDR); d.addr += PAGE_SIZE; - } while (d.addr < addr2); + } while (d.addr < smp_tlb_addr2); } } @@ -957,7 +955,7 @@ static void invlrng_pcid_handler(pmap_t smp_tlb_pmap, vm_offset_t smp_tlb_addr1, vm_offset_t smp_tlb_addr2) { - vm_offset_t addr, addr2; + vm_offset_t addr; uint64_t kcr3, ucr3; uint32_t pcid; @@ -969,18 +967,17 @@ invlrng_pcid_handler(pmap_t smp_tlb_pmap, vm_offset_t smp_tlb_addr1, #endif /* COUNT_IPIS */ addr = smp_tlb_addr1; - addr2 = smp_tlb_addr2; do { invlpg(addr); addr += PAGE_SIZE; - } while (addr < addr2); + } while (addr < smp_tlb_addr2); if (smp_tlb_pmap == PCPU_GET(curpmap) && (ucr3 = smp_tlb_pmap->pm_ucr3) != PMAP_NO_CR3 && PCPU_GET(ucr3_load_mask) == PMAP_UCR3_NOMASK) { pcid = smp_tlb_pmap->pm_pcids[PCPU_GET(cpuid)].pm_pcid; kcr3 = smp_tlb_pmap->pm_cr3 | pcid | CR3_PCID_SAVE; ucr3 |= pcid | PMAP_PCID_USER_PT | CR3_PCID_SAVE; - pmap_pti_pcid_invlrng(ucr3, kcr3, smp_tlb_addr1, addr2); + pmap_pti_pcid_invlrng(ucr3, kcr3, smp_tlb_addr1, smp_tlb_addr2); } }