Skip to contentSkip to conversation

iommu/tegra: smmu: Fix incorrect mask for regbase

PATCH Applied Hiroshi Doyu 3 participants 3 messages Feb 6, 2013 – Feb 7, 2013 1 message not in the archive

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iommu/tegra: smmu: Fix incorrect mask for regbase

This fixes kernel crash because of BUG() in register address validation.

---
Verified with Tegra 114 based Dalmore board

---
 drivers/iommu/tegra-smmu.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iommu/tegra-smmu.c +1 -1
index 4d11069..05a8ddb 100644
@@ -1192,7 +1192,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)
Signature · 1 line
1.7.9.5

A message that is not in the archive (sent off-list or not yet received): 1360172295-21500-1-git-send-email-hdoyu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org