On Wed, May 5, 2021 at 5:44 PM <pbhagavat...@marvell.com> wrote: > > From: Pavan Nikhilesh <pbhagavat...@marvell.com> > > 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 <pbhagavat...@marvell.com>
Acked-by: Jerin Jacob <jer...@marvell.com> > --- > > 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 >