summaryrefslogtreecommitdiff
path: root/drivers/iommu
diff options
context:
space:
mode:
authorschowdary <schowdary@nvidia.com>2012-07-24 18:03:47 +0530
committerSimone Willett <swillett@nvidia.com>2012-08-02 09:25:15 -0700
commit73a5b2750a09e5d18cd7a5dc6c18a04016a4f902 (patch)
treecbce59fcb1be5e859017efaa249ebb789c3a246f /drivers/iommu
parent98c6d05c0b39367a6116eb40cae05f5586d54c9d (diff)
iommu: tegra/gart: resolve compilation warning
- Add compilation flag to treat warning as error - resolve label defined but not used error in smmu bug 949219 Change-Id: Ie6693cf21904008bbe927b27817a9cd02ed0d34f Signed-off-by: schowdary <schowdary@nvidia.com> Reviewed-on: http://git-master/r/118025 Reviewed-by: Sanjay Singh Rawat <srawat@nvidia.com> Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Hiroshi Doyu <hdoyu@nvidia.com> Tested-by: Hiroshi Doyu <hdoyu@nvidia.com> Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Diffstat (limited to 'drivers/iommu')
-rw-r--r--drivers/iommu/Makefile2
-rw-r--r--drivers/iommu/tegra-smmu.c19
2 files changed, 11 insertions, 10 deletions
diff --git a/drivers/iommu/Makefile b/drivers/iommu/Makefile
index 7ad7a3bc1242..ed59619d1af8 100644
--- a/drivers/iommu/Makefile
+++ b/drivers/iommu/Makefile
@@ -8,5 +8,7 @@ obj-$(CONFIG_IRQ_REMAP) += intr_remapping.o
obj-$(CONFIG_OMAP_IOMMU) += omap-iommu.o
obj-$(CONFIG_OMAP_IOVMM) += omap-iovmm.o
obj-$(CONFIG_OMAP_IOMMU_DEBUG) += omap-iommu-debug.o
+CFLAGS_tegra-gart.o = -Werror
obj-$(CONFIG_TEGRA_IOMMU_GART) += tegra-gart.o
+CFLAGS_tegra-smmu.o = -Werror
obj-$(CONFIG_TEGRA_IOMMU_SMMU) += tegra-smmu.o
diff --git a/drivers/iommu/tegra-smmu.c b/drivers/iommu/tegra-smmu.c
index 7b5ef3ffb7d0..25bff5c02bb4 100644
--- a/drivers/iommu/tegra-smmu.c
+++ b/drivers/iommu/tegra-smmu.c
@@ -320,8 +320,15 @@ static int __smmu_client_set_hwgrp(struct smmu_client *c,
val = smmu_read(smmu, offs);
if (on) {
#if !defined(SKIP_SWGRP_CHECK)
- if (WARN_ON(val & mask))
- goto err_hw_busy;
+ if (WARN_ON(val & mask)) {
+ for_each_set_bit(i, &map, HWGRP_COUNT) {
+ offs = HWGRP_ASID_REG(i);
+ val = smmu_read(smmu, offs);
+ val &= ~mask;
+ smmu_write(smmu, val, offs);
+ }
+ return -EBUSY;
+ }
#endif
val |= mask;
} else {
@@ -336,14 +343,6 @@ static int __smmu_client_set_hwgrp(struct smmu_client *c,
c->hwgrp = map;
return 0;
-err_hw_busy:
- for_each_set_bit(i, &map, HWGRP_COUNT) {
- offs = HWGRP_ASID_REG(i);
- val = smmu_read(smmu, offs);
- val &= ~mask;
- smmu_write(smmu, val, offs);
- }
- return -EBUSY;
}
static int smmu_client_set_hwgrp(struct smmu_client *c, u32 map, int on)