diff options
author | Sebastian Andrzej Siewior <sebastian@breakpoint.cc> | 2009-06-18 04:19:12 -0400 |
---|---|---|
committer | Pierre Ossman <pierre@ossman.eu> | 2009-07-31 06:28:45 -0400 |
commit | 6de7e356faf54aa75de5b624bbce28a5b776dfa8 (patch) | |
tree | 09b341b7c1371448a5ae8a9cd4009a4f81f4a3dd /include/linux/scatterlist.h | |
parent | b592972493c38665efd7d429a01b23fcb21e331a (diff) |
lib/scatterlist: add a flags to signalize mapping direction
sg_miter_start() is currently unaware of the direction of the copy
process (to or from the scatter list). It is important to know the
direction because the page has to be flushed in case the data written
is seen on a different mapping in user land on cache incoherent
architectures.
Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
Acked-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Pierre Ossman <pierre@ossman.eu>
Diffstat (limited to 'include/linux/scatterlist.h')
-rw-r--r-- | include/linux/scatterlist.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/scatterlist.h b/include/linux/scatterlist.h index e5996984ddd0..9aaf5bfdad1a 100644 --- a/include/linux/scatterlist.h +++ b/include/linux/scatterlist.h | |||
@@ -242,6 +242,8 @@ size_t sg_copy_to_buffer(struct scatterlist *sgl, unsigned int nents, | |||
242 | */ | 242 | */ |
243 | 243 | ||
244 | #define SG_MITER_ATOMIC (1 << 0) /* use kmap_atomic */ | 244 | #define SG_MITER_ATOMIC (1 << 0) /* use kmap_atomic */ |
245 | #define SG_MITER_TO_SG (1 << 1) /* flush back to phys on unmap */ | ||
246 | #define SG_MITER_FROM_SG (1 << 2) /* nop */ | ||
245 | 247 | ||
246 | struct sg_mapping_iter { | 248 | struct sg_mapping_iter { |
247 | /* the following three fields can be accessed directly */ | 249 | /* the following three fields can be accessed directly */ |