All of lore.kernel.org
 help / color / mirror / Atom feed
From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] Add support for CONFIG_ARM64_DMA_USE_IOMMU.
Date: Sun, 22 Mar 2015 02:31:40 +0100	[thread overview]
Message-ID: <201503220231.40375.arnd@arndb.de> (raw)
In-Reply-To: <CAOHikRCSYy6Zd=Oi34-KnyhG=bY8-XdD_QpdndbC_dCox8sJEQ@mail.gmail.com>

On Wednesday 18 March 2015, Suman Tripathi wrote:
> I guess there is an overlap with this thread:
> 
> http://thread.gmane.org/gmane.linux.kernel.iommu/8213
> 
> I would rather go for a more generic solution that Robin (cc'ed) is
> trying to implement.
> 
> I followed the above thread but our requirement deviates from normal
> IOMMU conventions.
> For our case we need a 1:1 mapping of PA to IOVA. Actually our's is
> not a real IOMMU (ie not having a cap of page table walk). It's a
> simple 32-bit from (device side ) ot 64-bit (cpu side) address
> translation with the help of a set of window registers. So we want to
> bypass the entire iova .
> 
> Any suggestions on this ?

My first suggestion would be to separate this from IOMMU support completely
as you don't really have an IOMMU. The easiest way to deal with hardware
like this is to use swiotlb with a fixed mapping. This is also the only
way to deal with any devices that may have multiple outstanding DMAs
(PCI, SATA, USB, ...). 

If you have any high-speed devices that only do a single request at a
time connected to this remapper, I would suggest you implement your own
set of dma_map_ops and come back with performance data showing whether it's
worth merging this compared to the trivial iommu support.

	Arnd

  reply	other threads:[~2015-03-22  1:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1422379495-10268-1-git-send-email-stripathi@apm.com>
2015-01-28 11:27 ` [PATCH] Add support for CONFIG_ARM64_DMA_USE_IOMMU Catalin Marinas
     [not found]   ` <CAOHikRCSoijzZ8oKEtMadEHOvLiWLO6fWkqiGEiPyb+Egb_1rw@mail.gmail.com>
2015-03-17 23:33     ` Suman Tripathi
2015-03-22  1:31       ` Arnd Bergmann [this message]
2015-03-23 15:58         ` Suman Tripathi
2015-04-10 21:53           ` Arnd Bergmann

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=201503220231.40375.arnd@arndb.de \
    --to=arnd@arndb.de \
    --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 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.