crypto: qat - relocate qat_algs_alloc_flags()
authorGiovanni Cabiddu <giovanni.cabiddu@intel.com>
Mon, 28 Nov 2022 12:21:18 +0000 (12:21 +0000)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 9 Dec 2022 10:44:59 +0000 (18:44 +0800)
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>
drivers/crypto/qat/qat_common/qat_bl.h
drivers/crypto/qat/qat_common/qat_crypto.h

index 0c174fee9e645dbcf78234d43d10a01aa70cd4b3..5f2ea8f352f768bf2fb561abf3d44cc124fb7175 100644 (file)
@@ -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
index 505e881022a7d3f5b55a91d6778943d016bc8106..6a0e961bb9dc774583e58539d9bf8476d6b647c6 100644 (file)
@@ -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