iommu/tegra: Print phys_addr_t using %pa
Thierry Reding [Tue, 17 Sep 2013 08:19:31 +0000 (10:19 +0200)]
When enabling LPAE on ARM, phys_addr_t becomes 64 bits wide and printing
a variable of that type using a simple %x format specifier causes the
compiler to complain. Change the format specifier to %pa, which is used
specifically for variables of type phys_addr_t.

Change-Id: I3c11b6c6e062dd7a7724143aef9df3dd29849429
Signed-off-by: Thierry Reding <treding@nvidia.com>
Acked-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Joerg Roedel <joro@8bytes.org>
Signed-off-by: Hiroshi Doyu <hdoyu@nvidia.com>

drivers/iommu/tegra-gart.c
drivers/iommu/tegra-smmu.c

index 41af95f..6809fee 100644 (file)
@@ -252,7 +252,7 @@ static int gart_iommu_map(struct iommu_domain *domain, unsigned long iova,
        spin_lock_irqsave(&gart->pte_lock, flags);
        pfn = __phys_to_pfn(pa);
        if (!pfn_valid(pfn)) {
-               dev_err(gart->dev, "Invalid page: %08x\n", pa);
+               dev_err(gart->dev, "Invalid page: %pa\n", &pa);
                spin_unlock_irqrestore(&gart->pte_lock, flags);
                return -EINVAL;
        }
@@ -295,8 +295,8 @@ static phys_addr_t gart_iommu_iova_to_phys(struct iommu_domain *domain,
 
        pa = (pte & GART_PAGE_MASK);
        if (!pfn_valid(__phys_to_pfn(pa))) {
-               dev_err(gart->dev, "No entry for %08llx:%08x\n",
-                        (unsigned long long)iova, pa);
+               dev_err(gart->dev, "No entry for %08llx:%pa\n",
+                        (unsigned long long)iova, &pa);
                gart_dump_table(gart);
                return -EINVAL;
        }
index 75f7782..99e38b6 100644 (file)
@@ -1111,7 +1111,7 @@ static int smmu_iommu_map(struct iommu_domain *domain, unsigned long iova,
        int (*fn)(struct smmu_as *as, dma_addr_t iova, phys_addr_t pa,
                  int prot);
 
-       dev_dbg(as->smmu->dev, "[%d] %08lx:%llx\n", as->asid, iova, (u64)pa);
+       dev_dbg(as->smmu->dev, "[%d] %08lx:%pa\n", as->asid, iova, &pa);
 
        switch (bytes) {
        case SZ_4K: