linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/7] ARM: Samsung: update/rewrite Samsung SYSMMU (IOMMU) driver
Date: Tue, 15 Mar 2011 08:35:15 +0000	[thread overview]
Message-ID: <20110315083515.GA3921@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <AANLkTinzBvkcB111UZd2rJ9raaXkh2TqmTw5Y+4WFd48@mail.gmail.com>

On Tue, Mar 15, 2011 at 10:45:50AM +0900, InKi Dae wrote:
> 2011/3/14 Russell King - ARM Linux <linux@arm.linux.org.uk>:
> > On Mon, Mar 14, 2011 at 09:37:51PM +0900, KyongHo Cho wrote:
> >> I have also noticed that dma_map_single/page/sg() can map physical
> >> memory into an arbitrary device address region.
> >> But it is not enough solution for various kinds of IOMMUs.
> >> As Kukjin Kim addressed, we need to support larger page size than 4KB
> >> because we can reduce TLB miss when we have larger page size.
> >>
> >> Our IOMMU(system mmu) supports all page size of ARM architecture
> >> including 16MB, 1MB, 64KB and 4KB.
> >> Since the largest size supported by buddy system of 32-bit architecture is 4MB,
> >> our system support all page sizes except 16MB.
> >> We proved that larger page size is helpful for DMA performance
> >> significantly (more than 10%, approximately).
> >> Big page size is not a problem for peripheral devices
> >> because their address space is not suffer from external fragmentation.
> >
> > 1. dma_map_single() et.al. is used for mapping *system* *RAM* for devices
> > ? using whatever is necessary. ?It must not be used for trying to setup
> > ? arbitary other mappings.
> >
> > 2. It doesn't matter where the memory for dma_map_single() et.al. comes
> > ? from provided the virtual address is a valid system RAM address or
> > ? the struct page * is a valid struct page in the memory map (iow, you
> > ? can't create this yourself.)
> 
> You mean that we cannot have arbitrary virtual address mapping for
> iommu based device?

No.  I mean exactly what I said - I'm talking about the DMA API in the
above two points.  The implication is that you can not create arbitary
mappings of non-system RAM with the DMA API.

> actually, we have memory mapping to arbitrary device virtual address
> space, not kernel virtual address space.
> 
> >
> > 3. In the case of an IOMMU, the DMA API does not limit you to only using
> > ? 4K pages to setup the IOMMU mappings. ?You can use whatever you like
> > ? provided the hardware can cope with it. ?You can coalesce several
> > ? existing entries together provided you track what you're doing and can
> > ? undo what's been done when the mapping is no longer required.
> >
> > So really there's no reason not to use 64K, 1M and 16M IOMMU entries if
> > that's the size of buffer which has been passed to the DMA API.
> >
> > _______________________________________________
> > linux-arm-kernel mailing list
> > linux-arm-kernel at lists.infradead.org
> > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
> >

  reply	other threads:[~2011-03-15  8:35 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-04  9:01 [PATCH/RFC 0/7] Samsung IOMMU videobuf2 allocator and s5p-fimc update Marek Szyprowski
2011-03-04  9:01 ` [PATCH 1/7] ARM: S5PV310: Add platform definitions for FIMC Marek Szyprowski
2011-03-12  0:27   ` Kukjin Kim
2011-03-04  9:01 ` [PATCH 2/7] ARM: S5PV310: power domains: fixes and code cleanup Marek Szyprowski
2011-03-04  9:01 ` [PATCH 3/7] ARM: Samsung: update/rewrite Samsung SYSMMU (IOMMU) driver Marek Szyprowski
2011-03-04 16:04   ` Marek Szyprowski
2011-03-10 14:52     ` Arnd Bergmann
2011-03-11  9:04       ` Marek Szyprowski
2011-03-11 11:50         ` Arnd Bergmann
2011-03-11 12:35           ` Marek Szyprowski
2011-03-11 14:07             ` Arnd Bergmann
2011-03-11 14:51               ` Marek Szyprowski
2011-03-11 15:15                 ` Arnd Bergmann
2011-03-11 15:39                   ` Marek Szyprowski
2011-03-11 16:00                     ` Arnd Bergmann
2011-03-14 12:37                       ` KyongHo Cho
2011-03-14 12:46                         ` Russell King - ARM Linux
2011-03-15  1:45                           ` InKi Dae
2011-03-15  8:35                             ` Russell King - ARM Linux [this message]
2011-03-15  9:34                               ` daeinki
2011-03-15  9:53                                 ` Russell King - ARM Linux
2011-03-14 13:32                         ` Arnd Bergmann
2011-03-04  9:01 ` [PATCH 4/7] v4l: videobuf2: add Samsung SYSMMU (IOMMU) based allocator Marek Szyprowski
2011-03-04  9:01 ` [PATCH 5/7] s5p-fimc: add pm_runtime support Marek Szyprowski
2011-03-04  9:01 ` [PATCH 6/7] s5p-fimc: Add support for vb2-s5p-iommu allocator Marek Szyprowski
2011-03-04  9:01 ` [PATCH 7/7] ARM: S5PC210: enable FIMC on Universal_C210 Marek Szyprowski
2011-03-08  7:28 ` [PATCH/RFC 0/7] Samsung IOMMU videobuf2 allocator and s5p-fimc update Kukjin Kim
2011-03-08  9:34   ` Marek Szyprowski
2011-03-08 10:05     ` InKi Dae

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=20110315083515.GA3921@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --cc=linux-arm-kernel@lists.infradead.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 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).