]> www.infradead.org Git - users/jedix/linux-maple.git/commit
iommu/io-pgtable-arm: Fix cfg reading in arm_lpae_concat_mandatory()
authorMostafa Saleh <smostafa@google.com>
Sun, 15 Dec 2024 20:04:11 +0000 (20:04 +0000)
committerWill Deacon <will@kernel.org>
Thu, 19 Dec 2024 15:41:27 +0000 (15:41 +0000)
commitb7b8a63055572f5baa78c1d9d048aad750b02ba5
tree8c04b69d6f1cb4f4ebef00c231e0b272c512818b
parent376ce8b35ed15d5deee57bdecd8449f6a4df4c42
iommu/io-pgtable-arm: Fix cfg reading in arm_lpae_concat_mandatory()

The newly introduced arm_lpae_concat_mandatory() function reads the
ias/oas fields from the 'io_pgtable_cfg' copy embedded inside the
'arm_lpae_io_pgtable' structure. However, this copy is not set until
later in alloc_io_pgtable_ops() after the alloc() function has been
called.

Use the address sizes passed in the 'io_pgtable_cfg' structure when
deciding whether or not to concatenate the PGD.

Fixes: 4dcac8407fe1 ("iommu/io-pgtable-arm: Fix stage-2 concatenation with 16K")
Signed-off-by: Mostafa Saleh <smostafa@google.com>
Link: https://lore.kernel.org/r/20241215200412.561400-1-smostafa@google.com
Signed-off-by: Will Deacon <will@kernel.org>
drivers/iommu/io-pgtable-arm.c