accel-config: Remove duplicate movdir64b and enqcmd instructions
A message that is not in the archive (sent off-list or not yet received): [email protected]
Dave Jiang
Reviewed-byQuoted 8 lines · Tony Zhu
From: Tony Zhu <tony.zhu(a)intel.com>
There are 2 versions of enqcmd and movdir64b under accel-config test directory. One in
accfg_test.hand one indsa.h. The version indsa.hdoesn't have the "sfence" called before the submit instruction and is wrong for DSA. The version inaccfg_test.his the correct version.Signed-off-by Tony Zhu <tony.zhu(a)intel.com>
Reviewed-by Dave Jiang <dave.jiang(a)intel.com>
Quoted 69 lines
--- test/dsa.c | 2 +- test/dsa.h | 19 +------------------ test/prep.c | 2 +- 3 files changed, 3 insertions(+), 20 deletions(-)test/dsa.c +1
-1@@ -367,7 +367,7 @@ int dsa_enqcmd(struct dsa_context *ctx, struct dsa_hw_desc *hw)int ret =0 ;while (retry_count <3 ) { -if (!enqcmd (hw, ctx->wq_reg)) +if (!enqcmd (ctx->wq_reg, hw))break ;info ("retry\n" );test/dsa.h +1
-18@@ -4,6 +4,7 @@#define __TEST_DSA_H__#include <accfg/libaccel_config.h> #include <linux/idxd.h> +#include "accfg_test.h" #define MAX_PATH_LENGTH 1024@@ -144,24 +145,6 @@ static inline void dbg(const char *msg, ...)va_end (args); } -static inline unsigned char enqcmd (struct dsa_hw_desc *desc, -volatile void *reg) -{ -unsigned char retry; - - asmvolatile (".byte 0xf2, 0x0f, 0x38, 0xf8, 0x02\t\n" -"setz %0\t\n" - :"=r" (retry) :"a" (reg),"d" (desc)); -return retry; -} - -static inline void movdir64b (struct dsa_hw_desc *desc, -volatile void *reg) -{ - asmvolatile (".byte 0x66, 0x0f, 0x38, 0xf8, 0x02\t\n" - : :"a" (reg),"d" (desc)); -} -/* Dump DSA hardware descriptor to log */ static inline void dump_desc (struct dsa_hw_desc *hw) {test/prep.c +1
-1@@ -24,7 +24,7 @@ void dsa_desc_submit(struct dsa_context *ctx, struct dsa_hw_desc *hw)/* use MOVDIR64B for DWQ */ if (ctx->dedicated) -movdir64b (hw, ctx->wq_reg); +movdir64b (ctx->wq_reg, hw);else /* use ENQCMD for SWQ */ if (dsa_enqcmd (ctx, hw))usleep (10000 );