diff options
author | Robin Murphy <robin.murphy@arm.com> | 2018-03-29 07:24:52 -0400 |
---|---|---|
committer | Joerg Roedel <jroedel@suse.de> | 2018-03-29 09:19:10 -0400 |
commit | 7868805969942a424118b7da5233946e53ce69be (patch) | |
tree | 853ed7cdbd3ed4b9bcd2764d710c63ea7b92adc3 | |
parent | 1543f226335bae25e157fd1e33f43f54458d29c2 (diff) |
iommu/io-pgtable-arm: Avoid warning with 32-bit phys_addr_t
It's not entirely unreasonable for io-pgtable-arm to be built for
configurations with 32-bit phys_addr_t, where the compiler rightly
raises a warning about the 36-bit shift. That particular code path
should never actually *run* on those systems, but we still want it
to compile cleanly, which is easily done by using an unambiguous u64
as the intermediate type instead.
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
-rw-r--r-- | drivers/iommu/io-pgtable-arm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iommu/io-pgtable-arm.c b/drivers/iommu/io-pgtable-arm.c index a5be4c92c5c8..47b64d3b833f 100644 --- a/drivers/iommu/io-pgtable-arm.c +++ b/drivers/iommu/io-pgtable-arm.c | |||
@@ -211,7 +211,7 @@ static arm_lpae_iopte paddr_to_iopte(phys_addr_t paddr, | |||
211 | static phys_addr_t iopte_to_paddr(arm_lpae_iopte pte, | 211 | static phys_addr_t iopte_to_paddr(arm_lpae_iopte pte, |
212 | struct arm_lpae_io_pgtable *data) | 212 | struct arm_lpae_io_pgtable *data) |
213 | { | 213 | { |
214 | phys_addr_t paddr = pte & ARM_LPAE_PTE_ADDR_MASK; | 214 | u64 paddr = pte & ARM_LPAE_PTE_ADDR_MASK; |
215 | 215 | ||
216 | if (data->pg_shift < 16) | 216 | if (data->pg_shift < 16) |
217 | return paddr; | 217 | return paddr; |