From nobody Wed Jan 15 15:03:44 2025
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 4YY8QS2jT0z5kFD3;
	Wed, 15 Jan 2025 15:03:44 +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 4YY8QS1bBjz3h2G;
	Wed, 15 Jan 2025 15:03:44 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1736953424;
	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=Vd2Kd0s0y1BZXp9NCtsIn31so4tbZyB8be91w9EFv7g=;
	b=GMiKNqAqdxFCTSq97r/vhQGWqfXLFZKeZv8u2AZLbfnUVfU2wUyHAsjT+Hj3eTftaYDHI7
	2Da/s+zChRnkV8LobzlHK6SI7ZI2rcjW5ROhTN8JxxwAm5CEnWK1i0Zukq2vYFqiMpb8n8
	MIq6ewR1UZnyRNwTLHujFNIDGeikB/hgF043RyWrG+XhZxdRbDY0oSjvblEWYt4laNXsgV
	HFl4Y+4A2TT/gtqHWXo88YIZRQaT/uZHEHaEtb4N0NpG/b+gqB78kg7HKqJzL/gljIWQ0C
	DrjgCk0Dyc0z8u6cOD7meUhiX2GNxFvV2YIiW7jUtJjEyWrmKmagS82zRQORrw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1736953424;
	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=Vd2Kd0s0y1BZXp9NCtsIn31so4tbZyB8be91w9EFv7g=;
	b=a6dpSeaZ8XTFYr9LZM2bYXcU1yzQo8oHUNG6PbSnS07YU6SORHDTKt/LRjnpr5unmW/t00
	669hQCeOpqzEFo8M1sQG1WAHo1phelVWmnxoaHq+QXGmjSLO+2kpSmiaDaezDTe+R84+sS
	fCWRHIuP75lIj9DLFljGV/vRs76TZssbM/OOtdnKrNkKLC3M9YEJZFTIuzv569mWrSxHIk
	1gb+tTzM5iyqVvPa04k7KQMZWtUUEGM+WFnxnD4z3UypU6gwYFvDS0UQyAEFHRunRuZhts
	dAv94HbkjgejK05Z+ADvuyUAELzG2sfLDtigo9Sx6igeIYMHhBph72l3/zWvag==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1736953424; a=rsa-sha256; cv=none;
	b=MKFtojNYQMgV9hVP9w2+4wWQ8ea9SXCkNeoe2OkXdoTGpnBo5b9BFrwfTpvq/Ik7S/U+VQ
	z+AveLKnH+9hOV509JnjuwwQjwi7AlYKbh9KIxTwaXHm+SjU35FISFBH1bIUu2UHbohgvJ
	fqnT+eAL5tq3uyMKMAZJSjkqaUsgBPUQ5/XZhmWQnhN0BMdoqOXPaP+5PrVgph14siEth4
	46+wN5vord2e8s68dyOwxopCQ5YRfZ1A/efgUZld3bIAfyZyN4vT6zdliWVHldpXUn29dx
	A3klMpOhH1aqH9uj48lO7S5SQnJcMUB4otLD5bmR47+IYmcW6Oo+LhDcWshDVw==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
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 4YY8QS1BDRzrSc;
	Wed, 15 Jan 2025 15:03:44 +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 50FF3iFa052631;
	Wed, 15 Jan 2025 15:03:44 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50FF3iP9052628;
	Wed, 15 Jan 2025 15:03:44 GMT
	(envelope-from git)
Date: Wed, 15 Jan 2025 15:03:44 GMT
Message-Id: <202501151503.50FF3iP9052628@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-main@FreeBSD.org
From: John Baldwin <jhb@FreeBSD.org>
Subject: git: 101e825e551a - main - arm64: Refine comment about
  size of struct pmap_large_md_page
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org>
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
List-Help: <mailto:dev-commits-src-all+help@freebsd.org>
List-Post: <mailto:dev-commits-src-all@freebsd.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org>
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: jhb
X-Git-Repository: src
X-Git-Refname: refs/heads/main
X-Git-Reftype: branch
X-Git-Commit: 101e825e551afc69a7cebb78fa6b676d38d93d2d
Auto-Submitted: auto-generated

The branch main has been updated by jhb:

URL: https://cgit.FreeBSD.org/src/commit/?id=101e825e551afc69a7cebb78fa6b676d38d93d2d

commit 101e825e551afc69a7cebb78fa6b676d38d93d2d
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2025-01-15 15:03:12 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2025-01-15 15:03:12 +0000

    arm64: Refine comment about size of struct pmap_large_md_page
    
    pmap_init_pv_table does not assume a specific size of 64.  It does
    assume a size that evenly divides the size of a page since it inserts
    pages from different domains into the kva backing the global pv_table
    array.
    
    Reviewed by:    imp, markj
    Sponsored by:   DARPA
    Differential Revision:  https://reviews.freebsd.org/D48455
---
 sys/arm64/arm64/pmap.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/sys/arm64/arm64/pmap.c b/sys/arm64/arm64/pmap.c
index fd6798668626..23eedff2e7cd 100644
--- a/sys/arm64/arm64/pmap.c
+++ b/sys/arm64/arm64/pmap.c
@@ -1547,11 +1547,11 @@ pmap_init_pv_table(void)
 	int domain, i, j, pages;
 
 	/*
-	 * We strongly depend on the size being a power of two, so the assert
-	 * is overzealous. However, should the struct be resized to a
-	 * different power of two, the code below needs to be revisited.
+	 * We depend on the size being evenly divisible into a page so
+	 * that the pv_table array can be indexed directly while
+	 * safely spanning multiple pages from different domains.
 	 */
-	CTASSERT((sizeof(*pvd) == 64));
+	CTASSERT(PAGE_SIZE % sizeof(*pvd) == 0);
 
 	/*
 	 * Calculate the size of the array.