Re: [PATCH v3 5/7] pmem: add copy_from_iter_pmem() and clear_pmem()

2015-08-17 Thread Ross Zwisler
On Mon, 2015-08-17 at 21:10 +0200, Christoph Hellwig wrote: > > #include > > +#include > > + > > Can we keep this in linux/pmem.h? I'm pretty sure the stubs would need > it as well, and even if they don't it'll keep the includes consistent. Sure. > > +{ > > + size_t len; > > + > > + len

Re: [PATCH v3 5/7] pmem: add copy_from_iter_pmem() and clear_pmem()

2015-08-17 Thread Christoph Hellwig
> #include > +#include > + Can we keep this in linux/pmem.h? I'm pretty sure the stubs would need it as well, and even if they don't it'll keep the includes consistent. > +{ > + size_t len; > + > + len = copy_from_iter_nocache((void __force *)addr, bytes, i); > + > + /* > +

[PATCH v3 5/7] pmem: add copy_from_iter_pmem() and clear_pmem()

2015-08-17 Thread Ross Zwisler
Add support for two new PMEM APIs, copy_from_iter_pmem() and clear_pmem(). copy_from_iter_pmem() is used to copy data from an iterator into a PMEM buffer. clear_pmem() zeros a PMEM memory range. Both of these new APIs must be explicitly ordered using a wmb_pmem() function call and are

Re: [PATCH v3 5/7] pmem: add copy_from_iter_pmem() and clear_pmem()

2015-08-17 Thread Ross Zwisler
On Mon, 2015-08-17 at 21:10 +0200, Christoph Hellwig wrote: #include linux/uaccess.h +#include linux/uio.h + Can we keep this in linux/pmem.h? I'm pretty sure the stubs would need it as well, and even if they don't it'll keep the includes consistent. Sure. +{ + size_t len; +

Re: [PATCH v3 5/7] pmem: add copy_from_iter_pmem() and clear_pmem()

2015-08-17 Thread Christoph Hellwig
#include linux/uaccess.h +#include linux/uio.h + Can we keep this in linux/pmem.h? I'm pretty sure the stubs would need it as well, and even if they don't it'll keep the includes consistent. +{ + size_t len; + + len = copy_from_iter_nocache((void __force *)addr, bytes, i); + +

[PATCH v3 5/7] pmem: add copy_from_iter_pmem() and clear_pmem()

2015-08-17 Thread Ross Zwisler
Add support for two new PMEM APIs, copy_from_iter_pmem() and clear_pmem(). copy_from_iter_pmem() is used to copy data from an iterator into a PMEM buffer. clear_pmem() zeros a PMEM memory range. Both of these new APIs must be explicitly ordered using a wmb_pmem() function call and are