From nobody Sun May 19 19:43:53 2024 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 4VjB2x3FtTz5L28V; Sun, 19 May 2024 19:43: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 4VjB2x2Zykz57g1; Sun, 19 May 2024 19:43:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716147833; 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=E+MMQ5L/IvriThYzzxppsPMqalAmNKPT5JOzo9Z9tyQ=; b=Z7KR2TslBdG6bhYQgWXz5TyVXrmZEF1a0tyTT3c2e4oqQ95d5sFctdBWWRwId2lDe0x0ho DamthjDzFjTLwQZ/aBzYUUIG/bPCdh8I2FGYS/DxBbYOOjmPImgWuFw6VJmIE0mE7dHqkZ wAcGD40d6/jo2uqSlnsOfuCyRzmcxY7neM4BF60FtWLgDdlOlVnawHGoZMpVzj8ZlyqcU5 pmFV5N+l9Cxqi5qz/KIJrpxjCo2sINFQ+Dp19w0f6AwRC0BEivK7YGlKpsCyUv9XNVjSQB rkfrUDCSIKwluaqXuSAs6sNbe4Za231rgF8UApBd/pQIdYjxcGdqhwv1oRKxng== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716147833; a=rsa-sha256; cv=none; b=hXyGd1CASrOrMdlE4339doS/j6vD9kYxjO/DAG/y1lYNL/qTCHul0OMtw1zbXi6fSe4hHX NdSXqvH7MDlRToZd3/AG5m93HqX4fz7aYd/O9SCaZxb06YPGyLHxlM7n0RElNblqznfNAm 8FXJQaHnfBixPvCjEQnh3NnzGGl7ZDEflx+ex+Q6eigVk8UwtDPfkPw3O6Id8ja05W6jm+ uAHqSC6o1TeJousNenOm0MP+gJ5DPA60mCSwlKLLMWrR9cPkpW1R4w8nX9JEgvM0rNBNAm hH5uvoewhi0/fWRxLdYdyBKFp2lu1T2N5dfdVYN8WI3QdPUqcqJM1D2ZuNXFPA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716147833; 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=E+MMQ5L/IvriThYzzxppsPMqalAmNKPT5JOzo9Z9tyQ=; b=HGcAynPut+sY+OVa+B5gYE2M/oZWG98F/Qb8GRGV/4NMDgxRnhGXIzSTrtGzDMoadn6Gzo uihUUicVWWdj3SZZeRSP0dsFZ9YC2FOjYe6PO62rcW4KLjahBXLElCoYpaZf1OVKTTfDQQ p1zuVLT9auyOhTSqUknw6h3DBZKVl03v4IhhLsWV1/Zl17kAY4X/uLjGuD3DRzNvUqot5j 0iFu4psAcGdBZ4muA2oDITlCSDihb9/w8H1oXTPtOz7Y6cC2hLA6A3BvfXk7zrPagyYf80 yI1xW1DNEXs5KdlSteSaPPOAcs8Wabnb7mvgYbkvPQWCfEMg607kmEkO1OeECw== 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 4VjB2x29t1z1Mj4; Sun, 19 May 2024 19:43:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44JJhrxA027788; Sun, 19 May 2024 19:43:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44JJhr2S027786; Sun, 19 May 2024 19:43:53 GMT (envelope-from git) Date: Sun, 19 May 2024 19:43:53 GMT Message-Id: <202405191943.44JJhr2S027786@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alan Cox Subject: git: 4f77144279f2 - main - arm64 pmap: eliminate a redundant variable 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: alc X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4f77144279f210ce65d77c13470c6363c3ce3c57 Auto-Submitted: auto-generated The branch main has been updated by alc: URL: https://cgit.FreeBSD.org/src/commit/?id=4f77144279f210ce65d77c13470c6363c3ce3c57 commit 4f77144279f210ce65d77c13470c6363c3ce3c57 Author: Alan Cox AuthorDate: 2024-05-19 19:22:53 +0000 Commit: Alan Cox CommitDate: 2024-05-19 19:33:19 +0000 arm64 pmap: eliminate a redundant variable Moreover, if we attempt an L2 promotion on the kernel pmap from pmap_enter_quick_locked(), this change eliminates the recomputation of the L2 entry's address. MFC after: 1 week --- sys/arm64/arm64/pmap.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sys/arm64/arm64/pmap.c b/sys/arm64/arm64/pmap.c index a6056a5edfc2..269513589d78 100644 --- a/sys/arm64/arm64/pmap.c +++ b/sys/arm64/arm64/pmap.c @@ -5848,7 +5848,6 @@ static vm_page_t pmap_enter_quick_locked(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot, vm_page_t mpte, struct rwlock **lockp) { - pd_entry_t *pde; pt_entry_t *l1, *l2, *l3, l3_val; vm_paddr_t pa; int lvl; @@ -5913,13 +5912,13 @@ pmap_enter_quick_locked(pmap_t pmap, vm_offset_t va, vm_page_t m, l3 = &l3[pmap_l3_index(va)]; } else { mpte = NULL; - pde = pmap_pde(kernel_pmap, va, &lvl); - KASSERT(pde != NULL, + l2 = pmap_pde(kernel_pmap, va, &lvl); + KASSERT(l2 != NULL, ("pmap_enter_quick_locked: Invalid page entry, va: 0x%lx", va)); KASSERT(lvl == 2, ("pmap_enter_quick_locked: Invalid level %d", lvl)); - l3 = pmap_l2_to_l3(pde, va); + l3 = pmap_l2_to_l3(l2, va); } /*