From nobody Fri Dec 10 12:11:04 2021 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 E813A18CC203; Fri, 10 Dec 2021 12:11:04 +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 4J9V9h4z5Qz3pD3; Fri, 10 Dec 2021 12:11:04 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 8A3C81A3B4; Fri, 10 Dec 2021 12:11:04 +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 1BACB4f5041831; Fri, 10 Dec 2021 12:11:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1BACB4JG041830; Fri, 10 Dec 2021 12:11:04 GMT (envelope-from git) Date: Fri, 10 Dec 2021 12:11:04 GMT Message-Id: <202112101211.1BACB4JG041830@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: 1c643b721bed - main - Fix a set but not used warning in the arm64 pmap 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: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1c643b721bed48ba795b42cdc5e8b5818f30ed14 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1639138264; 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=jAKzhjfZG9mWRSOQSJcwbk13aCqH5oHP67qjmxlk5ng=; b=jT1nGzCJshsYbSwwLtGv9co/IuNA1KaZrcM/L8msQgV7I+LgAWuY0tATcway781Ff9BInc IMyxG/uCZTNDuF0/CCNxWWIMR0063NcrJQT4by2fyN9T4aXbtiJUCJrUKUlJOqoeydX2oO V8vGpYXqXU5GYw57OWKsHvARBQSJJNOCoBwDasRISurAdEyVk3UIsasfm4Io8k2b/QSJ9R VmtI0XAGm57un3fwzmn6f8M3+K+klZoWhwrorGBtsxCXYP5YkCJthhhCJtMrgoEVBdyQF1 Sy3/VBCkGEYAQ6HHmrq7SgKjNc+Na38MAfxlxDsKpeCJj82+NLTPrRWhI9V/WA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1639138264; a=rsa-sha256; cv=none; b=csq25kaMK5tfuJEykjkRfbs0b8MRpw7n6A1oW8BQYiWbVZAahaJjwwKDe1+SQE19Npqpjq UehM630JkX5S00GOot0Jknx9G1rpM/Ni9Z2rRLl9PoDuQ/DJjuEQNo2osQChTCqPn9n8vt hsJ9P8sk/DexAZR01lyx7zZEv4lhBSFIyJJB41WEUpYM0MpIlHmXsGqY2avRIFiKtL6NE1 Yz6e+RLh6JNeQlaCtZ2nv4DtSH1z/59Qsdu1jpzBMpmU0YunD3FjcbMY4Xq6ZVKtOWsYPG QcwXZsOqMSew4wVsbzvPBE44Cavl0dkbPUx4TQ/+dBEKz4axSmKE9T0BRJ+7mQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=1c643b721bed48ba795b42cdc5e8b5818f30ed14 commit 1c643b721bed48ba795b42cdc5e8b5818f30ed14 Author: Andrew Turner AuthorDate: 2021-12-07 14:32:11 +0000 Commit: Andrew Turner CommitDate: 2021-12-10 12:10:30 +0000 Fix a set but not used warning in the arm64 pmap In pmap_ts_referenced we read the virtual address from pv->pv_va, but then continue to use the pv struct to get the same value later in the function. Use the virtual address value we initially read rather than loading from the pv struct each time. --- sys/arm64/arm64/pmap.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/arm64/arm64/pmap.c b/sys/arm64/arm64/pmap.c index e732afc7e350..7763e1eabdda 100644 --- a/sys/arm64/arm64/pmap.c +++ b/sys/arm64/arm64/pmap.c @@ -5391,14 +5391,14 @@ retry: } } va = pv->pv_va; - pde = pmap_pde(pmap, pv->pv_va, &lvl); + pde = pmap_pde(pmap, va, &lvl); KASSERT(pde != NULL, ("pmap_ts_referenced: no l1 table found")); KASSERT(lvl == 1, ("pmap_ts_referenced: invalid pde level %d", lvl)); tpde = pmap_load(pde); KASSERT((tpde & ATTR_DESCR_MASK) == L1_TABLE, ("pmap_ts_referenced: found an invalid l1 table")); - pte = pmap_l1_to_l2(pde, pv->pv_va); + pte = pmap_l1_to_l2(pde, va); tpte = pmap_load(pte); if (pmap_pte_dirty(pmap, tpte)) { /* @@ -5428,11 +5428,11 @@ retry: * since the superpage is wired, the current state of * its reference bit won't affect page replacement. */ - if ((((pa >> PAGE_SHIFT) ^ (pv->pv_va >> L2_SHIFT) ^ + if ((((pa >> PAGE_SHIFT) ^ (va >> L2_SHIFT) ^ (uintptr_t)pmap) & (Ln_ENTRIES - 1)) == 0 && (tpte & ATTR_SW_WIRED) == 0) { pmap_clear_bits(pte, ATTR_AF); - pmap_invalidate_page(pmap, pv->pv_va); + pmap_invalidate_page(pmap, va); cleared++; } else not_cleared++;