]> www.infradead.org Git - nvme.git/commitdiff
crypto: qat - relocate and rename 4xxx PF2VM definitions
authorXin Zeng <xin.zeng@intel.com>
Wed, 6 Mar 2024 13:58:47 +0000 (21:58 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Tue, 2 Apr 2024 02:47:43 +0000 (10:47 +0800)
Move and rename ADF_4XXX_PF2VM_OFFSET and ADF_4XXX_VM2PF_OFFSET to
ADF_GEN4_PF2VM_OFFSET and ADF_GEN4_VM2PF_OFFSET respectively.
These definitions are moved from adf_gen4_pfvf.c to adf_gen4_hw_data.h
as they are specific to GEN4 and not just to qat_4xxx.

This change is made in anticipation of their use in live migration.

This does not introduce any functional change.

Signed-off-by: Xin Zeng <xin.zeng@intel.com>
Reviewed-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/intel/qat/qat_common/adf_gen4_hw_data.h
drivers/crypto/intel/qat/qat_common/adf_gen4_pfvf.c

index c6e80df5a85a337c6fb6a3fa383fec3ac849c748..c153f41162ec1c872007220a8eca3120ac0bdbae 100644 (file)
@@ -197,6 +197,10 @@ do { \
 /* Arbiter threads mask with error value */
 #define ADF_GEN4_ENA_THD_MASK_ERROR    GENMASK(ADF_NUM_THREADS_PER_AE, 0)
 
+/* PF2VM communication channel */
+#define ADF_GEN4_PF2VM_OFFSET(i)       (0x40B010 + (i) * 0x20)
+#define ADF_GEN4_VM2PF_OFFSET(i)       (0x40B014 + (i) * 0x20)
+
 void adf_gen4_set_ssm_wdtimer(struct adf_accel_dev *accel_dev);
 
 enum icp_qat_gen4_slice_mask {
index 8e8efe93f3ee5c99ea6590e4fd9037090d55d8ae..21474d402d09dee26eda833d1d7db2bf853c1e47 100644 (file)
@@ -6,12 +6,10 @@
 #include "adf_accel_devices.h"
 #include "adf_common_drv.h"
 #include "adf_gen4_pfvf.h"
+#include "adf_gen4_hw_data.h"
 #include "adf_pfvf_pf_proto.h"
 #include "adf_pfvf_utils.h"
 
-#define ADF_4XXX_PF2VM_OFFSET(i)       (0x40B010 + ((i) * 0x20))
-#define ADF_4XXX_VM2PF_OFFSET(i)       (0x40B014 + ((i) * 0x20))
-
 /* VF2PF interrupt source registers */
 #define ADF_4XXX_VM2PF_SOU             0x41A180
 #define ADF_4XXX_VM2PF_MSK             0x41A1C0
@@ -29,12 +27,12 @@ static const struct pfvf_csr_format csr_gen4_fmt = {
 
 static u32 adf_gen4_pf_get_pf2vf_offset(u32 i)
 {
-       return ADF_4XXX_PF2VM_OFFSET(i);
+       return ADF_GEN4_PF2VM_OFFSET(i);
 }
 
 static u32 adf_gen4_pf_get_vf2pf_offset(u32 i)
 {
-       return ADF_4XXX_VM2PF_OFFSET(i);
+       return ADF_GEN4_VM2PF_OFFSET(i);
 }
 
 static void adf_gen4_enable_vf2pf_interrupts(void __iomem *pmisc_addr, u32 vf_mask)