mirror of
https://github.com/rd-stuffs/msm-4.14.git
synced 2025-02-20 11:45:48 +08:00
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>
This commit is contained in:
parent
d300356cb9
commit
a3b7256d64
@ -1191,7 +1191,7 @@ static int tegra_smmu_probe(struct platform_device *pdev)
|
|||||||
smmu->rege[i] = smmu->regs[i] + resource_size(res) - 1;
|
smmu->rege[i] = smmu->regs[i] + resource_size(res) - 1;
|
||||||
}
|
}
|
||||||
/* Same as "mc" 1st regiter block start address */
|
/* 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);
|
err = of_get_dma_window(dev->of_node, NULL, 0, NULL, &base, &size);
|
||||||
if (err)
|
if (err)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user