summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiguel Vadillo <vadillo@ti.com>2010-10-22 15:04:52 -0500
committerHari Kanigeri <h-kanigeri2@ti.com>2010-11-01 15:17:16 -0600
commitb4bba02195eb63861da3387d86c51a01e22f49a4 (patch)
tree133bb3162a0202147225b54efb237d353ff6ccd5
parentb70ec89757eebf4c6b2f146dd86c8a58df3d68a3 (diff)
omap:iommu: restore just the prsvd tlb entries
Previously, when restoring the iommu context, all the TLB entries marked valid were being reloaded. Reading dynamically loaded TLBs back from the MMU registers during a context save operation returned addresses that were not aligned to the boundaries of the page sizes indicated in the respective fields. Attempting to restore these unaligned entries in the MMU resulted in warnings from the restore routines. Since only the locked TLB entries need to be loaded before restarting the processor, we are now restoring only those. (All the locked entries were marked as protected/preserved when they were initially loaded.) We are still investigating the root cause of why the alignment appears wrong in the TLB entries loaded as a result of a TLB miss by the table walking logic. Signed-off-by: Miguel Vadillo <vadillo@ti.com>
-rw-r--r--arch/arm/plat-omap/iommu.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/arch/arm/plat-omap/iommu.c b/arch/arm/plat-omap/iommu.c
index d728af8aec6b..abc177d75072 100644
--- a/arch/arm/plat-omap/iommu.c
+++ b/arch/arm/plat-omap/iommu.c
@@ -400,10 +400,10 @@ u32 iommu_save_tlb_entries(struct iommu *obj)
for_each_iotlb_cr(obj, obj->nr_tlb_entries, i, cr_tmp) {
iotlb_cr_to_e(&cr_tmp, e);
+ dev_dbg(obj->dev, "%s: %08x %08x %d %d %d", __func__, e->da,
+ e->pa, e->pgsz, e->prsvd,
+ e->valid);
e++;
-
- dev_dbg(obj->dev, "%s: [%02x] %08x %08x\n", __func__,
- i, cr_tmp.cam, cr_tmp.ram);
}
return 0;
@@ -429,17 +429,17 @@ u32 iommu_restore_tlb_entries(struct iommu *obj)
goto error;
for (i = 0; i < obj->nr_tlb_entries; i++) {
- if (!e->valid) {
+ if (!e->prsvd) {
e++;
continue;
}
+ dev_dbg(obj->dev, "%s: %08x %08x %d %d %d", __func__, e->da,
+ e->pa, e->pgsz, e->prsvd,
+ e->valid);
status = load_iotlb_entry(obj, e);
if (status)
goto error;
e++;
-
- dev_dbg(obj->dev, "%s: [%02x] %08x\n", __func__,
- i, e->pa);
}
return 0;