Commit 170c3204 authored by Jie Wang's avatar Jie Wang Committed by Aichun Shi
Browse files

crypto: qat - change signature of uof_get_num_objs()

mainline inclusion
from mainline-v6.8-rc1
commit b34bd0fd563df763ccca998b3d5fc824c536c28a
category: feature
bugzilla: https://gitee.com/openeuler/intel-kernel/issues/I9A5BW
CVE: N/A
Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b34bd0fd563df763ccca998b3d5fc824c536c28a



-------------------------------------

Add accel_dev as parameter of the function uof_get_num_objs().
This is in preparation for the introduction of the QAT 420xx driver as
it will allow to reconfigure the ae_mask when a configuration that does
not require all AEs is loaded on the device.

This does not introduce any functional change.

Intel-SIG: commit b34bd0fd563d crypto: qat - change signature of uof_get_num_objs()
Backport to support QAT in-tree driver

Signed-off-by: default avatarJie Wang <jie.wang@intel.com>
Reviewed-by: default avatarGiovanni Cabiddu <giovanni.cabiddu@intel.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
[ Aichun Shi: amend commit log ]
Signed-off-by: default avatarAichun Shi <aichun.shi@intel.com>
parent bd4be2f6
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -390,7 +390,7 @@ static int adf_init_device(struct adf_accel_dev *accel_dev)
	return ret;
}

static u32 uof_get_num_objs(void)
static u32 uof_get_num_objs(struct adf_accel_dev *accel_dev)
{
	return ARRAY_SIZE(adf_fw_cy_config);
}
+1 −1
Original line number Diff line number Diff line
@@ -241,7 +241,7 @@ struct adf_hw_device_data {
	void (*reset_device)(struct adf_accel_dev *accel_dev);
	void (*set_msix_rttable)(struct adf_accel_dev *accel_dev);
	const char *(*uof_get_name)(struct adf_accel_dev *accel_dev, u32 obj_num);
	u32 (*uof_get_num_objs)(void);
	u32 (*uof_get_num_objs)(struct adf_accel_dev *accel_dev);
	u32 (*uof_get_ae_mask)(struct adf_accel_dev *accel_dev, u32 obj_num);
	int (*dev_config)(struct adf_accel_dev *accel_dev);
	struct adf_pfvf_ops pfvf_ops;
+1 −1
Original line number Diff line number Diff line
@@ -19,7 +19,7 @@ static int adf_ae_fw_load_images(struct adf_accel_dev *accel_dev, void *fw_addr,
	int i;

	loader = loader_data->fw_loader;
	num_objs = hw_device->uof_get_num_objs();
	num_objs = hw_device->uof_get_num_objs(accel_dev);

	for (i = 0; i < num_objs; i++) {
		obj_name = hw_device->uof_get_name(accel_dev, i);