[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK=WgbaOwe8Q19tpZMeHdvyCj8fcV194zA-oSD20tF7j7_MvpQ@mail.gmail.com>
Date: Mon, 26 Sep 2011 12:36:23 +0300
From: Ohad Ben-Cohen <ohad@...ery.com>
To: KyongHo Cho <pullip.cho@...sung.com>
Cc: "linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
"linux-samsung-soc@...r.kernel.org"
<linux-samsung-soc@...r.kernel.org>,
"iommu@...ts.linux-foundation.org" <iommu@...ts.linux-foundation.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"joerg.roedel@....com" <joerg.roedel@....com>,
이상현 <sanghyun75.lee@...sung.com>,
김국진 <kgene.kim@...sung.com>,
김영락 <younglak1004.kim@...sung.com>
Subject: Re: [PATCH 3/4] iommu/exynos: Add iommu driver for Exynos4 Platforms
Hi,
On Mon, Sep 26, 2011 at 12:21 PM, KyongHo Cho <pullip.cho@...sung.com> wrote:
> Every fault in IOMMU (System MMU) is an error logically
> and must not happen in our multimedia device drivers
> because, our device drivers always construct page table completely
> before address translation in System MMU
> and TLB loads translation information automatically when TLB miss.
Yeah, this is pretty much the same for OMAP too.
> I am not sure if the default behavior of MMU fault in our IOMMU driver
> is also correct for other IOMMU drivers.
It seems your default behavior just prints an error message with the
details of the fault (addresses, flags, etc..). We can probably have
this unified.
In case you want to print exonys-specific info when the fault is not
handled by upper layers, we can change report_iommu_fault() to return
an error whenever a handler is not installed. This way
exynos_sysmmu_irq() can easily tell whether to proceed with the
default behavior or not, without installing a fault handler in the
driver:
diff --git a/include/linux/iommu.h b/include/linux/iommu.h
index 297893f..dc4b282 100644
--- a/include/linux/iommu.h
+++ b/include/linux/iommu.h
@@ -103,7 +103,7 @@ extern void iommu_set_fault_handler(struct iommu_domain *dom
static inline int report_iommu_fault(struct iommu_domain *domain,
struct device *dev, unsigned long iova, int flags)
{
- int ret = 0;
+ int ret = -EFAULT;
> BTW,
> I think we need more fault type than IOMMU_FAULT_READ and IOMMU_FAULT_WRITE.
> We have page fault, access fault(read, write), security fault
> and bus error (translated physical address is not available)
Initially we had a argument for the type of the fault, but dropped it
because it was not used. Feel free to add it back if you need it.
Thanks,
Ohad.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists