diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-09-02 16:22:38 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-09-02 16:22:38 -0400 |
commit | d975f309a8b250e67b66eabeb56be6989c783629 (patch) | |
tree | 846cae85891024f7c45416d085df90d98ec2e51b /include/crypto | |
parent | 52b084d31cbc8e90cb6fc1ac4061d9a24375c89d (diff) | |
parent | f8bcbe62acd0e1ce9004b83e98a4af87ae385dcf (diff) |
Merge branch 'for-4.3/sg' of git://git.kernel.dk/linux-block
Pull SG updates from Jens Axboe:
"This contains a set of scatter-gather related changes/fixes for 4.3:
- Add support for limited chaining of sg tables even for
architectures that do not set ARCH_HAS_SG_CHAIN. From Christoph.
- Add sg chain support to target_rd. From Christoph.
- Fixup open coded sg->page_link in crypto/omap-sham. From
Christoph.
- Fixup open coded crypto ->page_link manipulation. From Dan.
- Also from Dan, automated fixup of manual sg_unmark_end()
manipulations.
- Also from Dan, automated fixup of open coded sg_phys()
implementations.
- From Robert Jarzmik, addition of an sg table splitting helper that
drivers can use"
* 'for-4.3/sg' of git://git.kernel.dk/linux-block:
lib: scatterlist: add sg splitting function
scatterlist: use sg_phys()
crypto/omap-sham: remove an open coded access to ->page_link
scatterlist: remove open coded sg_unmark_end instances
crypto: replace scatterwalk_sg_chain with sg_chain
target/rd: always chain S/G list
scatterlist: allow limited chaining without ARCH_HAS_SG_CHAIN
Diffstat (limited to 'include/crypto')
-rw-r--r-- | include/crypto/scatterwalk.h | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/include/crypto/scatterwalk.h b/include/crypto/scatterwalk.h index 96670e7e7c14..35f99b68d037 100644 --- a/include/crypto/scatterwalk.h +++ b/include/crypto/scatterwalk.h | |||
@@ -25,14 +25,6 @@ | |||
25 | #include <linux/scatterlist.h> | 25 | #include <linux/scatterlist.h> |
26 | #include <linux/sched.h> | 26 | #include <linux/sched.h> |
27 | 27 | ||
28 | static inline void scatterwalk_sg_chain(struct scatterlist *sg1, int num, | ||
29 | struct scatterlist *sg2) | ||
30 | { | ||
31 | sg_set_page(&sg1[num - 1], (void *)sg2, 0, 0); | ||
32 | sg1[num - 1].page_link &= ~0x02; | ||
33 | sg1[num - 1].page_link |= 0x01; | ||
34 | } | ||
35 | |||
36 | static inline void scatterwalk_crypto_chain(struct scatterlist *head, | 28 | static inline void scatterwalk_crypto_chain(struct scatterlist *head, |
37 | struct scatterlist *sg, | 29 | struct scatterlist *sg, |
38 | int chain, int num) | 30 | int chain, int num) |
@@ -43,7 +35,7 @@ static inline void scatterwalk_crypto_chain(struct scatterlist *head, | |||
43 | } | 35 | } |
44 | 36 | ||
45 | if (sg) | 37 | if (sg) |
46 | scatterwalk_sg_chain(head, num, sg); | 38 | sg_chain(head, num, sg); |
47 | else | 39 | else |
48 | sg_mark_end(head); | 40 | sg_mark_end(head); |
49 | } | 41 | } |