Skip to contentSkip to conversation

Add tune for Neoverse N2 core

PATCH New Kevin Hao 1 participant 3 messages Jan 15, 2022

lore
Share & tools
lore

Kevin Hao

author
#0 lore raw

cover Add tune for Neoverse N2 core

Hi,

The gcc patches for the Neoverse N2 core have been merged into hardknott branch, this patch series backport two patches from the master branch to add the corresponding tune files.

Kevin Hao (2):
arch-armv8-5a.inc: Add tune include for armv8.5a armv9a/tune: Add the support for the Neoverse N2 core

 .../machine/include/arm/arch-armv8-5a.inc     | 19 ++++++++++++++++
 .../include/arm/armv9a/tune-neoversen2.inc    | 22 +++++++++++++++++++
 2 files changed, 41 insertions(+)
 create mode 100644 meta/conf/machine/include/arm/arch-armv8-5a.inc
 create mode 100644 meta/conf/machine/include/arm/armv9a/tune-neoversen2.inc
Signature · 1 line
2.31.1
author
#1 lore raw

PATCH 1/2 arch-armv8-5a.inc: Add tune include for armv8.5a

This adds support for the armv8.5a architecture and the crypto extension.

(From OE-Core rev: 0cb1a6d9cb4c32526d79dad93c8053b3793053f8)

[Kevin: Convert to the old style override syntax]
---
 .../machine/include/arm/arch-armv8-5a.inc     | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
 create mode 100644 meta/conf/machine/include/arm/arch-armv8-5a.inc
meta/conf/machine/include/arm/arch-armv8-5a.inc new file +19 -0
new file mode 100644
index 000000000000..44c3b5bd2275
@@ -0,0 +1,19 @@
+DEFAULTTUNE ?= "armv8-5a"
+
+TUNEVALID[armv8-5a] = "Enable instructions for ARMv8.5-a"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'armv8-5a', ' -march=armv8.5-a', '', d)}"
+# TUNE crypto will be handled by arch-armv8a.inc below
+MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'armv8-5a', 'armv8-5a:', '', d)}"
+
+require conf/machine/include/arm/arch-armv8a.inc
+
+# Little Endian base configs
+AVAILTUNES += "armv8-5a armv8-5a-crypto"
+ARMPKGARCH_tune-armv8-5a                    ?= "armv8-5a"
+ARMPKGARCH_tune-armv8-5a-crypto             ?= "armv8-5a"
+TUNE_FEATURES_tune-armv8-5a                  = "aarch64 armv8-5a"
+TUNE_FEATURES_tune-armv8-5a-crypto           = "${TUNE_FEATURES_tune-armv8-5a} crypto"
+PACKAGE_EXTRA_ARCHS_tune-armv8-5a            = "${PACKAGE_EXTRA_ARCHS_tune-armv8a} armv8-5a"
+PACKAGE_EXTRA_ARCHS_tune-armv8-5a-crypto     = "${PACKAGE_EXTRA_ARCHS_tune-armv8-5a} armv8-5a-crypto"
+BASE_LIB_tune-armv8-5a                       = "lib64"
+BASE_LIB_tune-armv8-5a-crypto                = "lib64"
Signature · 1 line
2.31.1
author
#2 lore raw

PATCH 2/2 armv9a/tune: Add the support for the Neoverse N2 core

In reply to Kevin Hao

This adds the support for the Neoverse N2 core, even though the Neoverse N2 core implements the Arm v9.0-A architecture, but the support of it in GCC is based on the Arm v8.5-A architecture. Please see the commit 50d9db203bc3 ("aarch64: Add support for Neoverse N2 CPU") in GCC for more detail.

(From OE-Core rev: 37597397f03b6b0082a702147dc536ff8b2fa7a3)

[Kevin: Convert to the old style override syntax]
---
 .../include/arm/armv9a/tune-neoversen2.inc    | 22 +++++++++++++++++++
 1 file changed, 22 insertions(+)
 create mode 100644 meta/conf/machine/include/arm/armv9a/tune-neoversen2.inc
meta/conf/machine/include/arm/armv9a/tune-neoversen2.inc new file +22 -0
new file mode 100644
index 000000000000..dedabcf46e23
@@ -0,0 +1,22 @@
+#
+# Tune Settings for Neoverse-N2
+#
+DEFAULTTUNE ?= "neoversen2"
+
+TUNEVALID[neoversen2] = "Enable Neoverse-N2 specific processor optimizations"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'neoversen2', ' -mcpu=neoverse-n2', '', d)}"
+
+# Even though the Neoverse N2 core implemnts the Arm v9.0-A architecture,
+# but the support of it in GCC is based on the Arm v8.5-A architecture.
+require conf/machine/include/arm/arch-armv8-5a.inc
+
+# Little Endian base configs
+AVAILTUNES                                         += "neoversen2 neoversen2-crypto"
+ARMPKGARCH_tune-neoversen2                          = "neoversen2"
+ARMPKGARCH_tune-neoversen2-crypto                   = "neoversen2-crypto"
+TUNE_FEATURES_tune-neoversen2                       = "${TUNE_FEATURES_tune-armv8-5a} neoversen2"
+TUNE_FEATURES_tune-neoversen2-crypto                = "${TUNE_FEATURES_tune-neoversen2} crypto"
+PACKAGE_EXTRA_ARCHS_tune-neoversen2                 = "${PACKAGE_EXTRA_ARCHS_tune-armv8-5a} neoversen2"
+PACKAGE_EXTRA_ARCHS_tune-neoversen2-crypto          = "${PACKAGE_EXTRA_ARCHS_tune-armv8-5a-crypto} neoversen2 neoversen2-crypto"
+BASE_LIB_tune-neoversen2                            = "lib64"
+BASE_LIB_tune-neoversen2-crypto                     = "lib64"
Signature · 1 line
2.31.1