crypto: hisilicon - Update QP resources of SEC V2
authorZaibo Xu <xuzaibo@huawei.com>
Sat, 11 Jan 2020 02:41:51 +0000 (10:41 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 16 Jan 2020 07:18:14 +0000 (15:18 +0800)
commit7c7d902aa4059bd4637f8ba59f0bd49e57b4825d
treec112c00c3653d41d2a5512952fabeb7679d124e0
parenta181647c06c21828c012df221d4adc1fd4125f16
crypto: hisilicon - Update QP resources of SEC V2

1.Put resource including request and resource list into
  QP context structure to avoid allocate memory repeatedly.
2.Add max context queue number to void kcalloc large memory for QP context.
3.Remove the resource allocation operation.
4.Redefine resource allocation APIs to be shared by other algorithms.
5.Move resource allocation and free inner functions out of
  operations 'struct sec_req_op', and they are called directly.

Signed-off-by: Zaibo Xu <xuzaibo@huawei.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/hisilicon/sec2/sec.h
drivers/crypto/hisilicon/sec2/sec_crypto.c
drivers/crypto/hisilicon/sec2/sec_main.c