From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1334643AAC; Wed, 7 Feb 2024 21:24:55 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8F3FC4027D; Wed, 7 Feb 2024 21:24:54 +0100 (CET) Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-he1eur04on2052.outbound.protection.outlook.com [40.107.7.52]) by mails.dpdk.org (Postfix) with ESMTP id AC37140268 for ; Wed, 7 Feb 2024 21:24:53 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KfcUM5C0AuIy5mWfpDChAKsEXh2m8V6jCWhFm5SDbpYE8A3NS9e0bMtdsJVhJvgrhR779wXXjqmY06BnsKKOPBbSEAEeqWoADYOOILqhIOYgHr6jJV6Q1dHzNs4nS5elQIp5+QjtYwKgdzmio87mBRiaE5XtmjYCnMflBitvkt8LbJGrNTrCXJSa0HBkL+8zyqYsNtzdC0mB2/1rMbcsZcrIO3j/eNRIhjtx31sEQou9HloRPcAWzdaYPZdcWIERsU759G8g4ucDaYZaZkDHPVqT3zBpkH6Qt8/3M5PAsxvsxEU8JgjRCGLL7kxzoekHehPjyR/4HA1QzMp1QV00fw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=LaQeu3bnLqE0iRm9MGb6SBf/j1FErWf3oK7ncEz0wRU=; b=KaKSPYCXKLb3oa3WV+Vkq9JiBUjIOosRintgXtmepXy3qLXYuYZDGThnlLS2ZgRKDkypWFlGeL2hOmRbr5BQU6N90rc66ZWtXoqBpUhGuwHKD2jYtBhC0RdEyhZh97SxmLq8X4nt/rhVHtPNwEYTbFIejE8eAPnUnmrEMJfvgwTHorpIwqozuzpYFLzW1CY7FXfvAVAtFt1AE2U/ExWjqN1UHWyyR31PHaObVfoT2UkepXLVx/OTe7Zd9Ev3FbG2poa60oEzunZOWs3XFlD+qbpax6XdAsU+9cN7S0cHdx9D296Syaa6TbK/pRJJgBDHZaHUHcrU36PwM6m2w8P4vw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=LaQeu3bnLqE0iRm9MGb6SBf/j1FErWf3oK7ncEz0wRU=; b=G09SQ+WIIqxN/C0mwMK3T5WvSpdbnvQbz6vf4gm6txf/HUedWWZp5Sclmi5A4NQTEH+t0hRZ5loMF8eaHHtOtfV1QcFkLnpjGwY9cG13+1RBbM0PFGTXcllcubI/U72vMukjsieRGH/Lltt5ObDYweW0dXIsVnbZfo3KMAEkQow= Received: from AM0PR08MB5073.eurprd08.prod.outlook.com (2603:10a6:208:15c::27) by VI0PR08MB10629.eurprd08.prod.outlook.com (2603:10a6:800:20b::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7249.36; Wed, 7 Feb 2024 20:24:50 +0000 Received: from AM0PR08MB5073.eurprd08.prod.outlook.com ([fe80::710e:79e2:33ea:dfca]) by AM0PR08MB5073.eurprd08.prod.outlook.com ([fe80::710e:79e2:33ea:dfca%6]) with mapi id 15.20.7249.035; Wed, 7 Feb 2024 20:24:50 +0000 From: Wathsala Wathawana Vithanage To: "pbhagavatula@marvell.com" , "jerinj@marvell.com" , "juraj.linkes@pantheon.tech" , Bruce Richardson CC: "dev@dpdk.org" , Honnappa Nagarahalli , nd , nd Subject: RE: [PATCH v3 2/3] config/arm: add support for fallback march Thread-Topic: [PATCH v3 2/3] config/arm: add support for fallback march Thread-Index: AQHaVbeZYjPbOMN+UE2ut/SUj8zmR7D/WQJA Date: Wed, 7 Feb 2024 20:24:50 +0000 Message-ID: References: <20240201215731.4543-1-pbhagavatula@marvell.com> <20240202085031.10237-1-pbhagavatula@marvell.com> <20240202085031.10237-2-pbhagavatula@marvell.com> In-Reply-To: <20240202085031.10237-2-pbhagavatula@marvell.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ts-tracking-id: 507972C3CF007E448F2D86547EBFC1A9.0 x-checkrecipientchecked: true authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: AM0PR08MB5073:EE_|VI0PR08MB10629:EE_ x-ms-office365-filtering-correlation-id: a7b3997e-fdfa-4074-3743-08dc281ad630 x-ld-processed: f34e5979-57d9-4aaa-ad4d-b122a662184d,ExtAddr nodisclaimer: true x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: IKyPNizp2YS9ObgFcLdylqAqIa0fKZiKc08Kkw/HaaaJ3HwbOXSVfvBnlnfvUO+omRLGxxWIsplpml8COYhzKLk4O16YytOxK0oOXKTicbpY4oJCc4Agtin9SKIpDr+tpd6gjeV3MWrV8oYO81kqCwfH59/74Z1X+kKrh2HhQnfm1ijH5wQv1I46wS7WgPsIK1u1Uj4VWHRCCzQag21qMts/EESYP67KJaZK93wJqRa/jw0Qx7HZvyhSqPyipM/uLAxL7ERtOri+kS7d2glqw3Dm+jXx+YlUqp75qOb2A8Jw3f1+JIgMMV/c+ek4oKUPR2nqrxWwzW59GX3Ijlim9nqLM2w+eyc+v4ivHjDar5IBUbPDlgAPfWwcL8VWlnONSf1UQgGjtqzmvHafjNHnztuFDwntByYFmXyc/VR8a1J1m+clCmEHtfYm7K8dsiDBL9kazHF9xHvBNR5/OzhT232UFhTh+k9riSy2hl8E/pZpAj/tw0XgdmtemXjX+LgzZfRLodGLmAKFNxS8mUBckrR0oWy8stOQz4NsiZwon7xUDKpKJfidwJ1A4kK1ONHIBMNKSAlZdSrUH7kExbWIW3ZllSI8iOPTlmLJquvZWDGkcMQ41JuwvaF1zLXOmX4E x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM0PR08MB5073.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(39860400002)(376002)(346002)(136003)(366004)(396003)(230922051799003)(230273577357003)(64100799003)(1800799012)(186009)(451199024)(122000001)(38100700002)(33656002)(6506007)(7696005)(55016003)(83380400001)(41300700001)(86362001)(478600001)(52536014)(8676002)(4326008)(26005)(66899024)(9686003)(8936002)(71200400001)(2906002)(5660300002)(110136005)(66556008)(64756008)(316002)(66476007)(66946007)(54906003)(66446008)(76116006)(38070700009); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?c26ZIt8mXtRkuEaDnFBFqtQ/wMuJoycLWZbW6IVJHDTu/pAhU9QWSdAiSpTM?= =?us-ascii?Q?04HrWcyr1GmLKvkjFVLRq3qaXblrY51uvWGxdYpJDczIWsfsdu7spS0TEsQu?= =?us-ascii?Q?4yIhmW6cpsRQb0D4khyWWCSmxLZ7TUr3JT2030tL5PkVM8CrEP18TNdLN0Hh?= =?us-ascii?Q?lBIu8z4r3lpQf2Xe9N5E+icunfSd12+pTN4jTO6vdxccLvN0Y2gjdHkQug04?= =?us-ascii?Q?uuX5GvfktM2Fs0r0yh1caKXFlA5i+Do1f8NzX8677K0SXjYBzr8ZriYEanZo?= =?us-ascii?Q?ssvfo/ChEu2GFC/t7q3ICZFz8aKRgONd/mXn6ykTmyiI7V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0N1+dWUdeNQcEnzDlnU06lRNXgZ4iJGkhgtLwQRmQyjk3UYD+UzcaO0o?= =?us-ascii?Q?riGbBwySPF+KBk5Slna1qbBwrV7Oxy0AI+nQER7ZIiqlnqBb1kgE3xik9R09?= =?us-ascii?Q?6OI6KCMBGwdit1wmPcsQTin5pmDvJBGB2FXAlD7QtgqP78w7VYUuTmvNTnQE?= =?us-ascii?Q?4OAiNg9JH3lXRq6aWzsSLCBnGXL8vd5/+fI8dYLAU9x0KWBWP3qQHWPp0bR7?= =?us-ascii?Q?d1YTW7fmhEnptqUxcTlmbZKT78siEud2jACvmXLeKuByggmNB6OP6l/p4KCM?= =?us-ascii?Q?WO47OzdAGphnwq6qjkL++UZtjOWSAxMkJ9alFqDNKHKdijSfkvrrUM1VyUcm?= =?us-ascii?Q?/D0s/c2S72W1iyy5CNJUMb+SEKWQpQ87wDK2omTF?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: AM0PR08MB5073.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: a7b3997e-fdfa-4074-3743-08dc281ad630 X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Feb 2024 20:24:50.6931 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: N6ZbWyA2VYirWRshEsnI7BUZkuS45FWhZMzlfrtJJYbijxqYRFpFdQI5tVa8wvInb/+DLoY2pOv2Ahz40nzsC6nMezTFnG+o6Y27sRQU7B0= X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI0PR08MB10629 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org >=20 > From: Pavan Nikhilesh >=20 > Some ARM CPUs have specific march requirements and are not compatible > with the supported march list. > Add fallback march in case the mcpu and the march advertised in the > part_number_config are not supported by the compiler. >=20 > Example > mcpu =3D neoverse-n2 > march =3D armv9-a > fallback_march =3D armv8.5-a >=20 > mcpu, march not supported > machine_args =3D ['-march=3Darmv8.5-a'] >=20 > mcpu, march, fallback_march not supported > least march supported =3D armv8-a >=20 > machine_args =3D ['-march=3Darmv8-a'] >=20 Similar to "[v3,1/3] config/arm: avoid mcpu and march conflicts" here also we can avoid selecting march if it's not supported by the compiler. Ideally, we should exit the build with an error saying march/mcpu is not supported and suggest further actions (like trying again with=20 -Dmarch -Dmcpu or -Dplatform=3Dgeneric-armv9 as discussed in [v3,1/3]) > Signed-off-by: Pavan Nikhilesh > --- > config/arm/meson.build | 10 ++++++++++ > 1 file changed, 10 insertions(+) >=20 > diff --git a/config/arm/meson.build b/config/arm/meson.build index > ba859bd060b5..4e44d1850bae 100644 > --- a/config/arm/meson.build > +++ b/config/arm/meson.build > @@ -94,6 +94,7 @@ part_number_config_arm =3D { > '0xd49': { > 'march': 'armv9-a', > 'march_features': ['sve2'], > + 'fallback_march': 'armv8.5-a', > 'mcpu': 'neoverse-n2', > 'flags': [ > ['RTE_MACHINE', '"neoverse-n2"'], @@ -708,6 +709,7 @@ if > update_flags >=20 > # probe supported archs and their features > candidate_march =3D '' > + fallback_march =3D '' > if part_number_config.has_key('march') > if part_number_config.get('force_march', false) or candidate_mcp= u !=3D '' > if cc.has_argument('-march=3D' + part_number_config['march'= ]) @@ - > 728,10 +730,18 @@ if update_flags > # highest supported march version found > break > endif > + if (part_number_config.has_key('fallback_march') and > + supported_march =3D=3D part_number_config['fallback_= march'] and > + cc.has_argument('-march=3D' + supported_march)) > + fallback_march =3D supported_march > + endif > endforeach > endif >=20 > if candidate_march !=3D part_number_config['march'] > + if fallback_march !=3D '' > + candidate_march =3D fallback_march > + endif > warning('Configuration march version is @0@, not supported.' > .format(part_number_config['march'])) > if candidate_march !=3D '' > -- > 2.43.0