Skip to content

Commit

Permalink
iommu/tegra: smmu: Fix incorrect mask for regbase
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Hiroshi Doyu authored and Joerg Roedel committed Feb 7, 2013
1 parent d300356 commit a3b7256
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/iommu/tegra-smmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit a3b7256

Please sign in to comment.