diff options
author | Hiroshi Doyu <hdoyu@nvidia.com> | 2013-02-06 12:38:15 -0500 |
---|---|---|
committer | Joerg Roedel <joro@8bytes.org> | 2013-02-07 15:57:21 -0500 |
commit | a3b7256d643dac125f4162cd4f9b603868559b61 (patch) | |
tree | 55142b79cb946c3ecfd5d4e2dc34ca6c97cc127a /drivers/iommu/tegra-smmu.c | |
parent | d300356cb92e098f36bece0390358130e35713d4 (diff) |
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.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iommu/tegra-smmu.c b/drivers/iommu/tegra-smmu.c index 774728313f51..117427e6004e 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) | |||
1191 | smmu->rege[i] = smmu->regs[i] + resource_size(res) - 1; | 1191 | smmu->rege[i] = smmu->regs[i] + resource_size(res) - 1; |
1192 | } | 1192 | } |
1193 | /* Same as "mc" 1st regiter block start address */ | 1193 | /* Same as "mc" 1st regiter block start address */ |
1194 | smmu->regbase = (void __iomem *)((u32)smmu->regs[0] & ~PAGE_MASK); | 1194 | smmu->regbase = (void __iomem *)((u32)smmu->regs[0] & PAGE_MASK); |
1195 | 1195 | ||
1196 | err = of_get_dma_window(dev->of_node, NULL, 0, NULL, &base, &size); | 1196 | err = of_get_dma_window(dev->of_node, NULL, 0, NULL, &base, &size); |
1197 | if (err) | 1197 | if (err) |