aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFernando Guzman Lugo <fernando.lugo@ti.com>2017-07-28 16:49:13 -0400
committerJoerg Roedel <jroedel@suse.de>2017-08-04 05:59:29 -0400
commit159d3e35da3b6ff36b9077a8719bcac215155771 (patch)
treea9e64a28a34b8b51e56fe3e842e4c368b32ddae7
parent16f73eb02d7e1765ccab3d2018e0bd98eb93d973 (diff)
iommu/omap: Fix disabling of MMU upon a fault
The IOMMU framework lets its client users be notified on a MMU fault and allows them to either handle the interrupt by dynamic reloading of an appropriate TLB/PTE for the offending fault address or to completely restart/recovery the device and its IOMMU. The OMAP remoteproc driver performs the latter option, and does so after unwinding the previous mappings. The OMAP IOMMU fault handler however disables the MMU and cuts off the clock upon a MMU fault at present, resulting in an interconnect abort during any subsequent operation that touches the MMU registers. So, disable the IP-level fault interrupts instead of disabling the MMU, to allow continued MMU register operations as well as to avoid getting interrupted again. Signed-off-by: Fernando Guzman Lugo <fernando.lugo@ti.com> [s-anna@ti.com: add commit description] Signed-off-by: Suman Anna <s-anna@ti.com> Signed-off-by: Josue Albarran <j-albarran@ti.com> Acked-by: Suman Anna <s-anna@ti.com> Signed-off-by: Joerg Roedel <jroedel@suse.de>
-rw-r--r--drivers/iommu/omap-iommu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iommu/omap-iommu.c b/drivers/iommu/omap-iommu.c
index 641e035cf866..10c9de8de45d 100644
--- a/drivers/iommu/omap-iommu.c
+++ b/drivers/iommu/omap-iommu.c
@@ -786,7 +786,7 @@ static irqreturn_t iommu_fault_handler(int irq, void *data)
786 if (!report_iommu_fault(domain, obj->dev, da, 0)) 786 if (!report_iommu_fault(domain, obj->dev, da, 0))
787 return IRQ_HANDLED; 787 return IRQ_HANDLED;
788 788
789 iommu_disable(obj); 789 iommu_write_reg(obj, 0, MMU_IRQENABLE);
790 790
791 iopgd = iopgd_offset(obj, da); 791 iopgd = iopgd_offset(obj, da);
792 792