From: Thomas Monjalon <thomas@monjalon.net>
To: Wathsala Vithanage <wathsala.vithanage@arm.com>
Cc: Bruce Richardson <bruce.richardson@intel.com>,
dev@dpdk.org, nd@arm.com, honnappa.nagarahalli@arm.com,
Dhruv Tripathi <dhruv.tripathi@arm.com>
Subject: Re: [PATCH v2 1/2] config/arm: strict use of -mcpu for supported CPUs
Date: Mon, 11 Nov 2024 15:12:42 +0100 [thread overview]
Message-ID: <5073448.vCJZsxu672@thomas> (raw)
In-Reply-To: <20241029015946.998124-1-wathsala.vithanage@arm.com>
Please check the CI results, there are some failures.
29/10/2024 02:59, Wathsala Vithanage:
> Arm recommends using -mcpu over -march and march-extensions when the
> compiler supports the target CPU (neoverse-n1 etc.). Arm build so far
> has been an amalgam of -mcpu and -march. When march is in use, it has
> been the case so far to silently fall back to a downgraded march when
> the compiler does not support the requested march. This is unnecessary
> and confusing to an end user who could be building DPDK with a
> particular ISA version and performance expectations in mind.
>
> This patch aims to rectify both the above issues. For part numbers that
> has a corresponding -mcpu, this patch removes all references to march
> and march_features from meson.build. For those SOCs that do not have a
> corresponding -mcpu, a pseudo cpu name in the format mcpu_<soc_name> is
> introduced and referenced in the mcpu field in the part number
> dictionary of the part_number_config dictionary. The definition of the
> mcpu_<soc_name> must be provided in the mcpu_defs dictionary.
> Each mcpu_<soc_name> dictionary in the mcpu_defs have a march field and
> a march_extensions field to construct the optimal compiler setting for
> an SOC that has no corresponding -mcpu value. This patch alters the
> behavior of the build system such that it will no longer silently fall
> back to an older ISA version, it will only perform what's specified in
> the build dictionaries, if the compiler does not support the specified
> configuration it will fail with an error message.
>
> How to add a new SOC to the build system with these changes?
> If compiler supports mcpu follow the usual practice but without march
> and march_features fields in the part number dictionary. If mcpu is not
> available or buggy (misses certain features) for some reason follow the
> same process but set mcpu field to a string in the form 'mcpu_foo'
> (pseudo mcpu mentioned earlier). Then in the mcpu_defs dictionary add
> mcpu_foo dictionary as shown.
>
> 'mcpu_foo': {
> 'march': 'armv8.2-a',
> 'march_extensions': [rcpc]
> }
>
> march_extensions is a comma separated list of march extensions supported
> by the compiler such as sve, crypto etc. Empty match_extensions allowed
> as use of such extensions are optional.
>
> Signed-off-by: Wathsala Vithanage <wathsala.vithanage@arm.com>
> Reviewed-by: Dhruv Tripathi <dhruv.tripathi@arm.com>
next prev parent reply other threads:[~2024-11-11 14:12 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-28 23:31 [PATCH " Wathsala Vithanage
2024-10-28 23:31 ` [PATCH 2/2] config/arm: sort SOCs alphabetically Wathsala Vithanage
2024-10-29 1:06 ` [PATCH 1/2] config/arm: strict use of -mcpu for supported CPUs fengchengwen
2024-10-29 1:59 ` [PATCH v2 " Wathsala Vithanage
2024-10-29 1:59 ` [PATCH v2 2/2] config/arm: sort SOCs alphabetically Wathsala Vithanage
2024-11-11 14:12 ` Thomas Monjalon [this message]
2024-11-11 17:57 ` [PATCH v2 1/2] config/arm: strict use of -mcpu for supported CPUs Wathsala Wathawana Vithanage
2024-11-11 18:14 ` Thomas Monjalon
2024-11-11 19:46 ` Wathsala Wathawana Vithanage
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5073448.vCJZsxu672@thomas \
--to=thomas@monjalon.net \
--cc=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=dhruv.tripathi@arm.com \
--cc=honnappa.nagarahalli@arm.com \
--cc=nd@arm.com \
--cc=wathsala.vithanage@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).