From: Wathsala Vithanage <wathsala.vithanage@arm.com>
To: Thomas Monjalon <thomas@monjalon.net>,
Ruifeng Wang <ruifeng.wang@arm.com>
Cc: honnappa.nagarahalli@arm.com, dev@dpdk.org,
Wathsala Vithanage <wathsala.vithanage@arm.com>,
Dhruv Tripathi <dhruv.tripathi@arm.com>
Subject: [PATCH v4 1/4] eal: expand the availability of WFE and related instructions
Date: Fri, 26 Jul 2024 17:15:24 +0000 [thread overview]
Message-ID: <20240726171528.2245682-1-wathsala.vithanage@arm.com> (raw)
In-Reply-To: <20240604044401.3577707-1-wathsala.vithanage@arm.com>
The availability of __RTE_ARM_WFE, __RTE_ARM_SEV, __RTE_ARM_SEVL,
and __RTE_ARM_LOAD_EXC_* macros for other applications, such as
PMD power management, should not depend on the choice of use of
these instructions in rte_wait_until_equal_N functions.
Therefore, this patch moves these macros out of control of the
RTE_WAIT_UNTIL_EQUAL_ARCH_DEFINED macro.
Signed-off-by: Wathsala Vithanage <wathsala.vithanage@arm.com>
Reviewed-by: Dhruv Tripathi <dhruv.tripathi@arm.com>
---
.mailmap | 1 +
lib/eal/arm/include/rte_pause_64.h | 4 ++--
lib/eal/arm/rte_cpuflags.c | 4 ++--
lib/eal/arm/rte_power_intrinsics.c | 9 ++++-----
4 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/.mailmap b/.mailmap
index f1e64286a1..9c28b74655 100644
--- a/.mailmap
+++ b/.mailmap
@@ -338,6 +338,7 @@ Dexia Li <dexia.li@jaguarmicro.com>
Dexuan Cui <decui@microsoft.com>
Dharmik Thakkar <dharmikjayesh.thakkar@arm.com> <dharmik.thakkar@arm.com>
Dheemanth Mallikarjun <dheemanthm@vmware.com>
+Dhruv Tripathi <dhruv.tripathi@arm.com>
Diana Wang <na.wang@corigine.com>
Didier Pallard <didier.pallard@6wind.com>
Dilshod Urazov <dilshod.urazov@oktetlabs.ru>
diff --git a/lib/eal/arm/include/rte_pause_64.h b/lib/eal/arm/include/rte_pause_64.h
index 9e2dbf3531..8224f09ba7 100644
--- a/lib/eal/arm/include/rte_pause_64.h
+++ b/lib/eal/arm/include/rte_pause_64.h
@@ -24,8 +24,6 @@ static inline void rte_pause(void)
asm volatile("yield" ::: "memory");
}
-#ifdef RTE_WAIT_UNTIL_EQUAL_ARCH_DEFINED
-
/* Send a local event to quit WFE. */
#define __RTE_ARM_SEVL() { asm volatile("sevl" : : : "memory"); }
@@ -148,6 +146,8 @@ static inline void rte_pause(void)
__RTE_ARM_LOAD_EXC_128(src, dst, memorder) \
}
+#ifdef RTE_WAIT_UNTIL_EQUAL_ARCH_DEFINED
+
static __rte_always_inline void
rte_wait_until_equal_16(volatile uint16_t *addr, uint16_t expected,
rte_memory_order memorder)
diff --git a/lib/eal/arm/rte_cpuflags.c b/lib/eal/arm/rte_cpuflags.c
index 7ba4f8ba97..29884c285f 100644
--- a/lib/eal/arm/rte_cpuflags.c
+++ b/lib/eal/arm/rte_cpuflags.c
@@ -163,7 +163,7 @@ void
rte_cpu_get_intrinsics_support(struct rte_cpu_intrinsics *intrinsics)
{
memset(intrinsics, 0, sizeof(*intrinsics));
-#ifdef RTE_ARM_USE_WFE
+#ifdef RTE_ARCH_64
intrinsics->power_monitor = 1;
-#endif
+#endif /* RTE_ARCH_64 */
}
diff --git a/lib/eal/arm/rte_power_intrinsics.c b/lib/eal/arm/rte_power_intrinsics.c
index f54cf59e80..b0056cce8b 100644
--- a/lib/eal/arm/rte_power_intrinsics.c
+++ b/lib/eal/arm/rte_power_intrinsics.c
@@ -17,7 +17,7 @@ rte_power_monitor(const struct rte_power_monitor_cond *pmc,
{
RTE_SET_USED(tsc_timestamp);
-#ifdef RTE_ARM_USE_WFE
+#ifdef RTE_ARCH_64
const unsigned int lcore_id = rte_lcore_id();
uint64_t cur_value;
@@ -57,7 +57,7 @@ rte_power_monitor(const struct rte_power_monitor_cond *pmc,
RTE_SET_USED(pmc);
return -ENOTSUP;
-#endif
+#endif /* RTE_ARCH_64 */
}
/**
@@ -81,13 +81,12 @@ rte_power_monitor_wakeup(const unsigned int lcore_id)
{
RTE_SET_USED(lcore_id);
-#ifdef RTE_ARM_USE_WFE
+#ifdef RTE_ARCH_64
__RTE_ARM_SEV()
-
return 0;
#else
return -ENOTSUP;
-#endif
+#endif /* RTE_ARCH_64 */
}
int
--
2.34.1
next prev parent reply other threads:[~2024-07-26 17:16 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-04 4:44 [PATCH 1/2] config/arm: adds Arm Neoverse N3 SoC Wathsala Vithanage
2024-06-04 4:44 ` [PATCH 2/2] eal: add Arm WFET in power management intrinsics Wathsala Vithanage
2024-06-04 15:41 ` Stephen Hemminger
2024-06-19 6:45 ` [PATCH v2 1/2] config/arm: adds Arm Neoverse N3 SoC Wathsala Vithanage
2024-06-19 6:45 ` [PATCH v2 2/2] eal: add Arm WFET in power management intrinsics Wathsala Vithanage
2024-06-27 15:30 ` Thomas Monjalon
2024-07-01 21:34 ` Wathsala Wathawana Vithanage
2024-07-02 8:29 ` Thomas Monjalon
2024-07-03 13:27 ` Wathsala Wathawana Vithanage
2024-07-03 13:33 ` Thomas Monjalon
2024-07-03 16:58 ` Wathsala Wathawana Vithanage
2024-07-04 10:55 ` Pavan Nikhilesh Bhagavatula
2024-07-04 14:14 ` Thomas Monjalon
2024-07-04 14:55 ` Stephen Hemminger
2024-07-04 18:59 ` Thomas Monjalon
2024-07-05 16:10 ` [EXTERNAL] " Pavan Nikhilesh Bhagavatula
2024-07-07 17:37 ` [EXTERNAL] " Honnappa Nagarahalli
2024-07-05 16:01 ` Wathsala Wathawana Vithanage
2024-07-05 16:11 ` Pavan Nikhilesh Bhagavatula
2024-07-05 16:25 ` Wathsala Wathawana Vithanage
2024-07-03 16:19 ` Wathsala Wathawana Vithanage
2024-07-15 22:53 ` [PATCH v3 1/4] eal: expand the availability of WFE and related instructions Wathsala Vithanage
2024-07-15 22:53 ` [PATCH v3 2/4] config/arm: adds Arm Neoverse N3 SoC Wathsala Vithanage
2024-07-16 1:52 ` Honnappa Nagarahalli
2024-07-15 22:53 ` [PATCH v3 3/4] eal: add Arm WFET in power management intrinsics Wathsala Vithanage
2024-07-15 22:53 ` [PATCH v3 4/4] eal: describe Arm CPU features including WFXT Wathsala Vithanage
2024-07-16 1:02 ` Honnappa Nagarahalli
2024-07-26 17:15 ` Wathsala Vithanage [this message]
2024-07-26 17:15 ` [PATCH v4 2/4] config/arm: adds Arm Neoverse N3 SoC Wathsala Vithanage
2024-07-26 17:15 ` [PATCH v4 3/4] eal: add Arm WFET in power management intrinsics Wathsala Vithanage
2024-10-10 17:01 ` Thomas Monjalon
2024-07-26 17:15 ` [PATCH v4 4/4] eal: describe Arm CPU features including WFXT Wathsala Vithanage
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240726171528.2245682-1-wathsala.vithanage@arm.com \
--to=wathsala.vithanage@arm.com \
--cc=dev@dpdk.org \
--cc=dhruv.tripathi@arm.com \
--cc=honnappa.nagarahalli@arm.com \
--cc=ruifeng.wang@arm.com \
--cc=thomas@monjalon.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).