diff options
author | Sebastian Andrzej Siewior <sebastian@breakpoint.cc> | 2009-06-18 10:19:12 +0200 |
---|---|---|
committer | Pierre Ossman <pierre@ossman.eu> | 2009-07-31 12:28:45 +0200 |
commit | 6de7e356faf54aa75de5b624bbce28a5b776dfa8 (patch) | |
tree | 09b341b7c1371448a5ae8a9cd4009a4f81f4a3dd /include | |
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')
-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 e5996984ddd..9aaf5bfdad1 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, */ #define SG_MITER_ATOMIC (1 << 0) /* use kmap_atomic */ +#define SG_MITER_TO_SG (1 << 1) /* flush back to phys on unmap */ +#define SG_MITER_FROM_SG (1 << 2) /* nop */ struct sg_mapping_iter { /* the following three fields can be accessed directly */ |