diff options
author | Giovanni Cabiddu <giovanni.cabiddu@intel.com> | 2022-11-28 15:21:18 +0300 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2022-12-09 13:44:59 +0300 |
commit | 79d8dbf155d4e670b6ac20acbb6b22f02c728da5 (patch) | |
tree | eaf1a947e3fac2ce0af365d45ef8e1273a5ed3eb /drivers/crypto | |
parent | 4d76f3880987a00da79f455876488ac3c7343e83 (diff) | |
download | linux-79d8dbf155d4e670b6ac20acbb6b22f02c728da5.tar.xz |
crypto: qat - relocate qat_algs_alloc_flags()
Move qat_algs_alloc_flags() from qat_crypto.h to qat_bl.h as this will
be used also by the compression logic.
Signed-off-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Reviewed-by: Wojciech Ziemba <wojciech.ziemba@intel.com>
Reviewed-by: Adam Guerin <adam.guerin@intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto')
-rw-r--r-- | drivers/crypto/qat/qat_common/qat_bl.h | 6 | ||||
-rw-r--r-- | drivers/crypto/qat/qat_common/qat_crypto.h | 5 |
2 files changed, 6 insertions, 5 deletions
diff --git a/drivers/crypto/qat/qat_common/qat_bl.h b/drivers/crypto/qat/qat_common/qat_bl.h index 0c174fee9e64..5f2ea8f352f7 100644 --- a/drivers/crypto/qat/qat_common/qat_bl.h +++ b/drivers/crypto/qat/qat_common/qat_bl.h @@ -2,6 +2,7 @@ /* Copyright(c) 2014 - 2022 Intel Corporation */ #ifndef QAT_BL_H #define QAT_BL_H +#include <linux/crypto.h> #include <linux/scatterlist.h> #include <linux/types.h> @@ -52,4 +53,9 @@ int qat_bl_sgl_to_bufl(struct adf_accel_dev *accel_dev, struct qat_sgl_to_bufl_params *params, gfp_t flags); +static inline gfp_t qat_algs_alloc_flags(struct crypto_async_request *req) +{ + return req->flags & CRYPTO_TFM_REQ_MAY_SLEEP ? GFP_KERNEL : GFP_ATOMIC; +} + #endif diff --git a/drivers/crypto/qat/qat_common/qat_crypto.h b/drivers/crypto/qat/qat_common/qat_crypto.h index 505e881022a7..6a0e961bb9dc 100644 --- a/drivers/crypto/qat/qat_common/qat_crypto.h +++ b/drivers/crypto/qat/qat_common/qat_crypto.h @@ -65,9 +65,4 @@ static inline bool adf_hw_dev_has_crypto(struct adf_accel_dev *accel_dev) return true; } -static inline gfp_t qat_algs_alloc_flags(struct crypto_async_request *req) -{ - return req->flags & CRYPTO_TFM_REQ_MAY_SLEEP ? GFP_KERNEL : GFP_ATOMIC; -} - #endif |