From nobody Mon Apr 04 11:06:08 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 E0AA71A97450; Mon, 4 Apr 2022 11:06: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 4KX7Hh6vD3z3NRb; Mon, 4 Apr 2022 11:06:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649070369; 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=e4XSycsJQpmViV+9EyqltcyAcw19bhXrmy0tHgru9M4=; b=isjVbxOZmCHm/D+vLe2up4CwdXexCwuQtIXvx6B7bW56QYkxuRElnL1jjDnMPSOGG74KmE lN8VAuBkFqZItLRik/X6A6A8CJgdEzkBbxKHP2lUeYLmyr/QMKrt3c9EKGfYfiu9qAAbmb FVwmV25IPajLdgdMkhHbpOlsTb3S8KMqhK6lJUK92Kjh+ASJRse6aEE3oAkDKyopVv3vDH BjXQxGu4OZiuFdOv1AiCF0jD4tl33NKsJqax6h5vb9Z7sDsym/2nxTEKstoZNEf7mpeINs m+nhijM44PUeJwnAAzMpMLxNwwgqn0aMF3irAzZxijK4gp+BJr4YGA4EoVAiTA== 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 6A1B210F22; Mon, 4 Apr 2022 11:06:08 +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 234B68kb086672; Mon, 4 Apr 2022 11:06:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 234B68pS086671; Mon, 4 Apr 2022 11:06:08 GMT (envelope-from git) Date: Mon, 4 Apr 2022 11:06:08 GMT Message-Id: <202204041106.234B68pS086671@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: 9da8d0b5b680 - stable/13 - Fix calculating l0index in _pmap_alloc_l3 on arm64 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: 9da8d0b5b6803000dea93ab058321d82ef524712 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649070369; 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=e4XSycsJQpmViV+9EyqltcyAcw19bhXrmy0tHgru9M4=; b=kfSPW9oRH0CXD11TmTMnWdDGug2jPGyZ6UIIQLr7hvm8Xkk3A/fRxzy8oVMk+YxlsHxTsO zmz+VhnXVYbKyMKRMnJUKqaVmMVMJ8G787pIM8ONh/3Y5A8XJzhDz5O2R5h75lgSRLFjja pfyL6sw/SVdSM8lzWo3iJy6RkXDn9baUoQXy/0spydmAQF+JD9ORcN5I8SsYNhV3ak4HRA JCYxMo5U87qugYcqpJtTZkIikJ9ex5akyturV26rSPuLkSB40aknIiqLBBbxP7c8ZsgiNe mRN9gMCsMyArQuGKCAGmOKZeRLJu5Nau72CRu8XAW0h0hbL5iR7MnVt8ZbQVEQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1649070369; a=rsa-sha256; cv=none; b=CWT5twQtp/asaMe7gyVR7PtvSkPUQrqmjjJXojBFUHbCn/6VS+kZ38rmEUaPPnlXv3ydmY FvCS4pGptDgmVZa1l1wko33/CWYtK/837oo6ey+FXBnO/VoatbGQ7dqdap9mJTlmNFl/ut axtWor/NCb/6olC1bl0q7Q1ucH7gcJ8vauvWh+qm9lnzTCQy7EqKNLv2fx514Cdz938pom aXuG1JU4qnbtD06S+5z07c9nWNlHBSsx+eSOGzZJMoc83yhLbr1/xlfd02/ed/+GILnIeM pGCetn0CqATu+NgqG8ZXbs+b7OvcFFLAuz8pG2K1uDq7FWr9pwXoqEcsgbjKTg== 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=9da8d0b5b6803000dea93ab058321d82ef524712 commit 9da8d0b5b6803000dea93ab058321d82ef524712 Author: Andrew Turner AuthorDate: 2022-03-10 14:40:38 +0000 Commit: Andrew Turner CommitDate: 2022-04-04 09:37:07 +0000 Fix calculating l0index in _pmap_alloc_l3 on arm64 When moving from the l1 index to l0 index we need to use the l1 shift value not the l0 shift value. With 4k pages they are identical, however with 16k pages we only have 2 l0 entries so the shift value is incorrect. Reviewed by: alc, markj Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D34517 (cherry picked from commit 5e2f304cb4c7c2a8fdd8760ac53ed87d2df055f5) --- sys/arm64/arm64/pmap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/arm64/arm64/pmap.c b/sys/arm64/arm64/pmap.c index 849db125b027..924b82f01313 100644 --- a/sys/arm64/arm64/pmap.c +++ b/sys/arm64/arm64/pmap.c @@ -1889,7 +1889,7 @@ _pmap_alloc_l3(pmap_t pmap, vm_pindex_t ptepindex, struct rwlock **lockp) pd_entry_t tl0; l1index = ptepindex - NUL2E; - l0index = l1index >> L0_ENTRIES_SHIFT; + l0index = l1index >> Ln_ENTRIES_SHIFT; l0 = &pmap->pm_l0[l0index]; tl0 = pmap_load(l0); @@ -1917,7 +1917,7 @@ _pmap_alloc_l3(pmap_t pmap, vm_pindex_t ptepindex, struct rwlock **lockp) pd_entry_t tl0, tl1; l1index = ptepindex >> Ln_ENTRIES_SHIFT; - l0index = l1index >> L0_ENTRIES_SHIFT; + l0index = l1index >> Ln_ENTRIES_SHIFT; l0 = &pmap->pm_l0[l0index]; tl0 = pmap_load(l0);