summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorMiguel Vadillo <vadillo@ti.com>2011-05-31 09:24:42 +0100
committerAndy Green <andy.green@linaro.org>2011-05-31 11:06:12 +0100
commit1c9f30371eee92c15740b010baf80393488ce196 (patch)
tree736a5a95a788b8f2b3951363afff69cf0aa1251d /arch
parentf0839fde63b23031ccc7eff8a6e2051bbd42bda7 (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>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/plat-omap/iommu.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/arch/arm/plat-omap/iommu.c b/arch/arm/plat-omap/iommu.c
index 7af4a306537..b1deb228243 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;
@@ -862,12 +862,12 @@ static irqreturn_t iommu_fault_handler(int irq, void *data)
eventfd_notification(obj);
/* Dynamic loading TLB or PTE */
- err = iommu_notify_event(obj, IOMMU_FAULT, data);
+ errs = iommu_notify_event(obj, IOMMU_FAULT, data);
- if (err == NOTIFY_OK)
+ if (errs == NOTIFY_OK)
return IRQ_HANDLED;
- stat = iommu_report_fault(obj, &da);
- if (!stat)
+ errs = iommu_report_fault(obj, &da);
+ if (!errs)
return IRQ_HANDLED;
iommu_disable(obj);