Skip to content

Commit e2e21a9

Browse files
Anshuman Khandualctmarinas
authored andcommitted
arm64/mm: Ensure PGD_SIZE is aligned to 64 bytes when PA_BITS = 52
Although the comment clearly states about PGD table's alignment requirement (when PA_BITS = 52) but the subsequent BUILD_BUG_ON() tests size comparison to 64 bytes instead. So change it as an actual alignment test. Cc: Will Deacon <will@kernel.org> Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
1 parent fc1abd4 commit e2e21a9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

arch/arm64/mm/pgd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ void __init pgtable_cache_init(void)
5656
* With 52-bit physical addresses, the architecture requires the
5757
* top-level table to be aligned to at least 64 bytes.
5858
*/
59-
BUILD_BUG_ON(PGD_SIZE < 64);
59+
BUILD_BUG_ON(!IS_ALIGNED(PGD_SIZE, 64));
6060
#endif
6161

6262
/*

0 commit comments

Comments
 (0)