diff options
| author | Dan Williams <dan.j.williams@intel.com> | 2018-07-08 16:46:07 -0400 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2018-07-15 18:05:05 -0400 |
| commit | abd08d7d245397bcbded8c6c29ff79a36b3875b0 (patch) | |
| tree | 5bc674f33886151cde60212222b24463f26400d6 /lib | |
| parent | bf3eeb9b5f2a1a05b3a68c6d82112babd58d6a39 (diff) | |
lib/iov_iter: Document _copy_to_iter_flushcache()
Add some theory of operation documentation to _copy_to_iter_flushcache().
Reported-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Tony Luck <tony.luck@intel.com>
Link: http://lkml.kernel.org/r/153108276767.37979.9462477994086841699.stgit@dwillia2-desk3.amr.corp.intel.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/iov_iter.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/iov_iter.c b/lib/iov_iter.c index 94fa361be7bb..09fb73ad9d54 100644 --- a/lib/iov_iter.c +++ b/lib/iov_iter.c | |||
| @@ -727,6 +727,20 @@ size_t _copy_from_iter_nocache(void *addr, size_t bytes, struct iov_iter *i) | |||
| 727 | EXPORT_SYMBOL(_copy_from_iter_nocache); | 727 | EXPORT_SYMBOL(_copy_from_iter_nocache); |
| 728 | 728 | ||
| 729 | #ifdef CONFIG_ARCH_HAS_UACCESS_FLUSHCACHE | 729 | #ifdef CONFIG_ARCH_HAS_UACCESS_FLUSHCACHE |
| 730 | /** | ||
| 731 | * _copy_from_iter_flushcache - write destination through cpu cache | ||
| 732 | * @addr: destination kernel address | ||
| 733 | * @bytes: total transfer length | ||
| 734 | * @iter: source iterator | ||
| 735 | * | ||
| 736 | * The pmem driver arranges for filesystem-dax to use this facility via | ||
| 737 | * dax_copy_from_iter() for ensuring that writes to persistent memory | ||
| 738 | * are flushed through the CPU cache. It is differentiated from | ||
| 739 | * _copy_from_iter_nocache() in that guarantees all data is flushed for | ||
| 740 | * all iterator types. The _copy_from_iter_nocache() only attempts to | ||
| 741 | * bypass the cache for the ITER_IOVEC case, and on some archs may use | ||
| 742 | * instructions that strand dirty-data in the cache. | ||
| 743 | */ | ||
| 730 | size_t _copy_from_iter_flushcache(void *addr, size_t bytes, struct iov_iter *i) | 744 | size_t _copy_from_iter_flushcache(void *addr, size_t bytes, struct iov_iter *i) |
| 731 | { | 745 | { |
| 732 | char *to = addr; | 746 | char *to = addr; |
