[v2] config/arm: support ldapr on neoverse n1

Message ID 20230321094433.736943-1-joyce.kong@arm.com (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers
Series [v2] config/arm: support ldapr on neoverse n1 |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/intel-Functional fail Functional issues
ci/iol-testing warning apply patch failure

Commit Message

Joyce Kong March 21, 2023, 9:44 a.m. UTC
  Armv8.3 introduced a LDAPR instruction that has weaker guarantees,
just sufficient to implement memory_order_acq_rel. LDAPR does not
wait for previous STLR to complete. And if the same location is
used in both, it does not force the write to be globally observed.
The new instruction can avoid some costs associated with LDAR.

GCC13.0 has supported LDAPR.
For Armv8.3 and higher, LDAPR is default.
For Armv8.2 such as neoverse n1, LDAPR is supported with enabling
rcpc feature.
For Armv8.1 and lower, LDAPR is not supported.

Signed-off-by: Joyce Kong <joyce.kong@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
---
 config/arm/meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Thomas Monjalon March 21, 2023, 11:16 a.m. UTC | #1
21/03/2023 10:44, Joyce Kong:
> Armv8.3 introduced a LDAPR instruction that has weaker guarantees,
> just sufficient to implement memory_order_acq_rel. LDAPR does not
> wait for previous STLR to complete. And if the same location is
> used in both, it does not force the write to be globally observed.
> The new instruction can avoid some costs associated with LDAR.
> 
> GCC13.0 has supported LDAPR.
> For Armv8.3 and higher, LDAPR is default.
> For Armv8.2 such as neoverse n1, LDAPR is supported with enabling
> rcpc feature.
> For Armv8.1 and lower, LDAPR is not supported.
> 
> Signed-off-by: Joyce Kong <joyce.kong@arm.com>
> Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>

Applied, thanks.
  

Patch

diff --git a/config/arm/meson.build b/config/arm/meson.build
index 5ff66248de..5213434ca4 100644
--- a/config/arm/meson.build
+++ b/config/arm/meson.build
@@ -65,7 +65,7 @@  part_number_config_arm = {
     '0xd0b': {'compiler_options':  ['-mcpu=cortex-a76']},
     '0xd0c': {
         'march': 'armv8.2-a',
-        'march_features': ['crypto'],
+        'march_features': ['crypto', 'rcpc'],
         'compiler_options':  ['-mcpu=neoverse-n1'],
         'flags': [
             ['RTE_MACHINE', '"neoverse-n1"'],