iommu: Split 'addr_merge' argument to iommu_pgsize() into separate parts
authorWill Deacon <will@kernel.org>
Wed, 16 Jun 2021 13:38:47 +0000 (06:38 -0700)
committerJoerg Roedel <jroedel@suse.de>
Mon, 26 Jul 2021 10:37:07 +0000 (12:37 +0200)
commit89d5b9601f70b72f524fdb7bc6cf1b1e8e20e867
treeedabadd0acfe3ba728363c20293dbeb9941a2d48
parente7d6fff6b3d34230bac1b2c2607646d7b8638cb7
iommu: Split 'addr_merge' argument to iommu_pgsize() into separate parts

The 'addr_merge' parameter to iommu_pgsize() is a fabricated address
intended to describe the alignment requirements to consider when
choosing an appropriate page size. On the iommu_map() path, this address
is the logical OR of the virtual and physical addresses.

Subsequent improvements to iommu_pgsize() will need to check the
alignment of the virtual and physical components of 'addr_merge'
independently, so pass them in as separate parameters and reconstruct
'addr_merge' locally.

No functional change.

Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
Signed-off-by: Georgi Djakov <quic_c_gdjako@quicinc.com>
Reviewed-by: Lu Baolu <baolu.lu@linux.intel.com>
Link: https://lore.kernel.org/r/1623850736-389584-7-git-send-email-quic_c_gdjako@quicinc.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/iommu.c