From: Joerg Roedel <joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>
To: Hideki EIRAKU <hdk-AlSX/UN32fvPDbFq/vQRIQ@public.gmane.org>
Cc: Katsuya MATSUBARA <matsu-AlSX/UN32fvPDbFq/vQRIQ@public.gmane.org>,
Russell King <linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org>,
Simon Horman <horms-/R6kz+dDXgpPR4JQBCEnsQ@public.gmane.org>,
linux-sh-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Magnus Damm <magnus.damm-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
Paul Mundt <lethal-M7jkjyW5wf5g9hUCZPvPmw@public.gmane.org>,
Laurent Pinchart
<laurent.pinchart-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org>,
Damian Hobson-Garcia
<dhobsong-AlSX/UN32fvPDbFq/vQRIQ@public.gmane.org>,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Subject: Re: [PATCH v6 1/4] iommu/shmobile: Add iommu driver for Renesas IPMMU modules
Date: Fri, 1 Feb 2013 14:54:57 +0100 [thread overview]
Message-ID: <20130201135456.GG25591@8bytes.org> (raw)
In-Reply-To: <1358765669-14567-2-git-send-email-hdk-AlSX/UN32fvPDbFq/vQRIQ@public.gmane.org>
On Mon, Jan 21, 2013 at 07:54:26PM +0900, Hideki EIRAKU wrote:
> This is the Renesas IPMMU driver and IOMMU API implementation.
>
> The IPMMU module supports the MMU function and the PMB function. The
> MMU function provides address translation by pagetable compatible with
> ARMv6. The PMB function provides address translation including
> tile-linear translation. This patch implements the MMU function.
>
> The iommu driver does not register a platform driver directly because:
> - the register space of the MMU function and the PMB function
> have a common register (used for settings flush), so they should ideally
> have a way to appropriately share this register.
> - the MMU function uses the IOMMU API while the PMB function does not.
> - the two functions may be used independently.
>
> Signed-off-by: Hideki EIRAKU <hdk-AlSX/UN32fvPDbFq/vQRIQ@public.gmane.org>
The patch looks good in general. Just one question inline.
> +static int pgtable_alloc(struct shmobile_iommu_domain_pgtable *pgtable,
> + struct kmem_cache *cache, size_t size)
> +{
> + pgtable->pgtable = kmem_cache_zalloc(cache, GFP_ATOMIC);
> + if (!pgtable->pgtable)
> + return -ENOMEM;
> + pgtable->handle = dma_map_single(NULL, pgtable->pgtable, size,
> + DMA_TO_DEVICE);
> + return 0;
> +}
Why is it necessary to call dma_map_single() for IOMMU page-tables?
usually the dma_* functions call into IOMMU drivers, so why are they
used inside an IOMMU driver?
Regards,
Joerg
WARNING: multiple messages have this Message-ID (diff)
From: Joerg Roedel <joro@8bytes.org>
To: linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v6 1/4] iommu/shmobile: Add iommu driver for Renesas IPMMU modules
Date: Fri, 01 Feb 2013 13:54:57 +0000 [thread overview]
Message-ID: <20130201135456.GG25591@8bytes.org> (raw)
In-Reply-To: <1358765669-14567-2-git-send-email-hdk@igel.co.jp>
On Mon, Jan 21, 2013 at 07:54:26PM +0900, Hideki EIRAKU wrote:
> This is the Renesas IPMMU driver and IOMMU API implementation.
>
> The IPMMU module supports the MMU function and the PMB function. The
> MMU function provides address translation by pagetable compatible with
> ARMv6. The PMB function provides address translation including
> tile-linear translation. This patch implements the MMU function.
>
> The iommu driver does not register a platform driver directly because:
> - the register space of the MMU function and the PMB function
> have a common register (used for settings flush), so they should ideally
> have a way to appropriately share this register.
> - the MMU function uses the IOMMU API while the PMB function does not.
> - the two functions may be used independently.
>
> Signed-off-by: Hideki EIRAKU <hdk@igel.co.jp>
The patch looks good in general. Just one question inline.
> +static int pgtable_alloc(struct shmobile_iommu_domain_pgtable *pgtable,
> + struct kmem_cache *cache, size_t size)
> +{
> + pgtable->pgtable = kmem_cache_zalloc(cache, GFP_ATOMIC);
> + if (!pgtable->pgtable)
> + return -ENOMEM;
> + pgtable->handle = dma_map_single(NULL, pgtable->pgtable, size,
> + DMA_TO_DEVICE);
> + return 0;
> +}
Why is it necessary to call dma_map_single() for IOMMU page-tables?
usually the dma_* functions call into IOMMU drivers, so why are they
used inside an IOMMU driver?
Regards,
Joerg
WARNING: multiple messages have this Message-ID (diff)
From: joro@8bytes.org (Joerg Roedel)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v6 1/4] iommu/shmobile: Add iommu driver for Renesas IPMMU modules
Date: Fri, 1 Feb 2013 14:54:57 +0100 [thread overview]
Message-ID: <20130201135456.GG25591@8bytes.org> (raw)
In-Reply-To: <1358765669-14567-2-git-send-email-hdk@igel.co.jp>
On Mon, Jan 21, 2013 at 07:54:26PM +0900, Hideki EIRAKU wrote:
> This is the Renesas IPMMU driver and IOMMU API implementation.
>
> The IPMMU module supports the MMU function and the PMB function. The
> MMU function provides address translation by pagetable compatible with
> ARMv6. The PMB function provides address translation including
> tile-linear translation. This patch implements the MMU function.
>
> The iommu driver does not register a platform driver directly because:
> - the register space of the MMU function and the PMB function
> have a common register (used for settings flush), so they should ideally
> have a way to appropriately share this register.
> - the MMU function uses the IOMMU API while the PMB function does not.
> - the two functions may be used independently.
>
> Signed-off-by: Hideki EIRAKU <hdk@igel.co.jp>
The patch looks good in general. Just one question inline.
> +static int pgtable_alloc(struct shmobile_iommu_domain_pgtable *pgtable,
> + struct kmem_cache *cache, size_t size)
> +{
> + pgtable->pgtable = kmem_cache_zalloc(cache, GFP_ATOMIC);
> + if (!pgtable->pgtable)
> + return -ENOMEM;
> + pgtable->handle = dma_map_single(NULL, pgtable->pgtable, size,
> + DMA_TO_DEVICE);
> + return 0;
> +}
Why is it necessary to call dma_map_single() for IOMMU page-tables?
usually the dma_* functions call into IOMMU drivers, so why are they
used inside an IOMMU driver?
Regards,
Joerg
WARNING: multiple messages have this Message-ID (diff)
From: Joerg Roedel <joro@8bytes.org>
To: Hideki EIRAKU <hdk@igel.co.jp>
Cc: Paul Mundt <lethal@linux-sh.org>,
Magnus Damm <magnus.damm@gmail.com>,
Russell King <linux@arm.linux.org.uk>,
Simon Horman <horms@verge.net.au>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Katsuya MATSUBARA <matsu@igel.co.jp>,
linux-sh@vger.kernel.org, linux-kernel@vger.kernel.org,
iommu@lists.linux-foundation.org,
Damian Hobson-Garcia <dhobsong@igel.co.jp>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v6 1/4] iommu/shmobile: Add iommu driver for Renesas IPMMU modules
Date: Fri, 1 Feb 2013 14:54:57 +0100 [thread overview]
Message-ID: <20130201135456.GG25591@8bytes.org> (raw)
In-Reply-To: <1358765669-14567-2-git-send-email-hdk@igel.co.jp>
On Mon, Jan 21, 2013 at 07:54:26PM +0900, Hideki EIRAKU wrote:
> This is the Renesas IPMMU driver and IOMMU API implementation.
>
> The IPMMU module supports the MMU function and the PMB function. The
> MMU function provides address translation by pagetable compatible with
> ARMv6. The PMB function provides address translation including
> tile-linear translation. This patch implements the MMU function.
>
> The iommu driver does not register a platform driver directly because:
> - the register space of the MMU function and the PMB function
> have a common register (used for settings flush), so they should ideally
> have a way to appropriately share this register.
> - the MMU function uses the IOMMU API while the PMB function does not.
> - the two functions may be used independently.
>
> Signed-off-by: Hideki EIRAKU <hdk@igel.co.jp>
The patch looks good in general. Just one question inline.
> +static int pgtable_alloc(struct shmobile_iommu_domain_pgtable *pgtable,
> + struct kmem_cache *cache, size_t size)
> +{
> + pgtable->pgtable = kmem_cache_zalloc(cache, GFP_ATOMIC);
> + if (!pgtable->pgtable)
> + return -ENOMEM;
> + pgtable->handle = dma_map_single(NULL, pgtable->pgtable, size,
> + DMA_TO_DEVICE);
> + return 0;
> +}
Why is it necessary to call dma_map_single() for IOMMU page-tables?
usually the dma_* functions call into IOMMU drivers, so why are they
used inside an IOMMU driver?
Regards,
Joerg
next prev parent reply other threads:[~2013-02-01 13:54 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-21 10:54 [PATCH v6 0/4] Renesas IPMMU driver for sh7372, sh73a0 and r8a7740 Hideki EIRAKU
2013-01-21 10:54 ` Hideki EIRAKU
2013-01-21 10:54 ` Hideki EIRAKU
2013-01-21 10:54 ` [PATCH v6 1/4] iommu/shmobile: Add iommu driver for Renesas IPMMU modules Hideki EIRAKU
2013-01-21 10:54 ` Hideki EIRAKU
2013-01-21 10:54 ` Hideki EIRAKU
[not found] ` <1358765669-14567-2-git-send-email-hdk-AlSX/UN32fvPDbFq/vQRIQ@public.gmane.org>
2013-02-01 13:54 ` Joerg Roedel [this message]
2013-02-01 13:54 ` Joerg Roedel
2013-02-01 13:54 ` Joerg Roedel
2013-02-01 13:54 ` Joerg Roedel
2013-02-05 10:42 ` Hideki EIRAKU
2013-02-05 10:42 ` Hideki EIRAKU
2013-02-05 10:42 ` Hideki EIRAKU
2013-02-06 10:23 ` Joerg Roedel
2013-02-06 10:23 ` Joerg Roedel
2013-02-06 10:23 ` Joerg Roedel
2013-01-21 10:54 ` [PATCH v6 2/4] ARM: mach-shmobile: sh7372: Add IPMMU device Hideki EIRAKU
2013-01-21 10:54 ` Hideki EIRAKU
2013-01-21 10:54 ` Hideki EIRAKU
2013-01-21 10:54 ` [PATCH v6 3/4] ARM: mach-shmobile: sh73a0: " Hideki EIRAKU
2013-01-21 10:54 ` Hideki EIRAKU
2013-01-21 10:54 ` Hideki EIRAKU
2013-01-21 10:54 ` [PATCH v6 4/4] ARM: mach-shmobile: r8a7740: " Hideki EIRAKU
2013-01-21 10:54 ` Hideki EIRAKU
2013-01-21 10:54 ` Hideki EIRAKU
[not found] ` <1358765669-14567-1-git-send-email-hdk-AlSX/UN32fvPDbFq/vQRIQ@public.gmane.org>
2013-02-01 13:56 ` [PATCH v6 0/4] Renesas IPMMU driver for sh7372, sh73a0 and r8a7740 Joerg Roedel
2013-02-01 13:56 ` Joerg Roedel
2013-02-01 13:56 ` Joerg Roedel
2013-02-01 13:56 ` Joerg Roedel
2013-02-01 14:09 ` Paul Mundt
2013-02-01 14:09 ` Paul Mundt
2013-02-01 14:09 ` Paul Mundt
2013-02-06 0:38 ` Simon Horman
2013-02-06 0:38 ` Simon Horman
2013-02-06 0:38 ` Simon Horman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130201135456.GG25591@8bytes.org \
--to=joro-zlv9swrftaidnm+yrofe0a@public.gmane.org \
--cc=dhobsong-AlSX/UN32fvPDbFq/vQRIQ@public.gmane.org \
--cc=hdk-AlSX/UN32fvPDbFq/vQRIQ@public.gmane.org \
--cc=horms-/R6kz+dDXgpPR4JQBCEnsQ@public.gmane.org \
--cc=iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
--cc=laurent.pinchart-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org \
--cc=lethal-M7jkjyW5wf5g9hUCZPvPmw@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org \
--cc=linux-sh-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=magnus.damm-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=matsu-AlSX/UN32fvPDbFq/vQRIQ@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.