summaryrefslogtreecommitdiff
path: root/include/crypto/internal/scompress.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/crypto/internal/scompress.h')
-rw-r--r--include/crypto/internal/scompress.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/crypto/internal/scompress.h b/include/crypto/internal/scompress.h
index f25aa2ea3b48..fd74e656ffd2 100644
--- a/include/crypto/internal/scompress.h
+++ b/include/crypto/internal/scompress.h
@@ -11,6 +11,8 @@
#include <crypto/acompress.h>
#include <crypto/algapi.h>
+#include <linux/cpumask_types.h>
+#include <linux/workqueue_types.h>
struct acomp_req;
@@ -18,6 +20,11 @@ struct crypto_scomp {
struct crypto_tfm base;
};
+struct crypto_acomp_stream {
+ spinlock_t lock;
+ void *ctx;
+};
+
/**
* struct scomp_alg - synchronous compression algorithm
*
@@ -27,6 +34,8 @@ struct crypto_scomp {
* @decompress: Function performs a de-compress operation
* @base: Common crypto API algorithm data structure
* @stream: Per-cpu memory for algorithm
+ * @stream_work: Work struct to allocate stream memmory
+ * @stream_want: CPU mask for allocating stream memory
* @calg: Cmonn algorithm data structure shared with acomp
*/
struct scomp_alg {
@@ -39,6 +48,10 @@ struct scomp_alg {
unsigned int slen, u8 *dst, unsigned int *dlen,
void *ctx);
+ struct crypto_acomp_stream __percpu *stream;
+ struct work_struct stream_work;
+ cpumask_t stream_want;
+
union {
struct COMP_ALG_COMMON;
struct comp_alg_common calg;