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


Groups > linux.kernel > #1557447

Re: [PATCH 1/2] dma-mapping: let arch know origin of dma range passed to arch_setup_dma_ops()

From Arnd Bergmann <arnd@arndb.de>
Newsgroups linux.kernel
Subject Re: [PATCH 1/2] dma-mapping: let arch know origin of dma range passed to arch_setup_dma_ops()
Date 2017-01-12 14:30 +0100
Message-ID <sYNC2-4tG-29@gated-at.bofh.it> (permalink)
References <sYvYt-1Uj-21@gated-at.bofh.it> <sYGKe-t5-9@gated-at.bofh.it> <sYHdg-CK-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thursday, January 12, 2017 9:33:32 AM CET Nikita Yushchenko wrote:
> >> Hmm, I think when the dma-ranges are missing, we should either enforce
> >> a 32-bit mask, or disallow DMA completely. It's probably too late for
> >> the latter, I wish we had done this earlier in order to force everyone
> >> on ARM64 to have a valid dma-ranges property for any DMA master.
> > 
> > This can be done over time.
> > 
> > However the very idea of this version of patch is - keep working pieces
> > as-is, thus for now setting enforce_range to false in case of no defined
> > dma-ranges is intentional.
> 
> What we can do is - check bus width (as it is defined in DT) and set
> enforce_range to true if bus is 32-bit
> 
> > What I should re-check is - does rcar dtsi set dma-ranges, and add it if
> > it does not.
> 
> It does not, will have to add.
> 
> In DT bus is defined as 64-bit. But looks like physically it is 32-bit.
> Maybe DT needs fixing.

I think we always assumed that the lack of a dma-ranges property
implied a 32-bit width, as that is the safe fallback as well as the
most common case.

AFAICT, this means you are actually fine on rcar, and all other
platforms will keep working as we enforce it, but might get slowed
down if they relied on the unintended behavior of allowing 64-bit
DMA.

	Arnd

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


Thread

[PATCH 0/2] arm64: fix handling of DMA masks wider than bus supports Nikita Yushchenko <nikita.yoush@cogentembedded.com> - 2017-01-11 19:40 +0100
  [PATCH 1/2] dma-mapping: let arch know origin of dma range passed to arch_setup_dma_ops() Nikita Yushchenko <nikita.yoush@cogentembedded.com> - 2017-01-11 19:40 +0100
    Re: [PATCH 1/2] dma-mapping: let arch know origin of dma range passed to arch_setup_dma_ops() Arnd Bergmann <arnd@arndb.de> - 2017-01-11 22:20 +0100
      Re: [PATCH 1/2] dma-mapping: let arch know origin of dma range passed  to arch_setup_dma_ops() Nikita Yushchenko <nikita.yoush@cogentembedded.com> - 2017-01-12 07:10 +0100
        Re: [PATCH 1/2] dma-mapping: let arch know origin of dma range passed  to arch_setup_dma_ops() Nikita Yushchenko <nikita.yoush@cogentembedded.com> - 2017-01-12 07:40 +0100
          Re: [PATCH 1/2] dma-mapping: let arch know origin of dma range passed to arch_setup_dma_ops() Arnd Bergmann <arnd@arndb.de> - 2017-01-12 14:30 +0100
            Re: [PATCH 1/2] dma-mapping: let arch know origin of dma range passed  to arch_setup_dma_ops() Nikita Yushchenko <nikita.yoush@cogentembedded.com> - 2017-01-12 14:50 +0100
        Re: [PATCH 1/2] dma-mapping: let arch know origin of dma range  passed to arch_setup_dma_ops() Will Deacon <will.deacon@arm.com> - 2017-01-12 13:20 +0100
          Re: [PATCH 1/2] dma-mapping: let arch know origin of dma range passed to arch_setup_dma_ops() Arnd Bergmann <arnd@arndb.de> - 2017-01-12 14:30 +0100
            Re: [PATCH 1/2] dma-mapping: let arch know origin of dma range passed  to arch_setup_dma_ops() Robin Murphy <robin.murphy@arm.com> - 2017-01-12 14:50 +0100
    Re: [PATCH 1/2] dma-mapping: let arch know origin of dma range  passed to arch_setup_dma_ops() kbuild test robot <lkp@intel.com> - 2017-01-13 11:50 +0100

csiph-web