Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1366588

Re: [PATCH 2/3] swiotlb: prefix dma_to_phys and phys_to_dma functions

From Arnd Bergmann <arnd@arndb.de>
Newsgroups linux.kernel
Subject Re: [PATCH 2/3] swiotlb: prefix dma_to_phys and phys_to_dma functions
Date 2016-03-29 21:40 +0200
Message-ID <ri7EB-2oO-3@gated-at.bofh.it> (permalink)
References <rdOhc-4TJ-9@gated-at.bofh.it> <re4ci-8fa-17@gated-at.bofh.it> <rhK5k-2r4-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 1/3] crypto: marvell/cesa - replace dma_to_phys with dma_map_single Sinan Kaya <okaya@codeaurora.org> - 2016-03-17 23:10 +0100
  [PATCH 2/3] swiotlb: prefix dma_to_phys and phys_to_dma functions Sinan Kaya <okaya@codeaurora.org> - 2016-03-17 23:10 +0100
    Re: [PATCH 2/3] swiotlb: prefix dma_to_phys and phys_to_dma functions Robin Murphy <robin.murphy@arm.com> - 2016-03-18 13:20 +0100
      Re: [PATCH 2/3] swiotlb: prefix dma_to_phys and phys_to_dma functions Sinan Kaya <okaya@codeaurora.org> - 2016-03-18 16:10 +0100
        Re: [PATCH 2/3] swiotlb: prefix dma_to_phys and phys_to_dma functions Konrad Rzeszutek Wilk <konrad@kernel.org> - 2016-03-28 20:30 +0200
          Re: [PATCH 2/3] swiotlb: prefix dma_to_phys and phys_to_dma  functions Stefano Stabellini <sstabellini@kernel.org> - 2016-03-29 14:50 +0200
            Re: [PATCH 2/3] swiotlb: prefix dma_to_phys and phys_to_dma functions Sinan Kaya <okaya@codeaurora.org> - 2016-03-29 15:00 +0200
          Re: [PATCH 2/3] swiotlb: prefix dma_to_phys and phys_to_dma functions Arnd Bergmann <arnd@arndb.de> - 2016-03-29 21:40 +0200
  [PATCH 3/3] dma-mapping: move swiotlb dma-phys functions to common header Sinan Kaya <okaya@codeaurora.org> - 2016-03-17 23:10 +0100
    Re: [PATCH 3/3] dma-mapping: move swiotlb dma-phys functions to  common header Robin Murphy <robin.murphy@arm.com> - 2016-03-18 12:40 +0100
      Re: [PATCH 3/3] dma-mapping: move swiotlb dma-phys functions to  common header Sinan Kaya <okaya@codeaurora.org> - 2016-03-18 15:00 +0100
  Re: [PATCH 1/3] crypto: marvell/cesa - replace dma_to_phys with  dma_map_single Russell King - ARM Linux <linux@arm.linux.org.uk> - 2016-03-18 00:00 +0100
    Re: [PATCH 1/3] crypto: marvell/cesa - replace dma_to_phys with  dma_map_single okaya@codeaurora.org - 2016-03-18 00:20 +0100
      Re: [PATCH 1/3] crypto: marvell/cesa - replace dma_to_phys with  dma_map_single Russell King - ARM Linux <linux@arm.linux.org.uk> - 2016-03-18 01:00 +0100
        Re: [PATCH 1/3] crypto: marvell/cesa - replace dma_to_phys with  dma_map_single Boris Brezillon <boris.brezillon@free-electrons.com> - 2016-03-18 10:40 +0100
          Re: [PATCH 1/3] crypto: marvell/cesa - replace dma_to_phys with  dma_map_single Robin Murphy <robin.murphy@arm.com> - 2016-03-18 12:30 +0100
            Re: [PATCH 1/3] crypto: marvell/cesa - replace dma_to_phys with  dma_map_single Boris Brezillon <boris.brezillon@free-electrons.com> - 2016-03-18 12:40 +0100
            Re: [PATCH 1/3] crypto: marvell/cesa - replace dma_to_phys with  dma_map_single Sinan Kaya <okaya@codeaurora.org> - 2016-03-18 15:00 +0100
              Re: [PATCH 1/3] crypto: marvell/cesa - replace dma_to_phys with  dma_map_single Sinan Kaya <okaya@codeaurora.org> - 2016-03-18 15:10 +0100
              Re: [PATCH 1/3] crypto: marvell/cesa - replace dma_to_phys with  dma_map_single Sinan Kaya <okaya@codeaurora.org> - 2016-03-18 15:30 +0100
              Re: [PATCH 1/3] crypto: marvell/cesa - replace dma_to_phys with  dma_map_single Boris Brezillon <boris.brezillon@free-electrons.com> - 2016-03-18 15:30 +0100

csiph-web