Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1557130
| From | Nikita Yushchenko <nikita.yoush@cogentembedded.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 2/2] arm64: avoid increasing DMA masks above what hardware supports |
| Date | 2017-01-12 07:10 +0100 |
| Message-ID | <sYGKe-t5-11@gated-at.bofh.it> (permalink) |
| References | <sYvYt-1Uj-21@gated-at.bofh.it> <sYvYt-1Uj-23@gated-at.bofh.it> <sYvYt-1Uj-19@gated-at.bofh.it> <sYytk-3x3-37@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
>> @@ -959,6 +990,15 @@ void arch_setup_dma_ops(struct device *dev, u64 dma_base, u64 size, >> if (!dev->archdata.dma_ops) >> dev->archdata.dma_ops = &swiotlb_dma_ops; >> >> + /* >> + * Whatever the parent bus can set. A device must not set >> + * a DMA mask larger than this. >> + */ >> + if (enforce_range) >> + dev->archdata.parent_dma_mask = size - 1; >> + else >> + dev->archdata.parent_dma_mask = DMA_BIT_MASK(64); >> + >> dev->archdata.dma_coherent = coherent; >> __iommu_setup_dma_ops(dev, dma_base, size, iommu); >> > > Could we just pass the mask instead of the size here? We don't want to change API now. Nikita
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH 2/2] arm64: avoid increasing DMA masks above what hardware supports Nikita Yushchenko <nikita.yoush@cogentembedded.com> - 2017-01-11 19:40 +0100
Re: [PATCH 2/2] arm64: avoid increasing DMA masks above what hardware supports Arnd Bergmann <arnd@arndb.de> - 2017-01-11 22:20 +0100
Re: [PATCH 2/2] arm64: avoid increasing DMA masks above what hardware supports Nikita Yushchenko <nikita.yoush@cogentembedded.com> - 2017-01-12 07:10 +0100
csiph-web