* IOMMU DMA-mapping API for arm64 ?
@ 2014-02-06 5:05 Ritesh Harjani
[not found] ` <CAD15agaA9c1+0svk_d97ZEcaOg6x_PGcbKVHM9dWAZ_t1T8FXw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-02-06 10:07 ` Will Deacon
0 siblings, 2 replies; 5+ messages in thread
From: Ritesh Harjani @ 2014-02-06 5:05 UTC (permalink / raw)
To: Catalin Marinas, Will Deacon, Arnd Bergmann,
hdoyu-DDmLM1+adcrQT0dZR+AlfA, m.szyprowski-Sze3O3UU22JBDgjK7y7TUQ,
Ritesh Harjani
Cc: linaro-mm-sig-cunTk1MwBs8s++Sfvej+rw,
iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
[-- Attachment #1.1: Type: text/plain, Size: 1434 bytes --]
Hi everyone,
I tried looking for IOMMU support in ARM64 but what I was able to see is
only swiotlb is currently supported.
Based on my understanding for IOMMU support, we need DMA-MAPPING API to
have IOMMU ops field, similar to what is present in arm32.
I could see the iommu field added in dev_archdata in below mentioned patch
(arch/arm64/include/asm/device.h), but there is no ops field in
arch/arm64/mm/dma-mapping.c ?
I also saw one mail discussion between you guys on what is the best place
for adding iommu support in ARM64, but couldn't see any followed up patches
for the same.
Please tell us the current status/updates on the same. Your feedback will
be greatly appreciated.
commit 73150c983ac1f9b7653cfd3823b1ad4a44aad3bf
Author: Will Deacon <will.deacon-5wv7dgnIgG8@public.gmane.org>
Date: Mon Jun 10 19:34:42 2013 +0100
arm64: device: add iommu pointer to device archdata
When using an IOMMU for device mappings, it is necessary to keep a
pointer between the device and the IOMMU to which it is attached in
order to obtain the correct IOMMU when attaching the device to a domain.
This patch adds an iommu pointer to the dev_archdata structure, in a
similar manner to other architectures (ARM, PowerPC, x86, ...).
Signed-off-by: Will Deacon <will.deacon-5wv7dgnIgG8@public.gmane.org>
Signed-off-by: Catalin Marinas <catalin.marinas-5wv7dgnIgG8@public.gmane.org>
Thanks
Ritesh
[-- Attachment #1.2: Type: text/html, Size: 1932 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Fwd: IOMMU DMA-mapping API for arm64 ?
[not found] ` <CAD15agaA9c1+0svk_d97ZEcaOg6x_PGcbKVHM9dWAZ_t1T8FXw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2014-02-06 5:21 ` Ritesh Harjani
[not found] ` <CAD15agbDSH4dQ8aDsW7hXZE_6Bfmpc1WrqhH2Bx0Fuy-eQUfbQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
0 siblings, 1 reply; 5+ messages in thread
From: Ritesh Harjani @ 2014-02-06 5:21 UTC (permalink / raw)
To: Catalin Marinas, Will Deacon, Arnd Bergmann,
hdoyu-DDmLM1+adcrQT0dZR+AlfA, m.szyprowski-Sze3O3UU22JBDgjK7y7TUQ,
Ritesh Harjani
Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org
[-- Attachment #1.1: Type: text/plain, Size: 1487 bytes --]
"Sorry if this mail has come twice in your mailbox"
Hi everyone,
I tried looking for IOMMU support in ARM64 but what I was able to see is
only swiotlb is currently supported.
Based on my understanding for IOMMU support, we need DMA-MAPPING API to
have IOMMU ops field, similar to what is present in arm32.
I could see the iommu field added in dev_archdata in below mentioned patch
(arch/arm64/include/asm/device.h), but there is no ops field in
arch/arm64/mm/dma-mapping.c ?
I also saw one mail discussion between you guys on what is the best place
for adding iommu support in ARM64, but couldn't see any followed up patches
for the same.
Please tell us the current status/updates on the same. Your feedback will
be greatly appreciated.
commit 73150c983ac1f9b7653cfd3823b1ad4a44aad3bf
Author: Will Deacon <will.deacon-5wv7dgnIgG8@public.gmane.org>
Date: Mon Jun 10 19:34:42 2013 +0100
arm64: device: add iommu pointer to device archdata
When using an IOMMU for device mappings, it is necessary to keep a
pointer between the device and the IOMMU to which it is attached in
order to obtain the correct IOMMU when attaching the device to a domain.
This patch adds an iommu pointer to the dev_archdata structure, in a
similar manner to other architectures (ARM, PowerPC, x86, ...).
Signed-off-by: Will Deacon <will.deacon-5wv7dgnIgG8@public.gmane.org>
Signed-off-by: Catalin Marinas <catalin.marinas-5wv7dgnIgG8@public.gmane.org>
Thanks
Ritesh
[-- Attachment #1.2: Type: text/html, Size: 2164 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: IOMMU DMA-mapping API for arm64 ?
2014-02-06 5:05 IOMMU DMA-mapping API for arm64 ? Ritesh Harjani
[not found] ` <CAD15agaA9c1+0svk_d97ZEcaOg6x_PGcbKVHM9dWAZ_t1T8FXw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2014-02-06 10:07 ` Will Deacon
1 sibling, 0 replies; 5+ messages in thread
From: Will Deacon @ 2014-02-06 10:07 UTC (permalink / raw)
To: Ritesh Harjani
Cc: Arnd Bergmann, Catalin Marinas, linaro-mm-sig@lists.linaro.org,
iommu@lists.linux-foundation.org, hdoyu@nvidia.com,
linux-arm-kernel@lists.infradead.org, m.szyprowski@samsung.com
On Thu, Feb 06, 2014 at 05:05:45AM +0000, Ritesh Harjani wrote:
> Hi everyone,
>
> I tried looking for IOMMU support in ARM64 but what I was able to see is
> only swiotlb is currently supported.
>
> Based on my understanding for IOMMU support, we need DMA-MAPPING API to
> have IOMMU ops field, similar to what is present in arm32. I could see
> the iommu field added in dev_archdata in below mentioned patch
> (arch/arm64/include/asm/device.h), but there is no ops field in
> arch/arm64/mm/dma-mapping.c ?
Correct, there needs to be a way to plumb dma-mapping into the IOMMU layer.
> I also saw one mail discussion between you guys on what is the best place
> for adding iommu support in ARM64, but couldn't see any followed up
> patches for the same.
>
> Please tell us the current status/updates on the same. Your feedback will
> be greatly appreciated.
There are a few related topics here:
(1) Moving a bunch of the boilerplate IOMMU code into a common place
(iommu-helper.c or similar). This is because we don't want to blindly
duplicate common code across architectures.
(2) Standardising at least part of a system topology description in
device-tree, so that we can deal with different combinations of
{coherent,nocoherent} device {with,without} a series of IOMMUs.
Once both of those are sorted, the actual plumbing should be fairly
straightforward.
Will
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Fwd: IOMMU DMA-mapping API for arm64 ?
[not found] ` <CAD15agbDSH4dQ8aDsW7hXZE_6Bfmpc1WrqhH2Bx0Fuy-eQUfbQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2014-02-06 10:13 ` Catalin Marinas
[not found] ` <20140206101345.GC28555-5wv7dgnIgG8@public.gmane.org>
0 siblings, 1 reply; 5+ messages in thread
From: Catalin Marinas @ 2014-02-06 10:13 UTC (permalink / raw)
To: Ritesh Harjani
Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
Will Deacon, Arnd Bergmann
On Thu, Feb 06, 2014 at 05:21:53AM +0000, Ritesh Harjani wrote:
> I also saw one mail discussion between you guys on what is the best place for
> adding iommu support in ARM64, but couldn't see any followed up patches for the
> same.
The decision was to make take the iommu code from arch/arm and turn it
into a library similar to swiotlb which can be used by the arch code. It
is on our to-do list but no ETA yet. If you volunteer to help it would
be great ;)
--
Catalin
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Fwd: IOMMU DMA-mapping API for arm64 ?
[not found] ` <20140206101345.GC28555-5wv7dgnIgG8@public.gmane.org>
@ 2014-02-06 11:59 ` Ritesh Harjani
0 siblings, 0 replies; 5+ messages in thread
From: Ritesh Harjani @ 2014-02-06 11:59 UTC (permalink / raw)
To: Catalin Marinas
Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
Will Deacon, Arnd Bergmann
On Thu, Feb 6, 2014 at 3:43 PM, Catalin Marinas <catalin.marinas-5wv7dgnIgG8@public.gmane.org> wrote:
> On Thu, Feb 06, 2014 at 05:21:53AM +0000, Ritesh Harjani wrote:
>> I also saw one mail discussion between you guys on what is the best place for
>> adding iommu support in ARM64, but couldn't see any followed up patches for the
>> same.
>
> The decision was to make take the iommu code from arch/arm and turn it
> into a library similar to swiotlb which can be used by the arch code. It
> is on our to-do list but no ETA yet. If you volunteer to help it would
> be great ;)
Sure Catalin, will take out the common code from arch/arm and put into
lib/iommu-helper which is the best place as discussed in many mail
chains.
Let me see how far I can go. Will keep you posted.
>
> --
> Catalin
Thanks
Ritesh
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-02-06 11:59 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-06 5:05 IOMMU DMA-mapping API for arm64 ? Ritesh Harjani
[not found] ` <CAD15agaA9c1+0svk_d97ZEcaOg6x_PGcbKVHM9dWAZ_t1T8FXw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-02-06 5:21 ` Fwd: " Ritesh Harjani
[not found] ` <CAD15agbDSH4dQ8aDsW7hXZE_6Bfmpc1WrqhH2Bx0Fuy-eQUfbQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-02-06 10:13 ` Catalin Marinas
[not found] ` <20140206101345.GC28555-5wv7dgnIgG8@public.gmane.org>
2014-02-06 11:59 ` Ritesh Harjani
2014-02-06 10:07 ` Will Deacon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).