From nobody Fri Aug 30 19:40:29 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 4WwT5V16W1z5PZbJ; Fri, 30 Aug 2024 19:40:30 +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 4WwT5V0XrFz4YFw; Fri, 30 Aug 2024 19:40:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1725046830; 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=A12QntbDCs1nzzW6fBHNK0GseuHEJ7c+6vkTk3sawyI=; b=G8Msk2x0HoHr5h4IE3ua2DpXzluLG2aSXjRbISlot/fCfo8QPuzOysD8Lg9EbVbRVg+qIG kGphVxndVl8J6Y0NqMmOyJtELdWwbZF+rpegFHVS0qm/S0YZagOyizEduLJiv8Y6m2Qyz4 wDh8AfVQcLrBvjyJLyOuLUUk/XG++/Kk6AD1E9SBVxKHZ4vp28fqC5xQ4ItA/EFc2gyz7n FE22oPqIol1b3qBNkqVnTVKz9VxCG8Ou+IsnuEcyJS2cootNJXIGkb4UDEmRMVQ33CWeTs MpzfaDUiwlmDBy1R1O33F4Qn+sdGFpv/jmoaPPqsAGsNw08J9/id49DjFhc2Dg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1725046830; a=rsa-sha256; cv=none; b=Ov9Htqnh6Uqi8Y/+Uxcpdkxib0JERV6Qg5Cb7mF3HJDucCqS9zKlqO05dJ9kTfR7Y3qexU 95zKaRvOR+qMPFmCA8m+nrH7dnhJ66Fe5H9vj2FBGypj89qv8mKo1qdLkosmxVD7V+Y8ZA tphxVLb3VPfAGe4dShHH28KFgSJ0gTGs5F5uURWF0aTSlJHuaieTS8vhlYE7GRWjTrkTX/ Wxruyh1wDTkOjbCsBF3ZYprov+241Xvwsw//djeU9tF6xUKwbV3qMnii0ICwHiUf/7Sefu u7Yci0nuuVO9ZvTHpsv72CXBzWsmrLokbtTfmfqoxedHPrjAnXDjGr3wtpXNLg== 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=1725046830; 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=A12QntbDCs1nzzW6fBHNK0GseuHEJ7c+6vkTk3sawyI=; b=kvN1ibND7wLIqbd1vZqP8QxeqysinfbkcFiIsxJ9D7thUK8R8a3Bur51F98cRzLXBWnWSv maSqexkBIfGP91UGXFEWmIDfkqmhziDSkThxcTvqKUO4CVUoaWhRHZRp6SPqGei2zW1cLl sQTcOq/w4BngjrmjYsenu9b+/xSQfbM0sGiT1wzv1SXy+hM6+mvPkBGNPveW62jGHotnYi ZeARled2UG0yyJOm3H9OJeNOOh4lP8utRBFxPRJJryV25cpgwkYolQZs8bX99QB3QbTNX5 pKDVKcyeeC41vp6uqwAsJ0lRQtmi7JUuvNruMwoWDoWLJ0h9Nj6c3TjzidB5Jw== 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 4WwT5V02T0z1CQW; Fri, 30 Aug 2024 19:40:30 +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 47UJeTl8090246; Fri, 30 Aug 2024 19:40:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 47UJeTkg090243; Fri, 30 Aug 2024 19:40:29 GMT (envelope-from git) Date: Fri, 30 Aug 2024 19:40:29 GMT Message-Id: <202408301940.47UJeTkg090243@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: 38a08e45f194 - main - arm64: fix L1 pindex calculation in pmap_growkernel() 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: 38a08e45f19447717726de4d41bd161f966d29da Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=38a08e45f19447717726de4d41bd161f966d29da commit 38a08e45f19447717726de4d41bd161f966d29da Author: Mitchell Horne AuthorDate: 2024-08-29 15:25:52 +0000 Commit: Mitchell Horne CommitDate: 2024-08-30 19:39:56 +0000 arm64: fix L1 pindex calculation in pmap_growkernel() Use the pmap_l1_pindex() macro which accounts for the NUL2E offset. While here, use pmap_l2_pindex() macro further down (no change). Prompted by pull request and commit 2e33abc35460, making the change for the riscv pmap. --- 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 58795e25c82e..224ecbdc4577 100644 --- a/sys/arm64/arm64/pmap.c +++ b/sys/arm64/arm64/pmap.c @@ -2962,7 +2962,7 @@ pmap_growkernel(vm_offset_t addr) VM_ALLOC_NOFREE | VM_ALLOC_WIRED | VM_ALLOC_ZERO); if (nkpg == NULL) panic("pmap_growkernel: no memory to grow kernel"); - nkpg->pindex = kernel_vm_end >> L1_SHIFT; + nkpg->pindex = pmap_l1_pindex(kernel_vm_end); /* See the dmb() in _pmap_alloc_l3(). */ dmb(ishst); pmap_store(l1, VM_PAGE_TO_PTE(nkpg) | L1_TABLE); @@ -2982,7 +2982,7 @@ pmap_growkernel(vm_offset_t addr) VM_ALLOC_NOFREE | VM_ALLOC_WIRED | VM_ALLOC_ZERO); if (nkpg == NULL) panic("pmap_growkernel: no memory to grow kernel"); - nkpg->pindex = kernel_vm_end >> L2_SHIFT; + nkpg->pindex = pmap_l2_pindex(kernel_vm_end); /* See the dmb() in _pmap_alloc_l3(). */ dmb(ishst); pmap_store(l2, VM_PAGE_TO_PTE(nkpg) | L2_TABLE);