iommu: Small fixes and cleanups
Joerg Roedel
maintainercover iommu: Small fixes and cleanups
Hi,
here are a couple of iommu fixes and cleanups to fix compile errors and some warnings on ARM and PPC.
Regards,
Joerg
Joerg Roedel (4):
iommu: Make more drivers depend on COMPILE_TEST
iommu/exynos: Make driver depend on REGULATOR
iommu/omap: Print phys_addr_t using %pa
iommu/fsl: Use %pa to print phys_addr_t
drivers/iommu/Kconfig | 11 +++++++---- drivers/iommu/fsl_pamu.c | 4 ++-- drivers/iommu/omap-iommu.c | 2 +- 3 files changed, 10 insertions(+), 7 deletions(-)
Signature · 1 line
1.9.1
Joerg Roedel
maintainerPATCH 1/4 iommu: Make more drivers depend on COMPILE_TEST
From: Joerg Roedel <[email protected]>
For easier compile testing of these iommu drivers.
--- drivers/iommu/Kconfig | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
drivers/iommu/Kconfig +6 -3
@@ -19,7 +19,8 @@ config OF_IOMMU config FSL_PAMU bool "Freescale IOMMU support" - depends on PPC_E500MC + depends on PPC32 + depends on PPC_E500MC || COMPILE_TEST select IOMMU_API select GENERIC_ALLOCATOR help
@@ -30,7 +31,8 @@ config FSL_PAMU # MSM IOMMU support config MSM_IOMMU bool "MSM IOMMU Support" - depends on ARCH_MSM8X60 || ARCH_MSM8960 + depends on ARM + depends on ARCH_MSM8X60 || ARCH_MSM8960 || COMPILE_TEST select IOMMU_API help Support for the IOMMUs found on certain Qualcomm SOCs.
@@ -140,7 +142,8 @@ config IRQ_REMAP # OMAP IOMMU support config OMAP_IOMMU bool "OMAP IOMMU Support" - depends on ARCH_OMAP2PLUS + depends on ARM + depends on ARCH_OMAP2PLUS || COMPILE_TEST select IOMMU_API config OMAP_IOMMU_DEBUG
Signature · 1 line
1.9.1
Joerg Roedel
maintainerPATCH 2/4 iommu/exynos: Make driver depend on REGULATOR
In reply to Joerg RoedelFrom: Joerg Roedel <[email protected]>
When regulator is not selected during kconfig, linking of the exynos iommu driver fails due to missing symbols. Fix it!
--- drivers/iommu/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iommu/Kconfig +1 -1
@@ -190,7 +190,7 @@ config TEGRA_IOMMU_SMMU config EXYNOS_IOMMU bool "Exynos IOMMU Support" - depends on ARCH_EXYNOS && ARM + depends on ARCH_EXYNOS && ARM && REGULATOR select IOMMU_API select ARM_DMA_USE_IOMMU help
Signature · 1 line
1.9.1
A message that is not in the archive (sent off-list or not yet received): 1422316230-18893-3-git-send-email-joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.org
Re: [PATCH 2/4] iommu/exynos: Make driver depend on REGULATOR
Hello,
Quoted 5 lines · Joerg Roedel
From: Joerg Roedel <[email protected]>
When regulator is not selected during kconfig, linking of the exynos iommu driver fails due to missing symbols. Fix it!
Frankly, I never observed such issue. Could you provide the .config for such case? I know that existing exynos iommu driver is broken, but please, don't break it even more...
Quoted 10 lines
Signed-off-by Joerg Roedel <[email protected]>--- drivers/iommu/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/iommu/Kconfig +0
-0
drivers/iommu/Kconfig config TEGRA_IOMMU_SMMU · line 196
Quoted 8 lines
drivers/iommu/Kconfig +1
-1@@ -190,7 +190,7 @@ config TEGRA_IOMMU_SMMU config EXYNOS_IOMMU bool "Exynos IOMMU Support" - depends on ARCH_EXYNOS && ARM + depends on ARCH_EXYNOS && ARM && REGULATOR select IOMMU_API select ARM_DMA_USE_IOMMU help
Best regards
Signature · 2 lines
Marek Szyprowski, PhD Samsung R&D Institute Poland
Re: [PATCH 2/4] iommu/exynos: Make driver depend on REGULATOR
In reply to Joerg RoedelQuoted 5 lines · Joerg Roedel
From: Joerg Roedel <[email protected]>
When regulator is not selected during kconfig, linking of the exynos iommu driver fails due to missing symbols. Fix it!
Removed this patch from my tree, as the issue was somewhere else.
Joerg Roedel
maintainerPATCH 3/4 iommu/omap: Print phys_addr_t using %pa
In reply to Joerg RoedelFrom: Joerg Roedel <[email protected]>
Fixes this compile warning:
drivers/iommu/omap-iommu.c: In function 'omap_iommu_map':drivers/iommu/omap-iommu.c:1139:2: warning: format '%x' expects argument of type 'unsigned int', but argument 5 has type 'phys_addr_t' [-Wformat=]
dev_dbg(dev, "mapping da 0x%lx to pa 0x%x size 0x%x\n", da, pa, bytes);
--- drivers/iommu/omap-iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iommu/omap-iommu.c +1 -1
@@ -1126,7 +1126,7 @@ static int omap_iommu_map(struct iommu_domain *domain, unsigned long da,return -EINVAL ; } -dev_dbg (dev,"mapping da 0x%lx to pa 0x%x size 0x%x\n" , da, pa, bytes); +dev_dbg (dev,"mapping da 0x%lx to pa %pa size 0x%x\n" , da, &pa, bytes);iotlb_init_entry (&e, da, pa, omap_pgsz);
Signature · 1 line
1.9.1
Joerg Roedel
maintainerPATCH 4/4 iommu/fsl: Use %pa to print phys_addr_t
In reply to Joerg RoedelFrom: Joerg Roedel <[email protected]>
Fix two compile warnings.
--- drivers/iommu/fsl_pamu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/iommu/fsl_pamu.c +2 -2
@@ -352,7 +352,7 @@ int pamu_config_ppaace(int liodn, phys_addr_t win_addr, phys_addr_t win_size,unsigned long fspi;if ((win_size & (win_size -1 )) || win_size <PAMU_PAGE_SIZE ) { -pr_debug ("window size too small or not a power of two %llx\n" , win_size); +pr_debug ("window size too small or not a power of two %pa\n" , &win_size);return -EINVAL ; }
@@ -1138,7 +1138,7 @@ static int __init fsl_pamu_probe(struct platform_device *pdev)if (csd_port_id) {dev_dbg (&pdev->dev,"creating coherency subdomain at address " -"0x%llx, size %zu, port id 0x%08x" , ppaact_phys, +"%pa, size %zu, port id 0x%08x" , &ppaact_phys, mem_size, csd_port_id); ret =create_csd (ppaact_phys, mem_size, csd_port_id);
Signature · 1 line
1.9.1
A message that is not in the archive (sent off-list or not yet received): 1422316230-18893-5-git-send-email-joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.org
Re: [PATCH 4/4] iommu/fsl: Use %pa to print phys_addr_t
Hello Joerg,
Quoted 14 lines · Joerg Roedel
From: Joerg Roedel <[email protected]>
Fix two compile warnings.
Signed-off-by Joerg Roedel <[email protected]>--- drivers/iommu/fsl_pamu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/iommu/fsl_pamu.c +0
-0
drivers/iommu/fsl_pamu.c int pamu_config_ppaace(int liodn, phys_addr_t win_addr, phys_addr_t win_size, · line 357
Quoted 7 lines
drivers/iommu/fsl_pamu.c +1
-1@@ -352,7 +352,7 @@ int pamu_config_ppaace(int liodn, phys_addr_t win_addr, phys_addr_t win_size,unsigned long fspi;if ((win_size & (win_size -1 )) || win_size <PAMU_PAGE_SIZE ) { -pr_debug ("window size too small or not a power of two %llx\n" , win_size); +pr_debug ("window size too small or not a power of two %pa\n" , &win_size);return -EINVAL ; }
Somewhere around line 1124 there another opportunity for this fix:
Quoted 2 lines
drivers/iommu/fsl_pamu.c +0
-01124 dev_dbg(&pdev->dev, "ppaact virt=%p phys=0x%llx\n", ppaact,1125 (unsigned long long) ppaact_phys);
Cheers,
Quoted 9 lines
drivers/iommu/fsl_pamu.c +1
-1@@ -1138,7 +1138,7 @@ static int __init fsl_pamu_probe(struct platform_device *pdev)if (csd_port_id) {dev_dbg (&pdev->dev,"creating coherency subdomain at address " -"0x%llx, size %zu, port id 0x%08x" , ppaact_phys, +"%pa, size %zu, port id 0x%08x" , &ppaact_phys, mem_size, csd_port_id); ret =create_csd (ppaact_phys, mem_size, csd_port_id);
A message that is not in the archive (sent off-list or not yet received): [email protected]
Re: [PATCH 4/4] iommu/fsl: Use %pa to print phys_addr_t
Quoted 20 lines · Emil Medve
Hello Joerg,
Quoted 16 lines · Joerg Roedel
From: Joerg Roedel <[email protected]>
Fix two compile warnings.
Signed-off-by Joerg Roedel <[email protected]>--- drivers/iommu/fsl_pamu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/iommu/fsl_pamu.c +0
-0@@ -352,7 +352,7 @@ int pamu_config_ppaace(int liodn, phys_addr_t win_addr, phys_addr_t win_size,unsigned long fspi;
Quoted 7 lines
drivers/iommu/fsl_pamu.c int pamu_config_ppaace(int liodn, phys_addr_t win_addr, phys_addr_t win_size, · line 357
Quoted 5 lines
drivers/iommu/fsl_pamu.c +1
-1if ((win_size & (win_size -1 )) || win_size <PAMU_PAGE_SIZE ) { -pr_debug ("window size too small or not a power of two %llx\n" , win_size); +pr_debug ("window size too small or not a power of two %pa\n" , &win_size);return -EINVAL ; }Somewhere around line 1124 there another opportunity for this fix:
Thanks, I updated the patch.
Joerg
Hi Joerg,
Thank you for the patches.
Quoted 4 lines · On Tuesday 27 January 2015 00:50:26 Joerg Roedel wrote:
Hi,
here are a couple of iommu fixes and cleanups to fix compile errors and some warnings on ARM and PPC.
For the whole series,
Quoted 14 lines
Regards,
Joerg
Joerg Roedel (4):
iommu: Make more drivers depend onCOMPILE_TEST
iommu/exynos: Make driver depend on REGULATOR
iommu/omap: Printphys_addr_tusing %pa
iommu/fsl: Use %pa to printphys_addr_tdrivers/iommu/Kconfig | 11 +++++++---- drivers/iommu/fsl_pamu.c | 4 ++-- drivers/iommu/omap-iommu.c | 2 +- 3 files changed, 10 insertions(+), 7 deletions(-)
Signature · 3 lines
Regards, Laurent Pinchart
Quoted 15 lines · Joerg Roedel
Hi,
here are a couple of iommu fixes and cleanups to fix compile errors and some warnings on ARM and PPC.
Regards,
Joerg
Joerg Roedel (4):
iommu: Make more drivers depend onCOMPILE_TEST
iommu/exynos: Make driver depend on REGULATOR
iommu/omap: Printphys_addr_tusing %pa
iommu/fsl: Use %pa to printphys_addr_t
Quoted 4 lines
drivers/iommu/Kconfig | 11 +++++++---- drivers/iommu/fsl_pamu.c | 4 ++-- drivers/iommu/omap-iommu.c | 2 +- 3 files changed, 10 insertions(+), 7 deletions(-)
Applied these patches to their respective branches.