mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-30 22:26:55 +00:00
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>
This commit is contained in:
parent
4d76f38809
commit
79d8dbf155
2 changed files with 6 additions and 5 deletions
|
@ -2,6 +2,7 @@
|
||||||
/* Copyright(c) 2014 - 2022 Intel Corporation */
|
/* Copyright(c) 2014 - 2022 Intel Corporation */
|
||||||
#ifndef QAT_BL_H
|
#ifndef QAT_BL_H
|
||||||
#define QAT_BL_H
|
#define QAT_BL_H
|
||||||
|
#include <linux/crypto.h>
|
||||||
#include <linux/scatterlist.h>
|
#include <linux/scatterlist.h>
|
||||||
#include <linux/types.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,
|
struct qat_sgl_to_bufl_params *params,
|
||||||
gfp_t flags);
|
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
|
#endif
|
||||||
|
|
|
@ -65,9 +65,4 @@ static inline bool adf_hw_dev_has_crypto(struct adf_accel_dev *accel_dev)
|
||||||
return true;
|
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
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue