[PATCH FOR 2.6.39] omap: iommu: Return IRQ_HANDLED in fault handler when no fault occured

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The iommu shares an interrupt line with the OMAP3 ISP. The iommu
interrupt handler must check the fault status and return IRQ_HANDLED
when no fault occured.

Signed-off-by: Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx>
---
 arch/arm/plat-omap/iommu.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

The OMAP3 ISP IOMMU got broken in 2.6.39-rc1 by

commit d594f1f31afe13edd8c02f3854a65cc58cfb3b74
Author: David Cohen <dacohen@xxxxxxxxx>
Date:   Wed Feb 16 19:35:51 2011 +0000

    omap: IOMMU: add support to callback during fault handling
    
    Add support to register an isr for IOMMU fault situations and adapt it
    to allow such (*isr)() to be used as fault callback. Drivers using IOMMU
    module might want to be informed when errors happen in order to debug it
    or react.
    
    Signed-off-by: David Cohen <dacohen@xxxxxxxxx>
    Acked-by: Hiroshi DOYU <Hiroshi.DOYU@xxxxxxxxx>
    Signed-off-by: Tony Lindgren <tony@xxxxxxxxxxx>

This patch fixes it and should be pushed to mainline in 2.6.39. The OMAP3 ISP
driver, new in 2.6.39, would otherwise be totally broken until 2.6.40.

diff --git a/arch/arm/plat-omap/iommu.c b/arch/arm/plat-omap/iommu.c
index 8a51fd5..34fc31e 100644
--- a/arch/arm/plat-omap/iommu.c
+++ b/arch/arm/plat-omap/iommu.c
@@ -793,6 +793,8 @@ static irqreturn_t iommu_fault_handler(int irq, void *data)
 	clk_enable(obj->clk);
 	errs = iommu_report_fault(obj, &da);
 	clk_disable(obj->clk);
+	if (errs == 0)
+		return IRQ_HANDLED;
 
 	/* Fault callback or TLB/PTE Dynamic loading */
 	if (obj->isr && !obj->isr(obj, da, errs, obj->isr_priv))
-- 
Regards,

Laurent Pinchart

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux