X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fevent%2Fcnxk%2Fcnxk_worker.h;h=7de03f3fbb2d9baaefaddead50a838ad8ea42d07;hb=9d127f44048508612a47d700c95fc979b57b7d74;hp=7891b749df44bd6f46783f1cbc3a0ab80a04972d;hpb=313e884a22fd49acf70c4f4aa4d3c9a97a0ecc11;p=dpdk.git diff --git a/drivers/event/cnxk/cnxk_worker.h b/drivers/event/cnxk/cnxk_worker.h index 7891b749df..7de03f3fbb 100644 --- a/drivers/event/cnxk/cnxk_worker.h +++ b/drivers/event/cnxk/cnxk_worker.h @@ -52,11 +52,11 @@ cnxk_sso_hws_swtag_flush(uint64_t tag_op, uint64_t flush_op) plt_write64(0, flush_op); } -static __rte_always_inline void +static __rte_always_inline uint64_t cnxk_sso_hws_swtag_wait(uintptr_t tag_op) { -#ifdef RTE_ARCH_ARM64 uint64_t swtp; +#ifdef RTE_ARCH_ARM64 asm volatile(PLT_CPU_FEATURE_PREAMBLE " ldr %[swtb], [%[swtp_loc]] \n" @@ -70,31 +70,12 @@ cnxk_sso_hws_swtag_wait(uintptr_t tag_op) : [swtp_loc] "r"(tag_op)); #else /* Wait for the SWTAG/SWTAG_FULL operation */ - while (plt_read64(tag_op) & BIT_ULL(62)) - ; + do { + swtp = plt_read64(tag_op); + } while (swtp & BIT_ULL(62)); #endif -} - -static __rte_always_inline void -cnxk_sso_hws_head_wait(uintptr_t tag_op) -{ -#ifdef RTE_ARCH_ARM64 - uint64_t tag; - asm volatile(" ldr %[tag], [%[tag_op]] \n" - " tbnz %[tag], 35, done%= \n" - " sevl \n" - "rty%=: wfe \n" - " ldr %[tag], [%[tag_op]] \n" - " tbz %[tag], 35, rty%= \n" - "done%=: \n" - : [tag] "=&r"(tag) - : [tag_op] "r"(tag_op)); -#else - /* Wait for the HEAD to be set */ - while (!(plt_read64(tag_op) & BIT_ULL(35))) - ; -#endif + return swtp; } #endif