public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: linux-arm-kernel@lists.infradead.org,
	Denys Vlasenko <dvlasenk@redhat.com>
Cc: Konrad Rzeszutek Wilk <konrad@kernel.org>,
	Sinan Kaya <okaya@codeaurora.org>,
	linux-mips@linux-mips.org, linux-ia64@vger.kernel.org,
	Fenghua Yu <fenghua.yu@intel.com>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will.deacon@arm.com>,
	Max Filippov <jcmvbkbc@gmail.com>,
	Chris Metcalf <cmetcalf@ezchip.com>,
	Paul Mackerras <paulus@samba.org>,
	"H. Peter Anvin" <hpa@zytor.com>, Huacai Chen <chenhc@lemote.com>,
	Guan Xuetao <gxt@mprc.pku.edu.cn>,
	Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	Jisheng Zhang <jszhang@marvell.com>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Russell King <linux@arm.linux.org.uk>,
	Aaro Koskinen <aaro.koskinen@iki.fi>,
	Michael Ellerman <mpe@ellerman.id.au>,
	timur@codeaurora.org, X86 <x86@kernel.org>,
	Ingo Molnar <mingo@redhat.com>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Guenter Roeck <linux@roeck-us.net>,
	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
	Akinobu Mita <akinobu.mita@gmail.com>,
	cov@codeaurora.org, Bjorn Helgaas <bhelgaas@google.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Valentin Rothberg <valentinrothberg@gmail.com>,
	Chris Zankel <chris@zankel.net>, Tony Luck <tony.luck@intel.com>,
	linux-pci@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
	Dean Nelson <dnelson@redhat.com>,
	LKML <linux-kernel@vger.kernel.org>,
	Ralf Baechle <ralf@linux-mips.org>,
	"Suthikulpanit, Suravee" <Suravee.Suthikulpanit@amd.com>,
	Joe Perches <joe@perches.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Robin Murphy <robin.murphy@arm.com>,
	nwatters@codeaurora.org
Subject: Re: [PATCH 2/3] swiotlb: prefix dma_to_phys and phys_to_dma functions
Date: Tue, 29 Mar 2016 19:32:07 +0000	[thread overview]
Message-ID: <6420021.rzhE3kJKJP@wuerfel> (raw)
In-Reply-To: <CACJDEmrzKOExg-Rchjy2hfVzkzbCZ=WNn4Bu3EVgim748VvRig@mail.gmail.com>

On Monday 28 March 2016 14:29:29 Konrad Rzeszutek Wilk wrote:
> > diff --git a/arch/arm64/mm/dma-mapping.c b/arch/arm64/mm/dma-mapping.c
> > index ada00c3..8c0f66b 100644
> > --- a/arch/arm64/mm/dma-mapping.c
> > +++ b/arch/arm64/mm/dma-mapping.c
> > @@ -29,6 +29,14 @@
> >
> >  #include <asm/cacheflush.h>
> >
> > +/*
> > + * If you are building a system without IOMMU, then you are using SWIOTLB
> > + * library. The ARM64 adaptation of this library does not support address
> > + * translation and it assumes that physical address = dma address for such
> > + * a use case. Please don't build a platform that violates this.
> > + */
> 
> Why not just expand the ARM64 part to support address translation?

Because so far all hardware we have is relatively sane. We only
need to implement this if someone accidentally puts their DMA
space at the wrong address.

There is at least one platform that could in theory use this because
their RAM starts at an address that is outside of the reach of 32-bit
devices, and a static IOMMU mapping (created by firmware) could be
used to map the start of RAM into DMA address zero, to avoid having
to use an IOMMU all the time, but it was considered not worth the
effort to implement that.

	Arnd

  parent reply	other threads:[~2016-03-29 19:32 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1458252137-24497-1-git-send-email-okaya@codeaurora.org>
2016-03-17 22:02 ` [PATCH 2/3] swiotlb: prefix dma_to_phys and phys_to_dma functions Sinan Kaya
2016-03-18 12:12   ` Robin Murphy
2016-03-18 15:00     ` Sinan Kaya
2016-03-28 18:29       ` Konrad Rzeszutek Wilk
2016-03-29 12:44         ` Stefano Stabellini
2016-03-29 12:57           ` Sinan Kaya
2016-03-29 19:32         ` Arnd Bergmann [this message]
2016-03-17 22:02 ` [PATCH 3/3] dma-mapping: move swiotlb dma-phys functions to common header Sinan Kaya
2016-03-18 11:31   ` Robin Murphy
2016-03-18 13:55     ` Sinan Kaya

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=6420021.rzhE3kJKJP@wuerfel \
    --to=arnd@arndb.de \
    --cc=Suravee.Suthikulpanit@amd.com \
    --cc=aaro.koskinen@iki.fi \
    --cc=akinobu.mita@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=benh@kernel.crashing.org \
    --cc=bhelgaas@google.com \
    --cc=catalin.marinas@arm.com \
    --cc=chenhc@lemote.com \
    --cc=chris@zankel.net \
    --cc=cmetcalf@ezchip.com \
    --cc=cov@codeaurora.org \
    --cc=dnelson@redhat.com \
    --cc=dvlasenk@redhat.com \
    --cc=f.fainelli@gmail.com \
    --cc=fenghua.yu@intel.com \
    --cc=gxt@mprc.pku.edu.cn \
    --cc=hpa@zytor.com \
    --cc=jcmvbkbc@gmail.com \
    --cc=joe@perches.com \
    --cc=jszhang@marvell.com \
    --cc=konrad.wilk@oracle.com \
    --cc=konrad@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-ia64@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@linux-mips.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=linux@roeck-us.net \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=m.szyprowski@samsung.com \
    --cc=mingo@redhat.com \
    --cc=mpe@ellerman.id.au \
    --cc=nwatters@codeaurora.org \
    --cc=okaya@codeaurora.org \
    --cc=paulus@samba.org \
    --cc=ralf@linux-mips.org \
    --cc=robin.murphy@arm.com \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=tglx@linutronix.de \
    --cc=timur@codeaurora.org \
    --cc=tony.luck@intel.com \
    --cc=valentinrothberg@gmail.com \
    --cc=will.deacon@arm.com \
    --cc=x86@kernel.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