[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <59257DB0.8010604@nxp.com>
Date: Wed, 24 May 2017 12:33:53 +0000
From: Laurentiu Tudor <laurentiu.tudor@....com>
To: Ruxandra Ioana Radulescu <ruxandra.radulescu@....com>,
"gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>
CC: "devel@...verdev.osuosl.org" <devel@...verdev.osuosl.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"agraf@...e.de" <agraf@...e.de>, "arnd@...db.de" <arnd@...db.de>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
"iommu@...ts.linux-foundation.org" <iommu@...ts.linux-foundation.org>,
Bogdan Purcareata <bogdan.purcareata@....com>,
"stuyoder@...il.com" <stuyoder@...il.com>,
"Nipun Gupta" <nipun.gupta@....com>
Subject: Re: [PATCH 1/2] staging: fsl-dpaa2/eth: Fix address translations
Hi Ioana,
Debatable nit inline.
On 05/24/2017 03:13 PM, Ioana Radulescu wrote:
> Use the correct mechanisms for translating a DMA-mapped IOVA
> address into a virtual one. Without this fix, once SMMU is
> enabled on Layerscape platforms, the Ethernet driver throws
> IOMMU translation faults.
>
> Signed-off-by: Nipun Gupta <nipun.gupta@....com>
> Signed-off-by: Ioana Radulescu <ruxandra.radulescu@....com>
> ---
> drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c | 25 +++++++++++++++++++------
> drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h | 1 +
> 2 files changed, 20 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c
> index 6f9eed66c64d..3fee0d6f17e0 100644
> --- a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c
> +++ b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c
> @@ -37,6 +37,7 @@
> #include <linux/interrupt.h>
> #include <linux/msi.h>
> #include <linux/kthread.h>
> +#include <linux/iommu.h>
>
> #include "../../fsl-mc/include/mc.h"
> #include "../../fsl-mc/include/mc-sys.h"
> @@ -54,6 +55,16 @@ MODULE_DESCRIPTION("Freescale DPAA2 Ethernet Driver");
>
> const char dpaa2_eth_drv_version[] = "0.1";
>
> +static void *dpaa2_iova_to_virt(struct iommu_domain *domain,
if you pass a "struct dpaa2_eth_priv *priv" instead of "iommu_domain"
you can move the priv->iommu_domain reference in the function and
slightly simplify the call sites.
---
Best Regards, Laurentiu
Powered by blists - more mailing lists