Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1730190
| From | Christoph Hellwig <hch@infradead.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 2/2] scsi: Align queue to ARCH_DMA_MINALIGN in non-coherent DMA mode |
| Date | 2017-09-11 09:40 +0200 |
| Message-ID | <uoru2-8bR-13@gated-at.bofh.it> (permalink) |
| References | <un0Pg-61N-17@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
> + if (plat_device_is_coherent(dev)) We can't just call platform device code. We'll need a proper DMA API call for this. > + blk_queue_dma_alignment(q, 0x04 - 1); > + else > + blk_queue_dma_alignment(q, dma_get_cache_alignment() - 1); Which we already have with dma_get_cache_alignment, except that it doesn't take a struct device pointer and doesn't call into dma_map ops. So please add a struct device argument to dma_get_cache_alignment, and let it call into dma_map_ops where needed. With that you can replace the above with: blk_queue_dma_alignment(q, max(0x04U, dma_get_cache_alignment(dev)) - 1);
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 2/2] scsi: Align queue to ARCH_DMA_MINALIGN in non-coherent DMA mode Huacai Chen <chenhc@lemote.com> - 2017-09-07 11:00 +0200
Re: [PATCH 2/2] scsi: Align queue to ARCH_DMA_MINALIGN in non-coherent DMA mode kbuild test robot <lkp@intel.com> - 2017-09-09 19:10 +0200
Re: [PATCH 2/2] scsi: Align queue to ARCH_DMA_MINALIGN in non-coherent DMA mode Christoph Hellwig <hch@infradead.org> - 2017-09-11 09:40 +0200
Re: [PATCH 2/2] scsi: Align queue to ARCH_DMA_MINALIGN innon-coherent DMA mode "陈华才" <chenhc@lemote.com> - 2017-09-11 10:50 +0200
csiph-web