Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1623727
| From | Logan Gunthorpe <logang@deltatee.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 01/22] scatterlist: Introduce sg_map helper functions |
| Date | 2017-04-14 17:40 +0200 |
| Message-ID | <twbuh-2Mv-9@gated-at.bofh.it> (permalink) |
| References | <tvV69-P8-5@gated-at.bofh.it> <tvV6a-P8-27@gated-at.bofh.it> <tw4VQ-7gB-11@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 14/04/17 02:35 AM, Christoph Hellwig wrote:
>> +
>> static inline int is_dma_buf_file(struct file *);
>>
>> struct dma_buf_list {
>
> I think the right fix here is to rename the operation to unmap_atomic
> and send out a little patch for that ASAP.
Ok, I can do that next week.
> I'd rather have separate functions for kmap vs kmap_atomic instead of
> the flags parameter. And while you're at it just always pass the 0
> offset parameter instead of adding a wrapper..
>
> Otherwise this looks good to me.
I settled on the flags because I thought the interface could be expanded
to do more things like automatically copy iomem to a bounce buffer (with
a flag). It'd also be possible to add things like vmap and
physical_address to the interface which would cover even more sg_page
users. All the implementations would then share the common offset
calculations, and switching between them becomes a matter of changing a
couple flags.
If you're still not convinced by the above arguments then I'll change
it but I did have reasons for choosing to do it this way.
I am fine with removing the offset versions. I will make that change.
Thanks,
Logan
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH 01/22] scatterlist: Introduce sg_map helper functions Logan Gunthorpe <logang@deltatee.com> - 2017-04-14 00:10 +0200
Re: [PATCH 01/22] scatterlist: Introduce sg_map helper functions Christoph Hellwig <hch@lst.de> - 2017-04-14 10:40 +0200
Re: [PATCH 01/22] scatterlist: Introduce sg_map helper functions Logan Gunthorpe <logang@deltatee.com> - 2017-04-14 17:40 +0200
csiph-web