* Re: [PATCHv9 10/10] ARM: dma-mapping: add support for IOMMU mapper
[not found] ` <1334756652-30830-11-git-send-email-m.szyprowski@samsung.com>
@ 2012-05-11 2:08 ` Paul Gortmaker
[not found] ` <CAP=VYLr=NeGvppR4ONpnRh=gjCSPdKxYj1HYh_FvadAeUzcbBQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Paul Gortmaker @ 2012-05-11 2:08 UTC (permalink / raw)
To: Marek Szyprowski
Cc: linux-arm-kernel, linaro-mm-sig, linux-mm, linux-arch, iommu,
Kyungmin Park, Arnd Bergmann, Joerg Roedel,
Russell King - ARM Linux, Chunsang Jeong, Krishna Reddy,
KyongHo Cho, Andrzej Pietrasiewicz, Benjamin Herrenschmidt,
Konrad Rzeszutek Wilk, Hiroshi Doyu, Subash Patel, linux-next
On Wed, Apr 18, 2012 at 9:44 AM, Marek Szyprowski
<m.szyprowski@samsung.com> wrote:
> This patch add a complete implementation of DMA-mapping API for
> devices which have IOMMU support.
Hi Marek,
It looks like this patch breaks no-MMU builds on ARM, at least
according to git bisect. Here is a link to a linux-next failure:
http://kisskb.ellerman.id.au/kisskb/buildresult/6291233/
arch/arm/mm/dma-mapping.c:726:42: error: 'pgprot_kernel' undeclared
(first use in this function)
make[2]: *** [arch/arm/mm/dma-mapping.o] Error 1
Please have a look, thanks.
Paul.
---
>
> This implementation tries to optimize dma address space usage by remapping
> all possible physical memory chunks into a single dma address space chunk.
>
> DMA address space is managed on top of the bitmap stored in the
> dma_iommu_mapping structure stored in device->archdata. Platform setup
> code has to initialize parameters of the dma address space (base address,
> size, allocation precision order) with arm_iommu_create_mapping()
> function.
> To reduce the size of the bitmap, all allocations are aligned to the
> specified order of base 4 KiB pages.
>
> dma_alloc_* functions allocate physical memory in chunks, each with
> alloc_pages() function to avoid failing if the physical memory gets
> fragmented. In worst case the allocated buffer is composed of 4 KiB page
> chunks.
>
> dma_map_sg() function minimizes the total number of dma address space
> chunks by merging of physical memory chunks into one larger dma address
> space chunk. If requested chunk (scatter list entry) boundaries
> match physical page boundaries, most calls to dma_map_sg() requests will
> result in creating only one chunk in dma address space.
>
> dma_map_page() simply creates a mapping for the given page(s) in the dma
> address space.
>
> All dma functions also perform required cache operation like their
> counterparts from the arm linear physical memory mapping version.
>
> This patch contains code and fixes kindly provided by:
> - Krishna Reddy <vdumpa@nvidia.com>,
> - Andrzej Pietrasiewicz <andrzej.p@samsung.com>,
> - Hiroshi DOYU <hdoyu@nvidia.com>
>
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
> Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
> Tested-By: Subash Patel <subash.ramaswamy@linaro.org>
> ---
> arch/arm/Kconfig | 8 +
> arch/arm/include/asm/device.h | 3 +
> arch/arm/include/asm/dma-iommu.h | 34 ++
> arch/arm/mm/dma-mapping.c | 727
> +++++++++++++++++++++++++++++++++++++-
> arch/arm/mm/vmregion.h | 2 +-
> 5 files changed, 759 insertions(+), 15 deletions(-)
> create mode 100644 arch/arm/include/asm/dma-iommu.h
>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 2+ messages in thread
* RE: [PATCHv9 10/10] ARM: dma-mapping: add support for IOMMU mapper
[not found] ` <CAP=VYLr=NeGvppR4ONpnRh=gjCSPdKxYj1HYh_FvadAeUzcbBQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2012-05-11 7:52 ` Marek Szyprowski
0 siblings, 0 replies; 2+ messages in thread
From: Marek Szyprowski @ 2012-05-11 7:52 UTC (permalink / raw)
To: 'Paul Gortmaker'
Cc: linux-arch-u79uwXL29TY76Z2rM5mHXA,
'Russell King - ARM Linux', 'Arnd Bergmann',
'Benjamin Herrenschmidt', 'Kyungmin Park',
'Subash Patel',
linaro-mm-sig-cunTk1MwBs8s++Sfvej+rw,
linux-mm-Bw31MaZKKs3YtjvyW6yDsg,
iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
linux-next-u79uwXL29TY76Z2rM5mHXA, 'Krishna Reddy',
Andrzej Pietrasiewicz, 'KyongHo Cho',
'Chunsang Jeong',
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
Hello,
On Friday, May 11, 2012 4:09 AM Paul Gortmaker wrote:
> On Wed, Apr 18, 2012 at 9:44 AM, Marek Szyprowski
> <m.szyprowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org> wrote:
> > This patch add a complete implementation of DMA-mapping API for
> > devices which have IOMMU support.
>
> Hi Marek,
>
> It looks like this patch breaks no-MMU builds on ARM, at least
> according to git bisect. Here is a link to a linux-next failure:
>
> http://kisskb.ellerman.id.au/kisskb/buildresult/6291233/
>
> arch/arm/mm/dma-mapping.c:726:42: error: 'pgprot_kernel' undeclared
> (first use in this function)
> make[2]: *** [arch/arm/mm/dma-mapping.o] Error 1
>
> Please have a look, thanks.
Thanks for reporting this issue, I will send a fix in a minute.
Best regards
--
Marek Szyprowski
Samsung Poland R&D Center
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-05-11 7:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <1334756652-30830-1-git-send-email-m.szyprowski@samsung.com>
[not found] ` <1334756652-30830-11-git-send-email-m.szyprowski@samsung.com>
2012-05-11 2:08 ` [PATCHv9 10/10] ARM: dma-mapping: add support for IOMMU mapper Paul Gortmaker
[not found] ` <CAP=VYLr=NeGvppR4ONpnRh=gjCSPdKxYj1HYh_FvadAeUzcbBQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-05-11 7:52 ` Marek Szyprowski
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).