config/arm: fix Neoverse N2 march flag

Message ID 20230608072757.9513-1-pbhagavatula@marvell.com (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers
Series config/arm: fix Neoverse N2 march flag |

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/github-robot: build success github build: passed
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-unit-testing success Testing PASS
ci/iol-aarch-unit-testing success Testing PASS
ci/iol-testing success Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS
ci/iol-abi-testing success Testing PASS

Commit Message

Pavan Nikhilesh Bhagavatula June 8, 2023, 7:27 a.m. UTC
  From: Pavan Nikhilesh <pbhagavatula@marvell.com>

The -march flag of Neoverse N2 should be `armv9-a` when
used along with -mcpu=neoverse-n2.

Fixes: ea85ed1f6882 ("config/arm: increase nodes and cores for Neoverse N2")

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
---
 config/arm/meson.build | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
  

Comments

Srikanth Yalavarthi June 8, 2023, 9:54 a.m. UTC | #1
On Thu, Jun 8, 2023 at 12:58 PM <pbhagavatula@marvell.com> wrote:
>
> From: Pavan Nikhilesh <pbhagavatula@marvell.com>
>
> The -march flag of Neoverse N2 should be `armv9-a` when
> used along with -mcpu=neoverse-n2.
>
> Fixes: ea85ed1f6882 ("config/arm: increase nodes and cores for Neoverse N2")
>
> Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Tested-by: Srikanth Yalavarthi <syalavarthi@marvell.com>

> ---
>  config/arm/meson.build | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/config/arm/meson.build b/config/arm/meson.build
> index 43f6a551a2..d3b4b4917f 100644
> --- a/config/arm/meson.build
> +++ b/config/arm/meson.build
> @@ -89,7 +89,7 @@ part_number_config_arm = {
>          'march': 'armv8.4-a',
>      },
>      '0xd49': {
> -        'march': 'armv8.5-a',
> +        'march': 'armv9-a',
>          'march_features': ['sve2'],
>          'compiler_options': ['-mcpu=neoverse-n2'],
>          'flags': [
> @@ -630,7 +630,7 @@ if update_flags
>      # probe supported archs and their features
>      candidate_march = ''
>      if part_number_config.has_key('march')
> -        supported_marchs = ['armv8.6-a', 'armv8.5-a', 'armv8.4-a', 'armv8.3-a',
> +        supported_marchs = ['armv9-a', 'armv8.6-a', 'armv8.5-a', 'armv8.4-a', 'armv8.3-a',
>                              'armv8.2-a', 'armv8.1-a', 'armv8-a']
>          check_compiler_support = false
>          foreach supported_march: supported_marchs
> --
> 2.25.1
>
  
Ruifeng Wang June 8, 2023, 10:41 a.m. UTC | #2
> -----Original Message-----
> From: pbhagavatula@marvell.com <pbhagavatula@marvell.com>
> Sent: Thursday, June 8, 2023 3:28 PM
> To: jerinj@marvell.com; Ruifeng Wang <Ruifeng.Wang@arm.com>; Bruce Richardson
> <bruce.richardson@intel.com>
> Cc: dev@dpdk.org; Pavan Nikhilesh <pbhagavatula@marvell.com>
> Subject: [PATCH] config/arm: fix Neoverse N2 march flag
> 
> From: Pavan Nikhilesh <pbhagavatula@marvell.com>
> 
> The -march flag of Neoverse N2 should be `armv9-a` when used along with -mcpu=neoverse-n2.
> 
> Fixes: ea85ed1f6882 ("config/arm: increase nodes and cores for Neoverse N2")
> 
> Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
> ---
>  config/arm/meson.build | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/config/arm/meson.build b/config/arm/meson.build index 43f6a551a2..d3b4b4917f
> 100644
> --- a/config/arm/meson.build
> +++ b/config/arm/meson.build
> @@ -89,7 +89,7 @@ part_number_config_arm = {
>          'march': 'armv8.4-a',
>      },
>      '0xd49': {
> -        'march': 'armv8.5-a',
> +        'march': 'armv9-a',
>          'march_features': ['sve2'],
>          'compiler_options': ['-mcpu=neoverse-n2'],
>          'flags': [
> @@ -630,7 +630,7 @@ if update_flags
>      # probe supported archs and their features
>      candidate_march = ''
>      if part_number_config.has_key('march')
> -        supported_marchs = ['armv8.6-a', 'armv8.5-a', 'armv8.4-a', 'armv8.3-a',
> +        supported_marchs = ['armv9-a', 'armv8.6-a', 'armv8.5-a',

march may fallback to armv8.6-a if compiler doesn't support armv9-a. Is this fallback safe?
I think just remove march from N2 part_number_config is OK. 

> + 'armv8.4-a', 'armv8.3-a',
>                              'armv8.2-a', 'armv8.1-a', 'armv8-a']
>          check_compiler_support = false
>          foreach supported_march: supported_marchs
> --
> 2.25.1
  
Pavan Nikhilesh Bhagavatula June 8, 2023, 12:58 p.m. UTC | #3
> -----Original Message-----
> From: Ruifeng Wang <Ruifeng.Wang@arm.com>
> Sent: Thursday, June 8, 2023 4:12 PM
> To: Pavan Nikhilesh Bhagavatula <pbhagavatula@marvell.com>; Jerin Jacob
> Kollanukkaran <jerinj@marvell.com>; Bruce Richardson
> <bruce.richardson@intel.com>
> Cc: dev@dpdk.org; Juraj Linkeš <juraj.linkes@pantheon.tech>; nd
> <nd@arm.com>
> Subject: [EXT] RE: [PATCH] config/arm: fix Neoverse N2 march flag
> 
> External Email
> 
> ----------------------------------------------------------------------
> > -----Original Message-----
> > From: pbhagavatula@marvell.com <pbhagavatula@marvell.com>
> > Sent: Thursday, June 8, 2023 3:28 PM
> > To: jerinj@marvell.com; Ruifeng Wang <Ruifeng.Wang@arm.com>; Bruce
> Richardson
> > <bruce.richardson@intel.com>
> > Cc: dev@dpdk.org; Pavan Nikhilesh <pbhagavatula@marvell.com>
> > Subject: [PATCH] config/arm: fix Neoverse N2 march flag
> >
> > From: Pavan Nikhilesh <pbhagavatula@marvell.com>
> >
> > The -march flag of Neoverse N2 should be `armv9-a` when used along with
> -mcpu=neoverse-n2.
> >
> > Fixes: ea85ed1f6882 ("config/arm: increase nodes and cores for Neoverse
> N2")
> >
> > Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
> > ---
> >  config/arm/meson.build | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/config/arm/meson.build b/config/arm/meson.build index
> 43f6a551a2..d3b4b4917f
> > 100644
> > --- a/config/arm/meson.build
> > +++ b/config/arm/meson.build
> > @@ -89,7 +89,7 @@ part_number_config_arm = {
> >          'march': 'armv8.4-a',
> >      },
> >      '0xd49': {
> > -        'march': 'armv8.5-a',
> > +        'march': 'armv9-a',
> >          'march_features': ['sve2'],
> >          'compiler_options': ['-mcpu=neoverse-n2'],
> >          'flags': [
> > @@ -630,7 +630,7 @@ if update_flags
> >      # probe supported archs and their features
> >      candidate_march = ''
> >      if part_number_config.has_key('march')
> > -        supported_marchs = ['armv8.6-a', 'armv8.5-a', 'armv8.4-a', 'armv8.3-a',
> > +        supported_marchs = ['armv9-a', 'armv8.6-a', 'armv8.5-a',
> 
> march may fallback to armv8.6-a if compiler doesn't support armv9-a. Is this
> fallback safe?

Yeah, looks like we need to have a fallback arch if compiler doesn't support a given march
Armv8.5-a in this case.

> I think just remove march from N2 part_number_config is OK.

I will remove the march from part number config for now.
But we should work on defining a fallback arch in future as there will always be a compiler support mismatch.

> 
> > + 'armv8.4-a', 'armv8.3-a',
> >                              'armv8.2-a', 'armv8.1-a', 'armv8-a']
> >          check_compiler_support = false
> >          foreach supported_march: supported_marchs
> > --
> > 2.25.1
  
Ruifeng Wang June 8, 2023, 2:20 p.m. UTC | #4
> -----Original Message-----
> From: Pavan Nikhilesh Bhagavatula <pbhagavatula@marvell.com>
> Sent: Thursday, June 8, 2023 8:59 PM
> To: Ruifeng Wang <Ruifeng.Wang@arm.com>; jerinj@marvell.com; Bruce Richardson
> <bruce.richardson@intel.com>
> Cc: dev@dpdk.org; Juraj Linkeš <juraj.linkes@pantheon.tech>; nd <nd@arm.com>
> Subject: RE: [PATCH] config/arm: fix Neoverse N2 march flag
> 
> 
> 
> > -----Original Message-----
> > From: Ruifeng Wang <Ruifeng.Wang@arm.com>
> > Sent: Thursday, June 8, 2023 4:12 PM
> > To: Pavan Nikhilesh Bhagavatula <pbhagavatula@marvell.com>; Jerin
> > Jacob Kollanukkaran <jerinj@marvell.com>; Bruce Richardson
> > <bruce.richardson@intel.com>
> > Cc: dev@dpdk.org; Juraj Linkeš <juraj.linkes@pantheon.tech>; nd
> > <nd@arm.com>
> > Subject: [EXT] RE: [PATCH] config/arm: fix Neoverse N2 march flag
> >
> > External Email
> >
> > ----------------------------------------------------------------------
> > > -----Original Message-----
> > > From: pbhagavatula@marvell.com <pbhagavatula@marvell.com>
> > > Sent: Thursday, June 8, 2023 3:28 PM
> > > To: jerinj@marvell.com; Ruifeng Wang <Ruifeng.Wang@arm.com>; Bruce
> > Richardson
> > > <bruce.richardson@intel.com>
> > > Cc: dev@dpdk.org; Pavan Nikhilesh <pbhagavatula@marvell.com>
> > > Subject: [PATCH] config/arm: fix Neoverse N2 march flag
> > >
> > > From: Pavan Nikhilesh <pbhagavatula@marvell.com>
> > >
> > > The -march flag of Neoverse N2 should be `armv9-a` when used along
> > > with
> > -mcpu=neoverse-n2.
> > >
> > > Fixes: ea85ed1f6882 ("config/arm: increase nodes and cores for
> > > Neoverse
> > N2")
> > >
> > > Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
> > > ---
> > >  config/arm/meson.build | 4 ++--
> > >  1 file changed, 2 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/config/arm/meson.build b/config/arm/meson.build index
> > 43f6a551a2..d3b4b4917f
> > > 100644
> > > --- a/config/arm/meson.build
> > > +++ b/config/arm/meson.build
> > > @@ -89,7 +89,7 @@ part_number_config_arm = {
> > >          'march': 'armv8.4-a',
> > >      },
> > >      '0xd49': {
> > > -        'march': 'armv8.5-a',
> > > +        'march': 'armv9-a',
> > >          'march_features': ['sve2'],
> > >          'compiler_options': ['-mcpu=neoverse-n2'],
> > >          'flags': [
> > > @@ -630,7 +630,7 @@ if update_flags
> > >      # probe supported archs and their features
> > >      candidate_march = ''
> > >      if part_number_config.has_key('march')
> > > -        supported_marchs = ['armv8.6-a', 'armv8.5-a', 'armv8.4-a', 'armv8.3-a',
> > > +        supported_marchs = ['armv9-a', 'armv8.6-a', 'armv8.5-a',
> >
> > march may fallback to armv8.6-a if compiler doesn't support armv9-a.
> > Is this fallback safe?
> 
> Yeah, looks like we need to have a fallback arch if compiler doesn't support a given march
> Armv8.5-a in this case.
> 
> > I think just remove march from N2 part_number_config is OK.
> 
> I will remove the march from part number config for now.
> But we should work on defining a fallback arch in future as there will always be a
> compiler support mismatch.

Agree. Need to adapt this for v9-a.

> 
> >
> > > + 'armv8.4-a', 'armv8.3-a',
> > >                              'armv8.2-a', 'armv8.1-a', 'armv8-a']
> > >          check_compiler_support = false
> > >          foreach supported_march: supported_marchs
> > > --
> > > 2.25.1
  

Patch

diff --git a/config/arm/meson.build b/config/arm/meson.build
index 43f6a551a2..d3b4b4917f 100644
--- a/config/arm/meson.build
+++ b/config/arm/meson.build
@@ -89,7 +89,7 @@  part_number_config_arm = {
         'march': 'armv8.4-a',
     },
     '0xd49': {
-        'march': 'armv8.5-a',
+        'march': 'armv9-a',
         'march_features': ['sve2'],
         'compiler_options': ['-mcpu=neoverse-n2'],
         'flags': [
@@ -630,7 +630,7 @@  if update_flags
     # probe supported archs and their features
     candidate_march = ''
     if part_number_config.has_key('march')
-        supported_marchs = ['armv8.6-a', 'armv8.5-a', 'armv8.4-a', 'armv8.3-a',
+        supported_marchs = ['armv9-a', 'armv8.6-a', 'armv8.5-a', 'armv8.4-a', 'armv8.3-a',
                             'armv8.2-a', 'armv8.1-a', 'armv8-a']
         check_compiler_support = false
         foreach supported_march: supported_marchs