* [PATCH 1/2] config/arm: fix CN10K minimum march requirement
@ 2024-01-04 9:18 pbhagavatula
2024-01-04 9:18 ` [PATCH 2/2] config/arm: add armv9-a march pbhagavatula
2024-01-18 2:02 ` [PATCH 1/2] config/arm: fix CN10K minimum march requirement Ruifeng Wang
0 siblings, 2 replies; 6+ messages in thread
From: pbhagavatula @ 2024-01-04 9:18 UTC (permalink / raw)
To: jerinj, Ruifeng Wang, Bruce Richardson; +Cc: dev, Pavan Nikhilesh, stable
From: Pavan Nikhilesh <pbhagavatula@marvell.com>
Meson selects march and mcpu based on compiler support and
partnumber, only the minimum required march should be defined
in cross compile configuration file.
Fixes: 1b4c86a721c9 ("config/arm: add Marvell CN10K")
Cc: stable@dpdk.org
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
---
config/arm/arm64_cn10k_linux_gcc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/config/arm/arm64_cn10k_linux_gcc b/config/arm/arm64_cn10k_linux_gcc
index fa904af5d0..801a7ededd 100644
--- a/config/arm/arm64_cn10k_linux_gcc
+++ b/config/arm/arm64_cn10k_linux_gcc
@@ -10,7 +10,7 @@ cmake = 'cmake'
[host_machine]
system = 'linux'
cpu_family = 'aarch64'
-cpu = 'armv8.6-a'
+cpu = 'armv8-a'
endian = 'little'
[properties]
--
2.25.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 2/2] config/arm: add armv9-a march
2024-01-04 9:18 [PATCH 1/2] config/arm: fix CN10K minimum march requirement pbhagavatula
@ 2024-01-04 9:18 ` pbhagavatula
2024-01-18 2:19 ` Ruifeng Wang
2024-01-18 2:02 ` [PATCH 1/2] config/arm: fix CN10K minimum march requirement Ruifeng Wang
1 sibling, 1 reply; 6+ messages in thread
From: pbhagavatula @ 2024-01-04 9:18 UTC (permalink / raw)
To: jerinj, Ruifeng Wang, Bruce Richardson; +Cc: dev, Pavan Nikhilesh
From: Pavan Nikhilesh <pbhagavatula@marvell.com>
Now that major versions of GCC recognize armv9-a march option,
add it to the list of supported march.
Update neoverse-n2 part number to include march as armv9-a.
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
---
config/arm/meson.build | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/config/arm/meson.build b/config/arm/meson.build
index 36f21d2259..0804877b57 100644
--- a/config/arm/meson.build
+++ b/config/arm/meson.build
@@ -92,6 +92,7 @@ part_number_config_arm = {
'march': 'armv8.4-a',
},
'0xd49': {
+ 'march': 'armv9-a',
'march_features': ['sve2'],
'compiler_options': ['-mcpu=neoverse-n2'],
'flags': [
@@ -701,7 +702,7 @@ if update_flags
if part_number_config.get('force_march', false)
candidate_march = part_number_config['march']
else
- 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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] config/arm: fix CN10K minimum march requirement
2024-01-04 9:18 [PATCH 1/2] config/arm: fix CN10K minimum march requirement pbhagavatula
2024-01-04 9:18 ` [PATCH 2/2] config/arm: add armv9-a march pbhagavatula
@ 2024-01-18 2:02 ` Ruifeng Wang
2024-01-19 19:42 ` [EXT] " Pavan Nikhilesh Bhagavatula
1 sibling, 1 reply; 6+ messages in thread
From: Ruifeng Wang @ 2024-01-18 2:02 UTC (permalink / raw)
To: pbhagavatula, jerinj, Bruce Richardson; +Cc: dev, stable, nd
On 2024/1/4 5:18 PM, pbhagavatula@marvell.com wrote:
> From: Pavan Nikhilesh <pbhagavatula@marvell.com>
>
> Meson selects march and mcpu based on compiler support and
> partnumber, only the minimum required march should be defined
> in cross compile configuration file.
>
> Fixes: 1b4c86a721c9 ("config/arm: add Marvell CN10K")
> Cc: stable@dpdk.org
>
> Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
> ---
> config/arm/arm64_cn10k_linux_gcc | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/config/arm/arm64_cn10k_linux_gcc b/config/arm/arm64_cn10k_linux_gcc
> index fa904af5d0..801a7ededd 100644
> --- a/config/arm/arm64_cn10k_linux_gcc
> +++ b/config/arm/arm64_cn10k_linux_gcc
> @@ -10,7 +10,7 @@ cmake = 'cmake'
> [host_machine]
> system = 'linux'
> cpu_family = 'aarch64'
> -cpu = 'armv8.6-a'
> +cpu = 'armv8-a'
> endian = 'little'
>
> [properties]
The host_machine.cpu in cross file doesn't take effect.
There is an effort to remove the confusion. Can you have a review?
https://patches.dpdk.org/project/dpdk/patch/20231205035259.3516625-3-joyce.kong@arm.com/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] config/arm: add armv9-a march
2024-01-04 9:18 ` [PATCH 2/2] config/arm: add armv9-a march pbhagavatula
@ 2024-01-18 2:19 ` Ruifeng Wang
2024-01-20 7:09 ` [EXT] " Pavan Nikhilesh Bhagavatula
0 siblings, 1 reply; 6+ messages in thread
From: Ruifeng Wang @ 2024-01-18 2:19 UTC (permalink / raw)
To: pbhagavatula, jerinj, Bruce Richardson; +Cc: dev, nd
On 2024/1/4 5:18 PM, pbhagavatula@marvell.com wrote:
> From: Pavan Nikhilesh <pbhagavatula@marvell.com>
>
> Now that major versions of GCC recognize armv9-a march option,
> add it to the list of supported march.
> Update neoverse-n2 part number to include march as armv9-a.
>
> Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
> ---
> config/arm/meson.build | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/config/arm/meson.build b/config/arm/meson.build
> index 36f21d2259..0804877b57 100644
> --- a/config/arm/meson.build
> +++ b/config/arm/meson.build
> @@ -92,6 +92,7 @@ part_number_config_arm = {
> 'march': 'armv8.4-a',
> },
> '0xd49': {
> + 'march': 'armv9-a',
> 'march_features': ['sve2'],
> 'compiler_options': ['-mcpu=neoverse-n2'],
> 'flags': [
> @@ -701,7 +702,7 @@ if update_flags
> if part_number_config.get('force_march', false)
> candidate_march = part_number_config['march']
> else
> - 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',
armv9.x-a have some overlap with armv8.x-a.
For armv9.0, the next candidate fallback should be armv8.4-a instead of
armv8.6-a.
armv9 should be treated differently for fallback support.
> 'armv8.2-a', 'armv8.1-a', 'armv8-a']
> check_compiler_support = false
> foreach supported_march: supported_marchs
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [EXT] Re: [PATCH 1/2] config/arm: fix CN10K minimum march requirement
2024-01-18 2:02 ` [PATCH 1/2] config/arm: fix CN10K minimum march requirement Ruifeng Wang
@ 2024-01-19 19:42 ` Pavan Nikhilesh Bhagavatula
0 siblings, 0 replies; 6+ messages in thread
From: Pavan Nikhilesh Bhagavatula @ 2024-01-19 19:42 UTC (permalink / raw)
To: Ruifeng Wang, Jerin Jacob, Bruce Richardson; +Cc: dev, stable, nd
> -----Original Message-----
> From: Ruifeng Wang <Ruifeng.Wang@arm.com>
> Sent: Thursday, January 18, 2024 7:32 AM
> To: Pavan Nikhilesh Bhagavatula <pbhagavatula@marvell.com>; Jerin Jacob
> <jerinj@marvell.com>; Bruce Richardson <bruce.richardson@intel.com>
> Cc: dev@dpdk.org; stable@dpdk.org; nd@arm.com
> Subject: [EXT] Re: [PATCH 1/2] config/arm: fix CN10K minimum march
> requirement
>
> External Email
>
> ----------------------------------------------------------------------
>
> On 2024/1/4 5:18 PM, pbhagavatula@marvell.com wrote:
> > From: Pavan Nikhilesh <pbhagavatula@marvell.com>
> >
> > Meson selects march and mcpu based on compiler support and
> > partnumber, only the minimum required march should be defined
> > in cross compile configuration file.
> >
> > Fixes: 1b4c86a721c9 ("config/arm: add Marvell CN10K")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
> > ---
> > config/arm/arm64_cn10k_linux_gcc | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/config/arm/arm64_cn10k_linux_gcc
> b/config/arm/arm64_cn10k_linux_gcc
> > index fa904af5d0..801a7ededd 100644
> > --- a/config/arm/arm64_cn10k_linux_gcc
> > +++ b/config/arm/arm64_cn10k_linux_gcc
> > @@ -10,7 +10,7 @@ cmake = 'cmake'
> > [host_machine]
> > system = 'linux'
> > cpu_family = 'aarch64'
> > -cpu = 'armv8.6-a'
> > +cpu = 'armv8-a'
> > endian = 'little'
> >
> > [properties]
>
> The host_machine.cpu in cross file doesn't take effect.
> There is an effort to remove the confusion. Can you have a review?
I tested the patchset with cross as cn10k and they look good, I will drop this patch.
Thanks,
Pavan.
> https://urldefense.proofpoint.com/v2/url?u=https-
> 3A__patches.dpdk.org_project_dpdk_patch_20231205035259.3516625-2D3-
> 2Djoyce.kong-
> 40arm.com_&d=DwICaQ&c=nKjWec2b6R0mOyPaz7xtfQ&r=1cjuAHrGh745jH
> Nmj2fD85sUMIJ2IPIDsIJzo6FN6Z0&m=kvQolwCYorBpQ4nTOcW2ScJHHijEJtn
> QojGz8R6F6mWPl4nA-
> gIVpBLkzjAFCIpR&s=Huq9MHONkc50v4UTZtcmyIwY2tD3iFSMrZGuo_PvWSU
> &e=
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [EXT] Re: [PATCH 2/2] config/arm: add armv9-a march
2024-01-18 2:19 ` Ruifeng Wang
@ 2024-01-20 7:09 ` Pavan Nikhilesh Bhagavatula
0 siblings, 0 replies; 6+ messages in thread
From: Pavan Nikhilesh Bhagavatula @ 2024-01-20 7:09 UTC (permalink / raw)
To: Ruifeng Wang, Jerin Jacob, Bruce Richardson; +Cc: dev, nd
> On 2024/1/4 5:18 PM, pbhagavatula@marvell.com wrote:
> > From: Pavan Nikhilesh <pbhagavatula@marvell.com>
> >
> > Now that major versions of GCC recognize armv9-a march option,
> > add it to the list of supported march.
> > Update neoverse-n2 part number to include march as armv9-a.
> >
> > Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
> > ---
> > config/arm/meson.build | 3 ++-
> > 1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/config/arm/meson.build b/config/arm/meson.build
> > index 36f21d2259..0804877b57 100644
> > --- a/config/arm/meson.build
> > +++ b/config/arm/meson.build
> > @@ -92,6 +92,7 @@ part_number_config_arm = {
> > 'march': 'armv8.4-a',
> > },
> > '0xd49': {
> > + 'march': 'armv9-a',
> > 'march_features': ['sve2'],
> > 'compiler_options': ['-mcpu=neoverse-n2'],
> > 'flags': [
> > @@ -701,7 +702,7 @@ if update_flags
> > if part_number_config.get('force_march', false)
> > candidate_march = part_number_config['march']
> > else
> > - 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',
>
> armv9.x-a have some overlap with armv8.x-a.
> For armv9.0, the next candidate fallback should be armv8.4-a instead of
> armv8.6-a.
> armv9 should be treated differently for fallback support.
From [1] looks like base arch is v8.5a, also GCC(13) still complains incompatibility with neoverse-n2 [2]
I believe we have to express mcpu separately instead of having it in compiler flags and switch to fallback march only when
mcpu is not supported. If mcpu is supported and march is not then we shouldn’t pick from supported_marchs.
Example:
march=armv9-a
mcpu= neoverse-n2
fallback_march=armv8.5-a
If compiler supports mcpu as neoverse-n2 and march as armv9-a
machine_args = ['-march=armv9-a', '-mcpu=neoverse-n2']
If compiler supports mcpu as neoverse-n2 and doesn’t support armv9-a
machine_args = ['-mcpu=neoverse-n2']
If compiler supports doesn’t support mcpu as neoverse-n2 and supports armv9-a
machine_args = ['-march=armv9-a']
If compiler supports doesn’t support mcpu as neoverse-n2 and doesn’t support armv9-a
machine_args = ['-march=armv8.5-a']
I will spin up a new patch with the above change.
Thanks,
Pavan.
[1] https://github.com/gcc-mirror/gcc/blob/615e25c82de97acc17ab438f88d6788cf7ffe1d6/gcc/config/arm/arm-cpus.in#L306
[2]
#aarch64-linux-gnu-gcc --version
aarch64-linux-gnu-gcc (GCC) 13.2.0
#aarch64-linux-gnu-gcc -mcpu=neoverse-n2 -march=armv8-a shrn.c
cc1: warning: switch '-mcpu=neoverse-n2' conflicts with '-march=armv8-a' switch
#aarch64-linux-gnu-gcc -mcpu=neoverse-n2 -march=armv8.1-a shrn.c
cc1: warning: switch '-mcpu=neoverse-n2' conflicts with '-march=armv8.1-a' switch
#aarch64-linux-gnu-gcc -mcpu=neoverse-n2 -march=armv8.2-a shrn.c
cc1: warning: switch '-mcpu=neoverse-n2' conflicts with '-march=armv8.2-a' switch
#aarch64-linux-gnu-gcc -mcpu=neoverse-n2 -march=armv8.3-a shrn.c
cc1: warning: switch '-mcpu=neoverse-n2' conflicts with '-march=armv8.3-a' switch
#aarch64-linux-gnu-gcc -mcpu=neoverse-n2 -march=armv8.4-a shrn.c
cc1: warning: switch '-mcpu=neoverse-n2' conflicts with '-march=armv8.4-a' switch
#aarch64-linux-gnu-gcc -mcpu=neoverse-n2 -march=armv8.5-a shrn.c
cc1: warning: switch '-mcpu=neoverse-n2' conflicts with '-march=armv8.5-a' switch
#aarch64-linux-gnu-gcc -mcpu=neoverse-n2 -march=armv8.6-a shrn.c
cc1: warning: switch '-mcpu=neoverse-n2' conflicts with '-march=armv8.6-a' switch
#aarch64-linux-gnu-gcc -mcpu=neoverse-n2 -march=armv8.7-a shrn.c
cc1: warning: switch '-mcpu=neoverse-n2' conflicts with '-march=armv8.7-a' switch
>
> > 'armv8.2-a', 'armv8.1-a', 'armv8-a']
> > check_compiler_support = false
> > foreach supported_march: supported_marchs
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-01-20 7:09 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-04 9:18 [PATCH 1/2] config/arm: fix CN10K minimum march requirement pbhagavatula
2024-01-04 9:18 ` [PATCH 2/2] config/arm: add armv9-a march pbhagavatula
2024-01-18 2:19 ` Ruifeng Wang
2024-01-20 7:09 ` [EXT] " Pavan Nikhilesh Bhagavatula
2024-01-18 2:02 ` [PATCH 1/2] config/arm: fix CN10K minimum march requirement Ruifeng Wang
2024-01-19 19:42 ` [EXT] " Pavan Nikhilesh Bhagavatula
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).