Thread (20 messages) 20 messages, 6 authors, 2021-07-29

Re: [dpdk-dev] [PATCH] config/arm: add ability to express arch extensions

From: Jerin Jacob <hidden>
Date: 2021-05-05 12:27:21

On Wed, May 5, 2021 at 5:44 PM [off-list ref] wrote:
From: Pavan Nikhilesh <redacted>

The ARM architecture allows SoCs to have extensions in addition
to base profiles such as Large System Extension (LSE), CRC etc.

Add ability to declare SoC specific extensions.

Signed-off-by: Pavan Nikhilesh <redacted>

Acked-by: Jerin Jacob <redacted>


quoted hunk ↗ jump to hunk
---

 More details about ARM extensions
 https://developer.arm.com/documentation/102378/0200

 config/arm/meson.build | 8 ++++++++
 1 file changed, 8 insertions(+)
diff --git a/config/arm/meson.build b/config/arm/meson.build
index 22cd81319..8aa961e5b 100644
--- a/config/arm/meson.build
+++ b/config/arm/meson.build
@@ -230,6 +230,7 @@ soc_cn10k = {
         ['RTE_MAX_LCORE', 24],
         ['RTE_MAX_NUMA_NODES', 1]
     ],
+    'extensions' : ['lse', 'crc'],
     'part_number': '0xd49',
     'numa': false
 }
@@ -387,6 +388,7 @@ else
     endif

     soc_flags = []
+    soc_extensions = []
     if soc_config.has_key('not_supported')
         error('SoC @0@ not supported.'.format(soc))
     elif soc_config != {}
@@ -394,6 +396,7 @@ else
         implementer_config = implementers[implementer_id]
         part_number = soc_config['part_number']
         soc_flags = soc_config.get('flags', [])
+        soc_extensions = soc_config.get('extensions', [])
         if not soc_config.get('numa', true)
             has_libnuma = 0
         endif
@@ -431,6 +434,11 @@ else
     # apply supported machine args
     machine_args = [] # Clear previous machine args
     foreach flag: part_number_config['machine_args']
+        if flag.startswith('-march') and soc_extensions.length() != 0
+            foreach ex: soc_extensions
+                flag += '+' + ex
+            endforeach
+        endif
         if cc.has_argument(flag)
             machine_args += flag
         endif
--
2.17.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help