* [PATCH] config/arm: fix march features not being set
@ 2025-03-08 8:59 pbhagavatula
2025-03-10 14:23 ` Jerin Jacob
2025-03-12 19:46 ` Wathsala Wathawana Vithanage
0 siblings, 2 replies; 5+ messages in thread
From: pbhagavatula @ 2025-03-08 8:59 UTC (permalink / raw)
To: jerinj, Wathsala Vithanage, Bruce Richardson; +Cc: dev, Pavan Nikhilesh
From: Pavan Nikhilesh <pbhagavatula@marvell.com>
Fix extra_march_features not being added to
mcpu flags when SoC configuration advertises
them.
Fixes: c02c01dbf907 ("config/arm: prefer strict use of -mcpu if supported")
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
---
config/arm/meson.build | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/config/arm/meson.build b/config/arm/meson.build
index dea329ceb7..7f85b088c9 100644
--- a/config/arm/meson.build
+++ b/config/arm/meson.build
@@ -841,6 +841,7 @@ if update_flags
implementer_config = implementers[implementer_id]
part_number = soc_config['part_number']
soc_flags = soc_config.get('flags', [])
+ extra_features = soc_config.get('extra_march_features', [])
if not soc_config.get('numa', true)
has_libnuma = false
endif
@@ -909,11 +910,15 @@ if update_flags
machine_args += march
else
candidate_mcpu = '-mcpu=' + mcpu
- if (cc.has_argument(candidate_mcpu))
- machine_args += candidate_mcpu
- else
+ if not cc.has_argument(candidate_mcpu)
error('Compiler does not support -mcpu=@0@.'.format(mcpu))
endif
+ foreach flag: extra_features
+ if cc.has_argument('+'.join([candidate_mcpu, flag]))
+ candidate_mcpu = '+'.join([candidate_mcpu, flag])
+ endif
+ endforeach
+ machine_args += candidate_mcpu
endif
# apply supported compiler options
--
2.43.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [PATCH] config/arm: fix march features not being set
2025-03-08 8:59 [PATCH] config/arm: fix march features not being set pbhagavatula
@ 2025-03-10 14:23 ` Jerin Jacob
2025-03-11 19:44 ` Wathsala Wathawana Vithanage
2025-03-12 19:46 ` Wathsala Wathawana Vithanage
1 sibling, 1 reply; 5+ messages in thread
From: Jerin Jacob @ 2025-03-10 14:23 UTC (permalink / raw)
To: Pavan Nikhilesh Bhagavatula, Wathsala Vithanage, Bruce Richardson
Cc: dev, Pavan Nikhilesh Bhagavatula, Thomas Monjalon, Honnappa Nagarahalli
> -----Original Message-----
> From: pbhagavatula@marvell.com <pbhagavatula@marvell.com>
> Sent: Saturday, March 8, 2025 2:29 PM
> To: Jerin Jacob <jerinj@marvell.com>; Wathsala Vithanage
> <wathsala.vithanage@arm.com>; Bruce Richardson
> <bruce.richardson@intel.com>
> Cc: dev@dpdk.org; Pavan Nikhilesh Bhagavatula <pbhagavatula@marvell.com>
> Subject: [PATCH] config/arm: fix march features not being set
>
> From: Pavan Nikhilesh <pbhagavatula@marvell.com>
>
> Fix extra_march_features not being added to mcpu flags when SoC
> configuration advertises them.
>
> Fixes: c02c01dbf907 ("config/arm: prefer strict use of -mcpu if supported")
Acked-by: Jerin Jacob <jerinj@marvell.com>
Wathsala, Could you review this patch so that it can be part of rc3. Following machines configs are broken
[main]dell[dpdk.org] $ git grep -p extra_march_features
config/arm/meson.build=soc_cn10k = {
config/arm/meson.build: 'extra_march_features': ['crypto'],
config/arm/meson.build=soc_grace = {
config/arm/meson.build: 'extra_march_features': ['crypto'],
config/arm/meson.build=soc_graviton3 = {
config/arm/meson.build: 'extra_march_features': ['crypto'],
config/arm/meson.build=soc_graviton4 = {
config/arm/meson.build: 'extra_march_features': ['crypto'],
config/arm/meson.build=soc_odyssey = {
config/arm/meson.build: 'extra_march_features': ['crypto'],
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [PATCH] config/arm: fix march features not being set
2025-03-10 14:23 ` Jerin Jacob
@ 2025-03-11 19:44 ` Wathsala Wathawana Vithanage
0 siblings, 0 replies; 5+ messages in thread
From: Wathsala Wathawana Vithanage @ 2025-03-11 19:44 UTC (permalink / raw)
To: jerinj, Pavan Nikhilesh Bhagavatula, Bruce Richardson
Cc: dev, Pavan Nikhilesh Bhagavatula, thomas, Honnappa Nagarahalli, nd
Hi Jerin,
We are looking into this internally.
Thanks.
> -----Original Message-----
> From: Jerin Jacob <jerinj@marvell.com>
> Sent: Monday, March 10, 2025 9:23 AM
> To: Pavan Nikhilesh Bhagavatula <pbhagavatula@marvell.com>; Wathsala
> Wathawana Vithanage <wathsala.vithanage@arm.com>; Bruce Richardson
> <bruce.richardson@intel.com>
> Cc: dev@dpdk.org; Pavan Nikhilesh Bhagavatula <pbhagavatula@marvell.com>;
> thomas@monjalon.net; Honnappa Nagarahalli
> <Honnappa.Nagarahalli@arm.com>
> Subject: RE: [PATCH] config/arm: fix march features not being set
>
> > -----Original Message-----
> > From: pbhagavatula@marvell.com <pbhagavatula@marvell.com>
> > Sent: Saturday, March 8, 2025 2:29 PM
> > To: Jerin Jacob <jerinj@marvell.com>; Wathsala Vithanage
> > <wathsala.vithanage@arm.com>; Bruce Richardson
> > <bruce.richardson@intel.com>
> > Cc: dev@dpdk.org; Pavan Nikhilesh Bhagavatula
> > <pbhagavatula@marvell.com>
> > Subject: [PATCH] config/arm: fix march features not being set
> >
> > From: Pavan Nikhilesh <pbhagavatula@marvell.com>
> >
> > Fix extra_march_features not being added to mcpu flags when SoC
> > configuration advertises them.
> >
> > Fixes: c02c01dbf907 ("config/arm: prefer strict use of -mcpu if
> > supported")
>
> Acked-by: Jerin Jacob <jerinj@marvell.com>
>
> Wathsala, Could you review this patch so that it can be part of rc3. Following
> machines configs are broken
>
> [main]dell[dpdk.org] $ git grep -p extra_march_features
> config/arm/meson.build=soc_cn10k = {
> config/arm/meson.build: 'extra_march_features': ['crypto'],
> config/arm/meson.build=soc_grace = {
> config/arm/meson.build: 'extra_march_features': ['crypto'],
> config/arm/meson.build=soc_graviton3 = {
> config/arm/meson.build: 'extra_march_features': ['crypto'],
> config/arm/meson.build=soc_graviton4 = {
> config/arm/meson.build: 'extra_march_features': ['crypto'],
> config/arm/meson.build=soc_odyssey = {
> config/arm/meson.build: 'extra_march_features': ['crypto'],
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [PATCH] config/arm: fix march features not being set
2025-03-08 8:59 [PATCH] config/arm: fix march features not being set pbhagavatula
2025-03-10 14:23 ` Jerin Jacob
@ 2025-03-12 19:46 ` Wathsala Wathawana Vithanage
2025-03-13 4:42 ` Pavan Nikhilesh Bhagavatula
1 sibling, 1 reply; 5+ messages in thread
From: Wathsala Wathawana Vithanage @ 2025-03-12 19:46 UTC (permalink / raw)
To: pbhagavatula, jerinj, Bruce Richardson; +Cc: dev, nd
Hi Pavan,
I think this patch does the right thing. I have a minor comment on the
cc.has_argument you have added.
> ---
> config/arm/meson.build | 11 ++++++++---
> 1 file changed, 8 insertions(+), 3 deletions(-)
>
> diff --git a/config/arm/meson.build b/config/arm/meson.build index
> dea329ceb7..7f85b088c9 100644
> --- a/config/arm/meson.build
> +++ b/config/arm/meson.build
> @@ -841,6 +841,7 @@ if update_flags
> implementer_config = implementers[implementer_id]
> part_number = soc_config['part_number']
> soc_flags = soc_config.get('flags', [])
> + extra_features = soc_config.get('extra_march_features', [])
> if not soc_config.get('numa', true)
> has_libnuma = false
> endif
> @@ -909,11 +910,15 @@ if update_flags
> machine_args += march
> else
> candidate_mcpu = '-mcpu=' + mcpu
> - if (cc.has_argument(candidate_mcpu))
> - machine_args += candidate_mcpu
> - else
> + if not cc.has_argument(candidate_mcpu)
This is the else block of cc.has_argument, why is it checked again?
> error('Compiler does not support -mcpu=@0@.'.format(mcpu))
> endif
> + foreach flag: extra_features
> + if cc.has_argument('+'.join([candidate_mcpu, flag]))
> + candidate_mcpu = '+'.join([candidate_mcpu, flag])
> + endif
> + endforeach
> + machine_args += candidate_mcpu
Looks good to me.
Thanks.
--wathsala
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [PATCH] config/arm: fix march features not being set
2025-03-12 19:46 ` Wathsala Wathawana Vithanage
@ 2025-03-13 4:42 ` Pavan Nikhilesh Bhagavatula
0 siblings, 0 replies; 5+ messages in thread
From: Pavan Nikhilesh Bhagavatula @ 2025-03-13 4:42 UTC (permalink / raw)
To: Wathsala Wathawana Vithanage, Jerin Jacob, Bruce Richardson; +Cc: dev, nd
> Hi Pavan,
>
> I think this patch does the right thing. I have a minor comment on the
> cc.has_argument you have added.
>
> > ---
> > config/arm/meson.build | 11 ++++++++---
> > 1 file changed, 8 insertions(+), 3 deletions(-)
> >
> > diff --git a/config/arm/meson.build b/config/arm/meson.build index
> > dea329ceb7..7f85b088c9 100644
> > --- a/config/arm/meson.build
> > +++ b/config/arm/meson.build
> > @@ -841,6 +841,7 @@ if update_flags
> > implementer_config = implementers[implementer_id]
> > part_number = soc_config['part_number']
> > soc_flags = soc_config.get('flags', [])
> > + extra_features = soc_config.get('extra_march_features', [])
> > if not soc_config.get('numa', true)
> > has_libnuma = false
> > endif
> > @@ -909,11 +910,15 @@ if update_flags
> > machine_args += march
> > else
> > candidate_mcpu = '-mcpu=' + mcpu
> > - if (cc.has_argument(candidate_mcpu))
> > - machine_args += candidate_mcpu
> > - else
> > + if not cc.has_argument(candidate_mcpu)
>
> This is the else block of cc.has_argument, why is it checked again?
The else block is removed.
>
> > error('Compiler does not support -mcpu=@0@.'.format(mcpu))
> > endif
> > + foreach flag: extra_features
> > + if cc.has_argument('+'.join([candidate_mcpu, flag]))
> > + candidate_mcpu = '+'.join([candidate_mcpu, flag])
> > + endif
> > + endforeach
> > + machine_args += candidate_mcpu
>
> Looks good to me.
>
> Thanks.
>
> --wathsala
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-03-13 4:42 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-03-08 8:59 [PATCH] config/arm: fix march features not being set pbhagavatula
2025-03-10 14:23 ` Jerin Jacob
2025-03-11 19:44 ` Wathsala Wathawana Vithanage
2025-03-12 19:46 ` Wathsala Wathawana Vithanage
2025-03-13 4:42 ` 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).