From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 4770842CA8; Tue, 13 Jun 2023 11:26:03 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DCAD842D0B; Tue, 13 Jun 2023 11:25:59 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 7C97C42C54 for ; Tue, 13 Jun 2023 11:25:58 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 35D56F7I005629 for ; Tue, 13 Jun 2023 02:25:57 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=fUBPnMXGlGplJDLtQfB9S4Kjn7S+J8aO+vhrNFtzYOQ=; b=Sz7wbjCTtU9U2DweMCVS0eSqcccMEZD+so5AmyRhNKDASYxARxwxlGN4lIcRJvuHdsJv f+QkFElXQusn3S7+4Bmod9krZyu+apH2OAuK4lyq1w0MqqzPaPeTJiUrD/GlEe+fYYeA t5H1zb0bX8SpF1gYFkUpEuCVsgqfO9SCZqmbm2JHQgUQbgiZPsGD1w/6TogA3OsPzZ8H SgbJkgP5es7IO4eNRnJxHjfkvzu6QuBaSF5FcS5Vd6Yq7M4YkQS0KjLo6/1swh9wBcRJ fJoO0ZI3yKpMWKkursIiTLjFiNsDlSQqyaaAjIK43hBjJvTDiLwUsYadbpgSFcKZS5xc UA== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3r65023jg2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Tue, 13 Jun 2023 02:25:57 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Tue, 13 Jun 2023 02:25:55 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.48 via Frontend Transport; Tue, 13 Jun 2023 02:25:55 -0700 Received: from MININT-80QBFE8.corp.innovium.com (unknown [10.28.164.122]) by maili.marvell.com (Postfix) with ESMTP id 2E8963F708D; Tue, 13 Jun 2023 02:25:53 -0700 (PDT) From: To: , Pavan Nikhilesh , "Shijith Thotton" CC: Subject: [PATCH v2 2/3] event/cnxk: use local labels in asm intrinsic Date: Tue, 13 Jun 2023 14:55:47 +0530 Message-ID: <20230613092548.1315-2-pbhagavatula@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230613092548.1315-1-pbhagavatula@marvell.com> References: <20230516143752.4941-1-pbhagavatula@marvell.com> <20230613092548.1315-1-pbhagavatula@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-ORIG-GUID: VFil_vA810NcGJN8lW9R7U0WZ8NoZWtR X-Proofpoint-GUID: VFil_vA810NcGJN8lW9R7U0WZ8NoZWtR X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.573,FMLib:17.11.176.26 definitions=2023-06-13_04,2023-06-12_02,2023-05-22_02 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org From: Pavan Nikhilesh Using labels in asm generates them as regular function and shades callstack in tools like gdb or perf. Use local label instead for better visibility. Signed-off-by: Pavan Nikhilesh --- drivers/event/cnxk/cn10k_worker.h | 8 ++--- drivers/event/cnxk/cn9k_worker.h | 25 ++++++++-------- drivers/event/cnxk/cnxk_tim_worker.h | 44 ++++++++++++++-------------- drivers/event/cnxk/cnxk_worker.h | 8 ++--- 4 files changed, 43 insertions(+), 42 deletions(-) diff --git a/drivers/event/cnxk/cn10k_worker.h b/drivers/event/cnxk/cn10k_worker.h index a01894ae10..2af0bb3f9f 100644 --- a/drivers/event/cnxk/cn10k_worker.h +++ b/drivers/event/cnxk/cn10k_worker.h @@ -269,12 +269,12 @@ cn10k_sso_hws_get_work_empty(struct cn10k_sso_hws *ws, struct rte_event *ev, #ifdef RTE_ARCH_ARM64 asm volatile(PLT_CPU_FEATURE_PREAMBLE " ldp %[tag], %[wqp], [%[tag_loc]] \n" - " tbz %[tag], 63, done%= \n" + " tbz %[tag], 63, .Ldone%= \n" " sevl \n" - "rty%=: wfe \n" + ".Lrty%=: wfe \n" " ldp %[tag], %[wqp], [%[tag_loc]] \n" - " tbnz %[tag], 63, rty%= \n" - "done%=: dmb ld \n" + " tbnz %[tag], 63, .Lrty%= \n" + ".Ldone%=: dmb ld \n" : [tag] "=&r"(gw.u64[0]), [wqp] "=&r"(gw.u64[1]) : [tag_loc] "r"(ws->base + SSOW_LF_GWS_WQE0) : "memory"); diff --git a/drivers/event/cnxk/cn9k_worker.h b/drivers/event/cnxk/cn9k_worker.h index ed3b97d7e1..9ddab095ac 100644 --- a/drivers/event/cnxk/cn9k_worker.h +++ b/drivers/event/cnxk/cn9k_worker.h @@ -232,18 +232,19 @@ cn9k_sso_hws_dual_get_work(uint64_t base, uint64_t pair_base, rte_prefetch_non_temporal(dws->lookup_mem); #ifdef RTE_ARCH_ARM64 asm volatile(PLT_CPU_FEATURE_PREAMBLE - "rty%=: \n" + ".Lrty%=: \n" " ldr %[tag], [%[tag_loc]] \n" " ldr %[wqp], [%[wqp_loc]] \n" - " tbnz %[tag], 63, rty%= \n" - "done%=: str %[gw], [%[pong]] \n" + " tbnz %[tag], 63, .Lrty%= \n" + ".Ldone%=: str %[gw], [%[pong]] \n" " dmb ld \n" " sub %[mbuf], %[wqp], #0x80 \n" " prfm pldl1keep, [%[mbuf]] \n" : [tag] "=&r"(gw.u64[0]), [wqp] "=&r"(gw.u64[1]), [mbuf] "=&r"(mbuf) : [tag_loc] "r"(base + SSOW_LF_GWS_TAG), - [wqp_loc] "r"(base + SSOW_LF_GWS_WQP), [gw] "r"(dws->gw_wdata), + [wqp_loc] "r"(base + SSOW_LF_GWS_WQP), + [gw] "r"(dws->gw_wdata), [pong] "r"(pair_base + SSOW_LF_GWS_OP_GET_WORK0)); #else gw.u64[0] = plt_read64(base + SSOW_LF_GWS_TAG); @@ -282,13 +283,13 @@ cn9k_sso_hws_get_work(struct cn9k_sso_hws *ws, struct rte_event *ev, asm volatile(PLT_CPU_FEATURE_PREAMBLE " ldr %[tag], [%[tag_loc]] \n" " ldr %[wqp], [%[wqp_loc]] \n" - " tbz %[tag], 63, done%= \n" + " tbz %[tag], 63, .Ldone%= \n" " sevl \n" - "rty%=: wfe \n" + ".Lrty%=: wfe \n" " ldr %[tag], [%[tag_loc]] \n" " ldr %[wqp], [%[wqp_loc]] \n" - " tbnz %[tag], 63, rty%= \n" - "done%=: dmb ld \n" + " tbnz %[tag], 63, .Lrty%= \n" + ".Ldone%=: dmb ld \n" " sub %[mbuf], %[wqp], #0x80 \n" " prfm pldl1keep, [%[mbuf]] \n" : [tag] "=&r"(gw.u64[0]), [wqp] "=&r"(gw.u64[1]), @@ -330,13 +331,13 @@ cn9k_sso_hws_get_work_empty(uint64_t base, struct rte_event *ev, asm volatile(PLT_CPU_FEATURE_PREAMBLE " ldr %[tag], [%[tag_loc]] \n" " ldr %[wqp], [%[wqp_loc]] \n" - " tbz %[tag], 63, done%= \n" + " tbz %[tag], 63, .Ldone%= \n" " sevl \n" - "rty%=: wfe \n" + ".Lrty%=: wfe \n" " ldr %[tag], [%[tag_loc]] \n" " ldr %[wqp], [%[wqp_loc]] \n" - " tbnz %[tag], 63, rty%= \n" - "done%=: dmb ld \n" + " tbnz %[tag], 63, .Lrty%= \n" + ".Ldone%=: dmb ld \n" " sub %[mbuf], %[wqp], #0x80 \n" : [tag] "=&r"(gw.u64[0]), [wqp] "=&r"(gw.u64[1]), [mbuf] "=&r"(mbuf) diff --git a/drivers/event/cnxk/cnxk_tim_worker.h b/drivers/event/cnxk/cnxk_tim_worker.h index 8fafb8f09c..f0857f26ba 100644 --- a/drivers/event/cnxk/cnxk_tim_worker.h +++ b/drivers/event/cnxk/cnxk_tim_worker.h @@ -262,12 +262,12 @@ cnxk_tim_add_entry_sp(struct cnxk_tim_ring *const tim_ring, #ifdef RTE_ARCH_ARM64 asm volatile(PLT_CPU_FEATURE_PREAMBLE " ldxr %[hbt], [%[w1]] \n" - " tbz %[hbt], 33, dne%= \n" + " tbz %[hbt], 33, .Ldne%= \n" " sevl \n" - "rty%=: wfe \n" + ".Lrty%=: wfe \n" " ldxr %[hbt], [%[w1]] \n" - " tbnz %[hbt], 33, rty%= \n" - "dne%=: \n" + " tbnz %[hbt], 33, .Lrty%=\n" + ".Ldne%=: \n" : [hbt] "=&r"(hbt_state) : [w1] "r"((&bkt->w1)) : "memory"); @@ -345,12 +345,12 @@ cnxk_tim_add_entry_mp(struct cnxk_tim_ring *const tim_ring, #ifdef RTE_ARCH_ARM64 asm volatile(PLT_CPU_FEATURE_PREAMBLE " ldxr %[hbt], [%[w1]] \n" - " tbz %[hbt], 33, dne%= \n" + " tbz %[hbt], 33, .Ldne%= \n" " sevl \n" - "rty%=: wfe \n" + ".Lrty%=: wfe \n" " ldxr %[hbt], [%[w1]] \n" - " tbnz %[hbt], 33, rty%= \n" - "dne%=: \n" + " tbnz %[hbt], 33, .Lrty%=\n" + ".Ldne%=: \n" : [hbt] "=&r"(hbt_state) : [w1] "r"((&bkt->w1)) : "memory"); @@ -374,13 +374,13 @@ cnxk_tim_add_entry_mp(struct cnxk_tim_ring *const tim_ring, cnxk_tim_bkt_dec_lock(bkt); #ifdef RTE_ARCH_ARM64 asm volatile(PLT_CPU_FEATURE_PREAMBLE - " ldxr %[rem], [%[crem]] \n" - " tbz %[rem], 63, dne%= \n" + " ldxr %[rem], [%[crem]] \n" + " tbz %[rem], 63, .Ldne%= \n" " sevl \n" - "rty%=: wfe \n" - " ldxr %[rem], [%[crem]] \n" - " tbnz %[rem], 63, rty%= \n" - "dne%=: \n" + ".Lrty%=: wfe \n" + " ldxr %[rem], [%[crem]] \n" + " tbnz %[rem], 63, .Lrty%= \n" + ".Ldne%=: \n" : [rem] "=&r"(rem) : [crem] "r"(&bkt->w1) : "memory"); @@ -478,12 +478,12 @@ cnxk_tim_add_entry_brst(struct cnxk_tim_ring *const tim_ring, #ifdef RTE_ARCH_ARM64 asm volatile(PLT_CPU_FEATURE_PREAMBLE " ldxr %[hbt], [%[w1]] \n" - " tbz %[hbt], 33, dne%= \n" + " tbz %[hbt], 33, .Ldne%= \n" " sevl \n" - "rty%=: wfe \n" + ".Lrty%=: wfe \n" " ldxr %[hbt], [%[w1]] \n" - " tbnz %[hbt], 33, rty%= \n" - "dne%=: \n" + " tbnz %[hbt], 33, .Lrty%=\n" + ".Ldne%=: \n" : [hbt] "=&r"(hbt_state) : [w1] "r"((&bkt->w1)) : "memory"); @@ -510,13 +510,13 @@ cnxk_tim_add_entry_brst(struct cnxk_tim_ring *const tim_ring, asm volatile(PLT_CPU_FEATURE_PREAMBLE " ldxrb %w[lock_cnt], [%[lock]] \n" " tst %w[lock_cnt], 255 \n" - " beq dne%= \n" + " beq .Ldne%= \n" " sevl \n" - "rty%=: wfe \n" + ".Lrty%=: wfe \n" " ldxrb %w[lock_cnt], [%[lock]] \n" " tst %w[lock_cnt], 255 \n" - " bne rty%= \n" - "dne%=: \n" + " bne .Lrty%= \n" + ".Ldne%=: \n" : [lock_cnt] "=&r"(lock_cnt) : [lock] "r"(&bkt->lock) : "memory"); diff --git a/drivers/event/cnxk/cnxk_worker.h b/drivers/event/cnxk/cnxk_worker.h index 22d90afba2..2bd41f8a5e 100644 --- a/drivers/event/cnxk/cnxk_worker.h +++ b/drivers/event/cnxk/cnxk_worker.h @@ -71,12 +71,12 @@ cnxk_sso_hws_swtag_wait(uintptr_t tag_op) asm volatile(PLT_CPU_FEATURE_PREAMBLE " ldr %[swtb], [%[swtp_loc]] \n" - " tbz %[swtb], 62, done%= \n" + " tbz %[swtb], 62, .Ldone%= \n" " sevl \n" - "rty%=: wfe \n" + ".Lrty%=: wfe \n" " ldr %[swtb], [%[swtp_loc]] \n" - " tbnz %[swtb], 62, rty%= \n" - "done%=: \n" + " tbnz %[swtb], 62, .Lrty%= \n" + ".Ldone%=: \n" : [swtb] "=&r"(swtp) : [swtp_loc] "r"(tag_op)); #else -- 2.25.1