summaryrefslogtreecommitdiffstats
path: root/drivers/iommu/tegra-smmu.c
diff options
context:
space:
mode:
authorHiroshi Doyu <hdoyu@nvidia.com>2013-02-06 19:38:15 +0200
committerJoerg Roedel <joro@8bytes.org>2013-02-07 21:57:21 +0100
commita3b7256d643dac125f4162cd4f9b603868559b61 (patch)
tree55142b79cb946c3ecfd5d4e2dc34ca6c97cc127a /drivers/iommu/tegra-smmu.c
parentd300356cb92e098f36bece0390358130e35713d4 (diff)
downloadop-kernel-dev-a3b7256d643dac125f4162cd4f9b603868559b61.zip
op-kernel-dev-a3b7256d643dac125f4162cd4f9b603868559b61.tar.gz
iommu/tegra: smmu: Fix incorrect mask for regbase
This fixes kernel crash because of BUG() in register address validation. Signed-off-by: Hiroshi Doyu <hdoyu@nvidia.com> Signed-off-by: Joerg Roedel <joro@8bytes.org>
Diffstat (limited to 'drivers/iommu/tegra-smmu.c')
-rw-r--r--drivers/iommu/tegra-smmu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iommu/tegra-smmu.c b/drivers/iommu/tegra-smmu.c
index 7747283..117427e 100644
--- a/drivers/iommu/tegra-smmu.c
+++ b/drivers/iommu/tegra-smmu.c
@@ -1191,7 +1191,7 @@ static int tegra_smmu_probe(struct platform_device *pdev)
smmu->rege[i] = smmu->regs[i] + resource_size(res) - 1;
}
/* Same as "mc" 1st regiter block start address */
- smmu->regbase = (void __iomem *)((u32)smmu->regs[0] & ~PAGE_MASK);
+ smmu->regbase = (void __iomem *)((u32)smmu->regs[0] & PAGE_MASK);
err = of_get_dma_window(dev->of_node, NULL, 0, NULL, &base, &size);
if (err)
OpenPOWER on IntegriCloud