]> git.baikalelectronics.ru Git - kernel.git/commit
iommu/io-pgtable-arm: Simplify PGD size handling
authorRobin Murphy <robin.murphy@arm.com>
Fri, 25 Oct 2019 18:08:34 +0000 (19:08 +0100)
committerWill Deacon <will@kernel.org>
Mon, 4 Nov 2019 19:34:31 +0000 (19:34 +0000)
commit60fa3432f1788e7410bde7b6eb84ce9694838658
tree382c1fd931d727b51385daeb34abd0f55aa022c1
parent6274e9903c13f5ce0753a1bc9a4a776bb9aa288e
iommu/io-pgtable-arm: Simplify PGD size handling

We use data->pgd_size directly for the one-off allocation and freeing of
the top-level table, but otherwise it serves for ARM_LPAE_PGD_IDX() to
repeatedly re-calculate the effective number of top-level address bits
it represents. Flip this around so we store the form we most commonly
need, and derive the lesser-used one instead. This cuts a whole bunch of
code out of the map/unmap/iova_to_phys fast-paths.

Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Will Deacon <will@kernel.org>
drivers/iommu/io-pgtable-arm.c