From nobody Wed Dec 29 10:39:53 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 DCF4B1927E2D; Wed, 29 Dec 2021 10:39:53 +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 4JP7Fj3dgSz4pjb; Wed, 29 Dec 2021 10:39:53 +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 4F7382369C; Wed, 29 Dec 2021 10:39:53 +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 1BTAdrw6087556; Wed, 29 Dec 2021 10:39:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1BTAdr7d087555; Wed, 29 Dec 2021 10:39:53 GMT (envelope-from git) Date: Wed, 29 Dec 2021 10:39:53 GMT Message-Id: <202112291039.1BTAdr7d087555@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andrew Turner Subject: git: abf3835be640 - stable/13 - 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/stable/13 X-Git-Reftype: branch X-Git-Commit: abf3835be640e8cc105c978bc96a1fd0686ee23c Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1640774393; 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=HsmtxtjxFMlqlD4FSb3L6kAmGCVf5axXRqSAAQ+KXqg=; b=W7bSRixFn2+c7XtUXN00Ec+9p2G+dBFFBT4vD7OBHtF37Dat7fo7U4RwyLiLmGzEJBoeTK aSB5Ft/q8OFppCVDdwX/YkTXb5GuZxxoapVEmxvQpcAUeazH+mB9S9NJTlioCY3SQKCtSS sutlfm4BmsrNhi3EDvm9JyHrDPqePm9Mqt2vWCckK4GROMKEYQuGcGXNHv2t+Ep4JmCbOE opNB/HCaKxdYlTrsXw78eHKS2hC8TkT/mQOF5za9Wlsa18SOtzPfxYetRpWJ5//8hcqPdj 4BeAAo3zrZsUu2jxcma/apxAvGsM7wlRihv+d1aU9L660o0mgxa1NoYuy2Tmdg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1640774393; a=rsa-sha256; cv=none; b=BkuAZJYHSTe7E+J7qpmsF/ksa+cUSLFGYuoqcuUkuYS7kZGFPddNC+pmK+BFo5nP8gj8/G +uM+pCbPldEte/kwJZ2RENaiC8KOun9KHv40ED3FV4Pb853FMEX3s/glpRsUu95OVaXl5G boTi95jcTk2N/St2MAg8X/G0DHFzknXjPuecR1D1yt/mNJGPYLvvC/qGiO2Y4QI1Ga71h4 FFJ1adfgghNeVHquGXeqrs+E1ZDL/x9YOxhw42msN1wsfmm97gCvqYS5Xn/Tfb/fSfbPfe g4MA69Hm+IEu2HiPAjGKVxUq7dDQnOOg2WEEatZNO0nlwCHUyT3ijB/O/BiKug== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=abf3835be640e8cc105c978bc96a1fd0686ee23c commit abf3835be640e8cc105c978bc96a1fd0686ee23c Author: Andrew Turner AuthorDate: 2021-12-07 14:32:11 +0000 Commit: Andrew Turner CommitDate: 2021-12-29 10:05:59 +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. (cherry picked from commit 1c643b721bed48ba795b42cdc5e8b5818f30ed14) --- 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 d4cebf6a8956..c105e7cae16b 100644 --- a/sys/arm64/arm64/pmap.c +++ b/sys/arm64/arm64/pmap.c @@ -5569,14 +5569,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)) { /* @@ -5606,11 +5606,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++;