Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

crypto: qat - add live migration enablers for GEN6 devices

The current implementation of the QAT live migration enablers is exclusive
to QAT GEN4 devices and resides within QAT GEN4 specific files. However,
the underlying mechanisms, such as the relevant CSRs and offsets,
can be shared between QAT GEN4 and QAT GEN6 devices.

Add the necessary enablers required to implement live migration for QAT
GEN6 devices to the abstraction layer to allow leveraging the existing
QAT GEN4 implementation.

Signed-off-by: Małgorzata Mielnik <malgorzata.mielnik@intel.com>
Reviewed-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

authored by

Małgorzata Mielnik and committed by
Herbert Xu
26abce25 a47dc5d1

+13
+4
drivers/crypto/intel/qat/qat_6xxx/adf_6xxx_hw_data.c
··· 10 10 11 11 #include <adf_accel_devices.h> 12 12 #include <adf_admin.h> 13 + #include <adf_bank_state.h> 13 14 #include <adf_cfg.h> 14 15 #include <adf_cfg_services.h> 15 16 #include <adf_clock.h> ··· 843 842 hw_data->disable_iov = adf_disable_sriov; 844 843 hw_data->ring_pair_reset = ring_pair_reset; 845 844 hw_data->dev_config = dev_config; 845 + hw_data->bank_state_save = adf_bank_state_save; 846 + hw_data->bank_state_restore = adf_bank_state_restore; 846 847 hw_data->get_hb_clock = get_heartbeat_clock; 847 848 hw_data->num_hb_ctrs = ADF_NUM_HB_CNT_PER_AE; 848 849 hw_data->start_timer = adf_timer_start; ··· 856 853 adf_gen6_init_hw_csr_ops(&hw_data->csr_ops); 857 854 adf_gen6_init_pf_pfvf_ops(&hw_data->pfvf_ops); 858 855 adf_gen6_init_dc_ops(&hw_data->dc_ops); 856 + adf_gen6_init_vf_mig_ops(&hw_data->vfmig_ops); 859 857 adf_gen6_init_ras_ops(&hw_data->ras_ops); 860 858 } 861 859
+7
drivers/crypto/intel/qat/qat_common/adf_gen6_shared.c
··· 5 5 #include "adf_gen4_config.h" 6 6 #include "adf_gen4_hw_csr_data.h" 7 7 #include "adf_gen4_pfvf.h" 8 + #include "adf_gen4_vf_mig.h" 8 9 #include "adf_gen6_shared.h" 9 10 10 11 struct adf_accel_dev; ··· 48 47 return adf_no_dev_config(accel_dev); 49 48 } 50 49 EXPORT_SYMBOL_GPL(adf_gen6_no_dev_config); 50 + 51 + void adf_gen6_init_vf_mig_ops(struct qat_migdev_ops *vfmig_ops) 52 + { 53 + adf_gen4_init_vf_mig_ops(vfmig_ops); 54 + } 55 + EXPORT_SYMBOL_GPL(adf_gen6_init_vf_mig_ops);
+2
drivers/crypto/intel/qat/qat_common/adf_gen6_shared.h
··· 4 4 #define ADF_GEN6_SHARED_H_ 5 5 6 6 struct adf_hw_csr_ops; 7 + struct qat_migdev_ops; 7 8 struct adf_accel_dev; 8 9 struct adf_pfvf_ops; 9 10 ··· 13 12 int adf_gen6_cfg_dev_init(struct adf_accel_dev *accel_dev); 14 13 int adf_gen6_comp_dev_config(struct adf_accel_dev *accel_dev); 15 14 int adf_gen6_no_dev_config(struct adf_accel_dev *accel_dev); 15 + void adf_gen6_init_vf_mig_ops(struct qat_migdev_ops *vfmig_ops); 16 16 #endif/* ADF_GEN6_SHARED_H_ */