iommu/tegra: smmu: Fix incorrect mask for regbase
authorHiroshi Doyu <hdoyu@nvidia.com>
Wed, 6 Feb 2013 17:38:15 +0000 (19:38 +0200)
committerJoerg Roedel <joro@8bytes.org>
Thu, 7 Feb 2013 20:57:21 +0000 (21:57 +0100)
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>
drivers/iommu/tegra-smmu.c

index 774728313f517eb73b291f4147619ba0143112d4..117427e6004e5c2469b7b728756ed2fb8c5f2b76 100644 (file)
@@ -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)