From nobody Tue Mar 15 11:10:02 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 A91691A0ABC7; Tue, 15 Mar 2022 11:10:02 +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 4KHrKQ4Kp5z3DZ8; Tue, 15 Mar 2022 11:10:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1647342602; 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=4sdMzUYBZWN1EY6X5bNpjk42qcrRMqBu/OGLuxVeoZ0=; b=va1/Bc1l3twjRQ6YSpTMVIaJ8t728x6uYXsYAL27a7tSiwi4FEZCSprEeN76DDUCXG3tPR MVlTn/MWyok4PHGxwiKKSu6CquEStPmqoFcfpJziPD4iMaDbWYhCF+O8Z+T6H3bK28de6L sysd9udcZlHp6EN5HJebZ8U2+P/ES37n8U/7ggUGm8zS1LrRhmJNafa3Lkab+MwL3Leg9v VHaVselX0Ub8r9vpodCtVg1R4K4D/s9CSYMAEV4BvPi+X4k1gJlSiUQfhicRyqTB53eYBT jDFIJTDAYNC+Eiwo7Wpq3uJIMbmH+Fk6K9ZXVJxp2ms6XaK6YnLOYh0boSqBgg== 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 751F1207BB; Tue, 15 Mar 2022 11:10:02 +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 22FBA2ar096504; Tue, 15 Mar 2022 11:10:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 22FBA2CA096501; Tue, 15 Mar 2022 11:10:02 GMT (envelope-from git) Date: Tue, 15 Mar 2022 11:10:02 GMT Message-Id: <202203151110.22FBA2CA096501@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: 5e2f304cb4c7 - main - 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/main X-Git-Reftype: branch X-Git-Commit: 5e2f304cb4c7c2a8fdd8760ac53ed87d2df055f5 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1647342602; 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=4sdMzUYBZWN1EY6X5bNpjk42qcrRMqBu/OGLuxVeoZ0=; b=Ef+cbv5qXiZyAl/t8Jv5vfiWkoDp/z7qvhhSBR9He0fFs7l3wp2dZ8iexDvBHzPm3wSRVQ gBBahV2xfTsBCVE7VHA+tbQwgRDoHy4Qe2qmuiesqLEUiKASkd2VJXrkGGLlNrK1waL6yW BhLRCo0HHUb6r28BKy6TTHdkyPqiBUS20X6xfWRRHc9fysSND1dW1jwkilEOSV/xF333+R Fl1UB/iRCxkat16QFA9iIMOaT55D+RtPBfkU7cGywzFe19L3MVRRNcdVE3raEsYcma7Z/o 9MfwMQ4yeUDSQGU86p7RpzBYZaLTqdM6aiWYNYGca5O+jWFsz2mxjCsKF5bZ4Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1647342602; a=rsa-sha256; cv=none; b=CaxtPoq3AFwSpe+pQkfCLuQestNxhS5VhusPBVg1G1xHPtZUwBBvJ1RfURxRp+tneHxL1L h+5clrxiIQZ4hdzX6DDlA8bjUloWflWmnLrL2m3InTYlZwNtS9bylprme1YAxuOA4t5AtM lDhwZfARUm3nbRcM5z3qZ0IpI12pTVcvehROhCydUVnsClUCEgOjqOscVPNm5nrIOxhgqX /pJYI62JNvaMECRUqIFQKE1qyDuYYZX9mW44OsCOCkTgFERNbdo3u1/CRMpV9N2graxPMd bg7r1IFVCRYG4PpUIN8isfNFZEeMGNfg9oxTaxXLXMSpyzq7YikQwuT+sCl6Fg== 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=5e2f304cb4c7c2a8fdd8760ac53ed87d2df055f5 commit 5e2f304cb4c7c2a8fdd8760ac53ed87d2df055f5 Author: Andrew Turner AuthorDate: 2022-03-10 14:40:38 +0000 Commit: Andrew Turner CommitDate: 2022-03-15 09:51:41 +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 --- 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 3ad50e57d8e0..1570bf3d0b9c 100644 --- a/sys/arm64/arm64/pmap.c +++ b/sys/arm64/arm64/pmap.c @@ -1945,7 +1945,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); @@ -1973,7 +1973,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);