From nobody Sun Feb 8 10:03:19 2026 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2E2F13271F9 for ; Fri, 31 Oct 2025 07:13:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761894784; cv=none; b=R8HXgap2jXRv/sr8rqzmQEWmcLlG61H447sqkb2x4yMjomQwztrx9aXW1B+PBPlnv6EvdjpcjxVqAohJ7LHIZEWOcQE9DZ2lThhPWZK6FsKx93gFItD3oTq4+eFsmIe7Ls2xgDRKTmRtYjnB+2ej/8QjfFb6afBSjDPi5g6gyGA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761894784; c=relaxed/simple; bh=H32UaZBzakVlFxKSnLtgEU39K7zsbRcWtrPNj5VfTmo=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=rNpjYpSTjf7oZ957eFDRFBI3T0nywmF56/loYF+8vY20rBJsNHkyKO54Aj2yaRp0/96aE2YYJBF36btouvpGFuc+tesnVXqoE1iRiZ4TXc7DqpOXdzzC7YuDU3JEZMupgSm/WC6cBx4tAHmvL2ZQG2UipWARu08xDUmvudAN++k= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 5C4E81595; Fri, 31 Oct 2025 00:12:53 -0700 (PDT) Received: from ergosum.cambridge.arm.com (ergosum.cambridge.arm.com [10.1.196.45]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 54DC73F63F; Fri, 31 Oct 2025 00:13:00 -0700 (PDT) From: Anshuman Khandual To: linux-arm-kernel@lists.infradead.org Cc: Anshuman Khandual , Catalin Marinas , Will Deacon , linux-kernel@vger.kernel.org Subject: [PATCH] arm64/mm: Ensure PGD_SIZE is aligned to 64 bytes when PA_BITS = 52 Date: Fri, 31 Oct 2025 07:12:55 +0000 Message-Id: <20251031071255.3335501-1-anshuman.khandual@arm.com> X-Mailer: git-send-email 2.30.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Although the comment clearly states about PGD table's alignment requirement (when PA_BITS =3D 52) but the subsequent BUILD_BUG_ON() tests size comparis= on to 64 bytes instead. So change it as an actual alignment test. Cc: Catalin Marinas Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Anshuman Khandual --- arch/arm64/mm/pgd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/mm/pgd.c b/arch/arm64/mm/pgd.c index 8160cff35089..bf5110b91e2f 100644 --- a/arch/arm64/mm/pgd.c +++ b/arch/arm64/mm/pgd.c @@ -56,7 +56,7 @@ void __init pgtable_cache_init(void) * With 52-bit physical addresses, the architecture requires the * top-level table to be aligned to at least 64 bytes. */ - BUILD_BUG_ON(PGD_SIZE < 64); + BUILD_BUG_ON(!IS_ALIGNED(PGD_SIZE, 64)); #endif =20 /* --=20 2.30.2