Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1739425
| From | "陈华才" <chenhc@lemote.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH V7 1/2] dma-mapping: Rework dma_get_cache_alignment() |
| Date | 2017-09-26 03:50 +0200 |
| Message-ID | <utNax-6dv-5@gated-at.bofh.it> (permalink) |
| References | <utyuS-4UY-19@gated-at.bofh.it> <utB9p-6tv-47@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Hi, Christoph, Can I put the declaration in asm/dma-coherence.h? And, last time you said it is OK to pass a NULL to dma_get_cache_alignment() and cc all driver maintainers. I have do so. Huacai ------------------ Original ------------------ From: "Christoph Hellwig"<hch@lst.de>; Date: Mon, Sep 25, 2017 08:51 PM To: "Huacai Chen"<chenhc@lemote.com>; Cc: "Christoph Hellwig"<hch@lst.de>; "Marek Szyprowski"<m.szyprowski@samsung.com>; "Robin Murphy"<robin.murphy@arm.com>; "Andrew Morton"<akpm@linux-foundation.org>; "Fuxin Zhang"<zhangfx@lemote.com>; "linux-kernel"<linux-kernel@vger.kernel.org>; "Ralf Baechle"<ralf@linux-mips.org>; "James Hogan"<james.hogan@imgtec.com>; "linux-mips"<linux-mips@linux-mips.org>; "James E . J . Bottomley"<jejb@linux.vnet.ibm.com>; "Martin K . Petersen"<martin.petersen@oracle.com>; "linux-scsi"<linux-scsi@vger.kernel.org>; "Roland Dreier"<rolandd@cisco.com>; "Pawel Osciak"<pawel@osciak.com>; "Kyungmin Park"<kyungmin.park@samsung.com>; "Michael Chan"<michael.chan@broadcom.com>; "Benjamin Herrenschmidt"<benh@kernel.crashing.org>; "Ivan Mikhaylov"<ivan@ru.ibm.com>; "Tariq Toukan"<tariqt@mellanox.com>; "Andy Gross"<agross@codeaurora.org>; "Mark A . Greer"<mgreer@mvista.com>; "Robert Baldyga"<r.baldyga@samsung.com>; "stable"<stable@vger.kernel.org>; Subject: Re: [PATCH V7 1/2] dma-mapping: Rework dma_get_cache_alignment() > index aba7138..e2c5d9e 100644 > --- a/arch/mips/include/asm/dma-mapping.h > +++ b/arch/mips/include/asm/dma-mapping.h > @@ -39,4 +39,6 @@ static inline void arch_setup_dma_ops(struct device *dev, u64 dma_base, > #endif > } > > +int mips_get_cache_alignment(struct device *dev); All the other mips generic dma helpers are prefixed mips_dma_* so it might make sense to follow that. Also please don't add arch-local helpers to asm/dma-mapping.h - this is a header used by linux/dma-mapping.h and should not contain implementation details if avoidable. > + dma_get_cache_alignment(NULL)) / mdev->limits.mtt_seg_size; As said before - please don't pass NULL to this function but the proper device, which would be &mdev->pdev->dev in this case for example.
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH V7 1/2] dma-mapping: Rework dma_get_cache_alignment() Huacai Chen <chenhc@lemote.com> - 2017-09-25 12:10 +0200
Re: [PATCH V7 1/2] dma-mapping: Rework dma_get_cache_alignment() Robin Murphy <robin.murphy@arm.com> - 2017-09-25 15:00 +0200
Re: [PATCH V7 1/2] dma-mapping: Rework dma_get_cache_alignment() "陈华才" <chenhc@lemote.com> - 2017-09-26 03:50 +0200
Re: [PATCH V7 1/2] dma-mapping: Rework dma_get_cache_alignment() Christoph Hellwig <hch@lst.de> - 2017-09-25 15:00 +0200
Re: [PATCH V7 1/2] dma-mapping: Rework dma_get_cache_alignment() "陈华才" <chenhc@lemote.com> - 2017-09-26 03:50 +0200
Re: [PATCH V7 1/2] dma-mapping: Rework dma_get_cache_alignment() Christoph Hellwig <hch@lst.de> - 2017-09-26 08:20 +0200
csiph-web