From nobody Thu Aug 29 15:21: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 4WvlPZ2Qmwz5PcK1; Thu, 29 Aug 2024 15:21:54 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WvlPZ06Xfz4qdW; Thu, 29 Aug 2024 15:21:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1724944914; 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=OEcxx4hKnUbzMfV7mjYu+qS8KKS9/JTOiJi0jxwM9x8=; b=XH1bj9nH8nq77qMoTcGFli9sd9L4I7waGdYqD/SPmS4arnEIXip2+RwonBDwW3a6kWR329 WZSuieYqRhfkO7D1j5Ozk/2VARuI95mpNKiF58s9Zcho4d3d+cBRT9P9iD+tco09ttc8iu 7zcKkXmJjsh9MEavHiiq4iWGXrwid44wnKJ6dizOFHCkb1GMdMZZZGmsqULBkXrDxybB5M jAlO5ZHfCViZHtO9s0ZJuKMQx5WCh/J8k7jwKDM5ZUPdxnylaCKgsHzNbdZyMBtBREJwSj I2Is+nOZdDKYHmeRSWz3Bv1kLeEiw6keJwUIKdiExkFWWYgyH1ij9fk3hr3m9A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1724944914; a=rsa-sha256; cv=none; b=iFO0O08ma+svpPnejNoFRY1DiMtqYvC+P/38r1UE1jSGqvG0pEOb2B+secSXgZ47WLQELe TeHFocQcQs2TOlFf2pMmD5rn9ID8uGZGa93uUUuOFxx1x8EO/k5+qkCf3gw2ClaB/7Smuy +QF9Yi6bsB0EQZKiZ0UCgCsJlcSFtEYCQzjLOIylIkswIuf0fBQFIDUdqjYJXlPu2eFtLY KQghg51vIKDJMfMJ2XOwJ2nR0y3Gxihp/V7zoY7nkWEy3QVatvubQla+sGqmvNTaqPKcdM fRN002OJvcpdmtAZMucfsnBvBslCe0+aJdXp87NcMh8Mq0zcT1INkQL3JDOD/A== 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=1724944914; 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=OEcxx4hKnUbzMfV7mjYu+qS8KKS9/JTOiJi0jxwM9x8=; b=MicGRcuSuOo5bR/5nA8MPPNLhid0cIZ/1GB1AWnyT18AYbNX0CZ56HSBiELrQ96Mdfzghc WJrDj4bVLrkuUd7PCxkqgsmtCZgJprhqwNT3j9c6YrckSW+fr5ozZMcmgD2aLFpobYRpf9 9McWuyAx7LMz66mSC40J48JEvmdhY4vLA+98Gd7U1toWxHdn5JQs5ULHvRTIpWTZ5NCANH 2HhcMwi+c87yuK0sdtmeOEFE8UoDRjLYfK06lN3Xn/3JQWZWLvloaOgJC9iJOZ0Uq3mCsP zdlQ44kEiRceeFmaNYtcWuF4p0fIqKakReQGRVl4qo+x/oE/LETUsR6MKbbf1Q== 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 4WvlPY6n3gzN9J; Thu, 29 Aug 2024 15:21:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 47TFLr5P009033; Thu, 29 Aug 2024 15:21:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 47TFLrBV009030; Thu, 29 Aug 2024 15:21:53 GMT (envelope-from git) Date: Thu, 29 Aug 2024 15:21:53 GMT Message-Id: <202408291521.47TFLrBV009030@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: 835cd17f87e1 - main - riscv: use pmap_l1_pindex to calculate the pindex of the l2 page table page 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: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 835cd17f87e1b38c05e4a9a392181bebb9b8dc6d Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=835cd17f87e1b38c05e4a9a392181bebb9b8dc6d commit 835cd17f87e1b38c05e4a9a392181bebb9b8dc6d Author: Wuyang Chung AuthorDate: 2024-08-05 05:22:56 +0000 Commit: Mitchell Horne CommitDate: 2024-08-29 15:20:29 +0000 riscv: use pmap_l1_pindex to calculate the pindex of the l2 page table page Reviewed by: mhorne MFC after: 1 week Pull Request: https://github.com/freebsd/freebsd-src/pull/1360 --- sys/riscv/riscv/pmap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/riscv/riscv/pmap.c b/sys/riscv/riscv/pmap.c index 4baa4948e442..69eb36c2cd4c 100644 --- a/sys/riscv/riscv/pmap.c +++ b/sys/riscv/riscv/pmap.c @@ -1743,7 +1743,7 @@ pmap_alloc_l2(pmap_t pmap, vm_offset_t va, struct rwlock **lockp) { pd_entry_t *l1; vm_page_t l2pg; - vm_pindex_t l2pindex; + vm_pindex_t pindex; retry: l1 = pmap_l1(pmap, va); @@ -1756,8 +1756,8 @@ retry: l2pg->ref_count++; } else { /* Allocate a L2 page. */ - l2pindex = pmap_l2_pindex(va) >> Ln_ENTRIES_SHIFT; - l2pg = _pmap_alloc_l3(pmap, NUL2E + l2pindex, lockp); + pindex = pmap_l1_pindex(va); + l2pg = _pmap_alloc_l3(pmap, pindex, lockp); if (l2pg == NULL && lockp != NULL) goto retry; }