mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 02:39:48 +00:00
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>
This commit is contained in:
parent
1543f22633
commit
7868805969
1 changed files with 1 additions and 1 deletions
|
@ -211,7 +211,7 @@ static arm_lpae_iopte paddr_to_iopte(phys_addr_t paddr,
|
||||||
static phys_addr_t iopte_to_paddr(arm_lpae_iopte pte,
|
static phys_addr_t iopte_to_paddr(arm_lpae_iopte pte,
|
||||||
struct arm_lpae_io_pgtable *data)
|
struct arm_lpae_io_pgtable *data)
|
||||||
{
|
{
|
||||||
phys_addr_t paddr = pte & ARM_LPAE_PTE_ADDR_MASK;
|
u64 paddr = pte & ARM_LPAE_PTE_ADDR_MASK;
|
||||||
|
|
||||||
if (data->pg_shift < 16)
|
if (data->pg_shift < 16)
|
||||||
return paddr;
|
return paddr;
|
||||||
|
|
Loading…
Reference in a new issue