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 8A8DA43923; Mon, 22 Jan 2024 07:32:27 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AEC7140A87; Mon, 22 Jan 2024 07:32:22 +0100 (CET) Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-he1eur04on2043.outbound.protection.outlook.com [40.107.7.43]) by mails.dpdk.org (Postfix) with ESMTP id 76AC940696 for ; Mon, 22 Jan 2024 07:32:17 +0100 (CET) ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=Gz7U/A2zloFadTpjVkRQGrlpRQYDhPpVk8lUcoHsumZfXLztX/RgFX1Otz2nep7LJtXyUjNu6qCP7lUscUKZ9wc31VeqKCI0KluI2L9WFDAKdAAdzXHnIQ+IydkLc8ZpyR2xHlpAfkocVLvPV2pIt3+jnb9JEhH/4QDGuafMzAYabrYd0jWtVARpL/qPf5e/HxYLdU8RqsdJzHDlWMH7hJk/iSOaSVqIHGo/b+L8dfF+DigVRc6FkbxqumlHyUV4doN77Ixt8dmj0MIIgg+ZN8BFqcc6wwXUsv2FsDKY55AYoUdBeOIjlgCFQTGcrKhMBHZV+1wEnHbBZs3a0gBpdQ== ARC-Message-Signature: i=2; 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=O5QjFUS9GCWPhEmTfKCFp57zKnX7ITyzd+DBVMoCilE=; b=aMeqR95ALuc9jab7KLqfGO4JZXK0PSgQPKA0bBzrMAP/KR/JtuYH6oj64JcFw4HP1PuYU3diIFXSAP+JMF0+nn703Fh+ewKUzwpibGuWSUWqhcKC/nQuY/e+K8Tiaeu5eB9vrpz9UlzzQCcfNY4pI7Cy0I2sOyPwvdRFmb6MFa3aPKDZYKxDhr+fcltcKS8mAbyBVsUg21azeeHxmOS8gPCOctOwjgK09eDpz5xfZJGloE+3OyDrmc3geoNsjwBZezeUnpjDRQHsQHhPr15c2b/eHWTKZHTHZD1lDmDJzbR8j8bIAAwBI1DHl9DMVrSab9cBQs2Srmzr7ghohH9IoA== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=dpdk.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com]) 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=O5QjFUS9GCWPhEmTfKCFp57zKnX7ITyzd+DBVMoCilE=; b=xWBvHd3ryD1XolA/EjoSdW4UhvSbafwRNEyLl9Uw9NGs2CLTZSEZTtjV8oCQYdpD8ieGRzbpJ4sZlPl0bBwLk6x5IVoFeZHjIfpTfUw/cJGtsEL/Sd7KOUuhurJx+2TtSJw5qjWyO0e3G73EibGnqlvoLCsGCkxZIkAEzs6xLOA= Received: from AS9PR06CA0443.eurprd06.prod.outlook.com (2603:10a6:20b:49e::23) by PR3PR08MB5834.eurprd08.prod.outlook.com (2603:10a6:102:90::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7202.32; Mon, 22 Jan 2024 06:32:13 +0000 Received: from AMS0EPF000001AF.eurprd05.prod.outlook.com (2603:10a6:20b:49e:cafe::91) by AS9PR06CA0443.outlook.office365.com (2603:10a6:20b:49e::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7202.32 via Frontend Transport; Mon, 22 Jan 2024 06:32:12 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; pr=C Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AMS0EPF000001AF.mail.protection.outlook.com (10.167.16.155) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7202.16 via Frontend Transport; Mon, 22 Jan 2024 06:32:12 +0000 Received: ("Tessian outbound a064b9944658:v228"); Mon, 22 Jan 2024 06:32:12 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 85dc3ca284f44e71 X-CR-MTA-TID: 64aa7808 Received: from de6e3e03701f.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 79326FA9-07C3-48E7-94C9-B2AB355C011D.1; Mon, 22 Jan 2024 06:30:03 +0000 Received: from EUR01-HE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id de6e3e03701f.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Mon, 22 Jan 2024 06:30:03 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=T+9SPXQindIXusR/QHa1WCQoVqWWJIdudOMlVsFDIijNqON3ATsZ4u1o+bSygoEC6X74JQ+wMZWFE7Er6l177hGbShSawCwMUJEULdfRqXr/XpF5YNR7PVI7DRNHoz0xOe+I84AQ0pFzwPcYlp+1zh/TG8oEjtmtxKhA/YnkJcE01hoWGC8fJwpb65H00gZ0151+MF9+ZmyA+OeLTY3i80T+GjN/QDIo2sJy5bXrjx5t2aZTEI+J+ZvTM/vqX8b5n5t796oiKg/EuPsLqJFmTNpXW1YNPQpfaU+0WLIn2wcplIYSh47SxaFrNtZ8h4zcv+V3QUZ4AVkG0PjK2HaYlQ== 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=O5QjFUS9GCWPhEmTfKCFp57zKnX7ITyzd+DBVMoCilE=; b=lJb48Jmz6MeXPKSK8mgfyUR16RkTRiG7pCKfQ91GCWREb9bZeKDjCA1+nl8SIFMxIGr0o4pTTrOhxx7J18A5RSXHHNRPpfNYnWuPl+vlFSpXpFq1NLs6no2II6QigAkTqQpJCiYx3N1wp2Y5uuy0ewZqgWgqcgMSnn1QXSDtE/k7eCl16CfJRGoEswJilIUFkAeYtyDBAvUvmfhu8JriAuL9N8GI/Sqm+ukK9b9Nn49bC5lBvbmbghfw1jEV6N/KklQSBr28HYWLF/zHiC4zFyPqUNFr0/37rrGJWIpxB1UU+Nqbb83zAaz4fqe+jFJs/O8K/RgCJvogAxecvk33nA== 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=O5QjFUS9GCWPhEmTfKCFp57zKnX7ITyzd+DBVMoCilE=; b=xWBvHd3ryD1XolA/EjoSdW4UhvSbafwRNEyLl9Uw9NGs2CLTZSEZTtjV8oCQYdpD8ieGRzbpJ4sZlPl0bBwLk6x5IVoFeZHjIfpTfUw/cJGtsEL/Sd7KOUuhurJx+2TtSJw5qjWyO0e3G73EibGnqlvoLCsGCkxZIkAEzs6xLOA= Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Received: from AS8PR08MB7080.eurprd08.prod.outlook.com (2603:10a6:20b:401::19) by DB3PR08MB8987.eurprd08.prod.outlook.com (2603:10a6:10:431::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7202.31; Mon, 22 Jan 2024 06:30:01 +0000 Received: from AS8PR08MB7080.eurprd08.prod.outlook.com ([fe80::319d:a297:886d:b817]) by AS8PR08MB7080.eurprd08.prod.outlook.com ([fe80::319d:a297:886d:b817%5]) with mapi id 15.20.7202.031; Mon, 22 Jan 2024 06:30:01 +0000 Message-ID: <986656a0-0348-4172-a817-2da5656f203b@arm.com> Date: Mon, 22 Jan 2024 14:29:54 +0800 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 1/2] config/arm: avoid mcpu and march conflicts To: pbhagavatula@marvell.com, jerinj@marvell.com, Bruce Richardson , juraj.linkes@pantheon.tech, Honnappa Nagarahalli Cc: dev@dpdk.org, nd@arm.com References: <20240121093653.2890-1-pbhagavatula@marvell.com> Content-Language: en-US From: Ruifeng Wang In-Reply-To: <20240121093653.2890-1-pbhagavatula@marvell.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: SI2PR02CA0047.apcprd02.prod.outlook.com (2603:1096:4:196::14) To AS8PR08MB7080.eurprd08.prod.outlook.com (2603:10a6:20b:401::19) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: AS8PR08MB7080:EE_|DB3PR08MB8987:EE_|AMS0EPF000001AF:EE_|PR3PR08MB5834:EE_ X-MS-Office365-Filtering-Correlation-Id: f1f6a4c9-06aa-4a1c-5a02-08dc1b13de2d X-LD-Processed: f34e5979-57d9-4aaa-ad4d-b122a662184d,ExtAddr x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: dFoP8FRlL65sFwjRTrpENhp9+yZFzUgvgRprqptFOP8j1adWugopI0q4kACRzxH8k67GNtV8519MDpLa9ZuiKx4M5OqGwD8QFq9hVMgwLfpZpegZItVugvnBbfwBag7BqNjD3x8C+Q+EdMkiYuFyl5JxiNNGzSirMm8tsn3uAP+sTSzQhe4mmXJpuzN8KJBJdaSIqYXu44J6k+ixMAwBEGGkGHF6Ivp8hAcydx5mftpo2Bxd1pbHBs0SQ5EcBLfCfxlCZlDyokVET+R287ULcLaRBVbG0gmCqF7t/auoEVOH2lD87xS2zhRMnBHRX/XyUN0CPCYtf2vB1EdA6x89aDJTwm9op7caajS2EsWJfdh/sa1i1qpy9QlX7m8qJcHn5k5XhKEiBLnLmywC99NF9qlehHKhqhA+t0ifUVcobUPhC2hAK+kTmfpd/nhP9RVns6aKOmz3zu8g5GgeSQAVA0a7oAfOiQiX4iBbxDfWS/vfEVS2sr68wYAwP8tldr6aXDXNuYqHyJaU8pukEw1KitYiimqrhkuiqu8kusaeYDWkOmyKUPV4a78/vOTTaW1k/wa6Q0AKWknEP8RRNbHdnO+iaUVIaTfd9zmYv3Ik47NMjSUbuP0ILsZVnevwvfxOIS33a5uSk+0otVIu73vLwCChZ68sC86SkRdymTAZw/FXE4le4mwn0Igw+60ijNZ7 X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AS8PR08MB7080.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(346002)(136003)(376002)(366004)(39850400004)(396003)(230273577357003)(230173577357003)(230922051799003)(64100799003)(1800799012)(451199024)(186009)(83380400001)(2616005)(26005)(53546011)(38100700002)(4326008)(8676002)(8936002)(5660300002)(2906002)(41300700001)(478600001)(6512007)(6486002)(6666004)(110136005)(6506007)(66556008)(6636002)(66476007)(316002)(66946007)(31696002)(36756003)(86362001)(31686004)(45980500001)(43740500002); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB3PR08MB8987 Original-Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AMS0EPF000001AF.eurprd05.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 8577291e-1a16-47c0-1f7a-08dc1b138f92 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: R9d3rWBV5c1tq9gRytXSlVV9cuoQ4P53lv76UT1n9jVi4A8trg3rwE/IEFUSI2djfDmdeOYJajFDkYJHQvwocxcLfx7iHdqA6oiLKW3tUwGio4CKvu8sVUxzbLW5sRXL7DmMt8/9S/sl8VuFMhxQavNoakLRn8I4StVspKemEMtViubN4U+bRHsVWoQhGuQ2f5NJhoVimsy5YqnNZcn5UNjGpdTS7PezY370d0ivTaNbhG///KKk26Ur86I4cjdp77fkpTCQ1AL9wUG2+Bkx1ncro1PYirNbPDdO2SnYPRpBqYJi4Ph791lsNk93iNp//N4IBrNcKMZ8SAwl7xSOCXaJqvqQDbVXrxxSwXxpRLop8IzQvpyg/Jw0Jmd/P98B8pW/Sime7GiqDz3wgfvougZD5eJBMc/Ay6T4FQNB9lJAXMupcEz08Cgc2W+66TFLTiz8RLrwZCAMpaEX31PADOJkVfK3H+ttYeMQ7s9Lg6+eeIBYvRzLsID7563G4IjB3hZRHIcyn5DeddW9Dn31PGjiKQ5wI9eDNGMAjOCfquXMdO3ruHktJMEXfPvNgYt7yePPuUPqLejlik9B8gWAiVrTiFwYENqQBlfkYfjG06vH2d4TUqOHdYp2T6amTvQvy5VYZVDT+F13TXrlPVNYRI6BmRsywKDApWQB6lBk3Um/QiKz+NjvbpbHDvpRYrR/lgAITitg04vzXYvO9/6x04yH9bEMLlUs3aj/W6LEGg+WPYBjVYDU6e27XNH/5QicFu5oQ3A4sLzKA7XdDGmwLYYdFytdlTofKSIbDfsjpI6E6iK9xp1pNZAxqn1fgwZy X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFS:(13230031)(4636009)(39860400002)(136003)(396003)(346002)(376002)(230273577357003)(230173577357003)(230922051799003)(186009)(451199024)(64100799003)(82310400011)(1800799012)(46966006)(40470700004)(36840700001)(356005)(26005)(6506007)(6666004)(336012)(2616005)(6512007)(53546011)(36860700001)(83380400001)(5660300002)(47076005)(2906002)(41300700001)(110136005)(6486002)(8676002)(8936002)(70586007)(478600001)(316002)(70206006)(4326008)(6636002)(81166007)(86362001)(31696002)(82740400003)(36756003)(31686004)(40460700003)(40480700001)(43740500002); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Jan 2024 06:32:12.4829 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f1f6a4c9-06aa-4a1c-5a02-08dc1b13de2d X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: AMS0EPF000001AF.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PR3PR08MB5834 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 +Cc On 2024/1/21 5:36 PM, pbhagavatula@marvell.com wrote: > From: Pavan Nikhilesh > > The compiler options march and mtune are a subset > of mcpu and will lead to conflicts if improper march > is chosen for a given mcpu. > To avoid conflicts, force part number march when > mcpu is available and is supported by the compiler. > > Example: > march = armv9-a > mcpu = neoverse-n2 > > mcpu supported, march supported > machine_args = ['-mcpu=neoverse-n2', '-march=armv9-a'] > > mcpu supported, march not supported > machine_args = ['-mcpu=neoverse-n2'] > > mcpu not supported, march supported > machine_args = ['-march=armv9-a'] > > mcpu not supported, march not supported > machine_args = ['-march=armv8.6-a'] > > Signed-off-by: Pavan Nikhilesh > --- > config/arm/meson.build | 109 +++++++++++++++++++++++++---------------- > 1 file changed, 67 insertions(+), 42 deletions(-) > > diff --git a/config/arm/meson.build b/config/arm/meson.build > index 36f21d2259..8c8cfccca0 100644 > --- a/config/arm/meson.build > +++ b/config/arm/meson.build > @@ -58,18 +58,18 @@ implementer_generic = { > } > > part_number_config_arm = { > - '0xd03': {'compiler_options': ['-mcpu=cortex-a53']}, > - '0xd04': {'compiler_options': ['-mcpu=cortex-a35']}, > - '0xd05': {'compiler_options': ['-mcpu=cortex-a55']}, > - '0xd07': {'compiler_options': ['-mcpu=cortex-a57']}, > - '0xd08': {'compiler_options': ['-mcpu=cortex-a72']}, > - '0xd09': {'compiler_options': ['-mcpu=cortex-a73']}, > - '0xd0a': {'compiler_options': ['-mcpu=cortex-a75']}, > - '0xd0b': {'compiler_options': ['-mcpu=cortex-a76']}, > + '0xd03': {'mcpu': 'cortex-a53'}, > + '0xd04': {'mcpu': 'cortex-a35'}, > + '0xd05': {'mcpu': 'cortex-a55'}, > + '0xd07': {'mcpu': 'cortex-a57'}, > + '0xd08': {'mcpu': 'cortex-a72'}, > + '0xd09': {'mcpu': 'cortex-a73'}, > + '0xd0a': {'mcpu': 'cortex-a75'}, > + '0xd0b': {'mcpu': 'cortex-a76'}, > '0xd0c': { > 'march': 'armv8.2-a', > 'march_features': ['crypto', 'rcpc'], > - 'compiler_options': ['-mcpu=neoverse-n1'], > + 'mcpu': 'neoverse-n1', > 'flags': [ > ['RTE_MACHINE', '"neoverse-n1"'], > ['RTE_ARM_FEATURE_ATOMICS', true], > @@ -81,7 +81,7 @@ part_number_config_arm = { > '0xd40': { > 'march': 'armv8.4-a', > 'march_features': ['sve'], > - 'compiler_options': ['-mcpu=neoverse-v1'], > + 'mcpu': 'neoverse-v1', > 'flags': [ > ['RTE_MACHINE', '"neoverse-v1"'], > ['RTE_ARM_FEATURE_ATOMICS', true], > @@ -92,8 +92,9 @@ part_number_config_arm = { > 'march': 'armv8.4-a', > }, > '0xd49': { > + 'march': 'armv9-a', > 'march_features': ['sve2'], > - 'compiler_options': ['-mcpu=neoverse-n2'], > + 'mcpu': 'neoverse-n2', > 'flags': [ > ['RTE_MACHINE', '"neoverse-n2"'], > ['RTE_ARM_FEATURE_ATOMICS', true], > @@ -127,21 +128,22 @@ implementer_cavium = { > ], > 'part_number_config': { > '0xa1': { > - 'compiler_options': ['-mcpu=thunderxt88'], > + 'mcpu': 'thunderxt88', > 'flags': flags_part_number_thunderx > }, > '0xa2': { > - 'compiler_options': ['-mcpu=thunderxt81'], > + 'mcpu': 'thunderxt81', > 'flags': flags_part_number_thunderx > }, > '0xa3': { > - 'compiler_options': ['-march=armv8-a+crc', '-mcpu=thunderxt83'], > + 'mcpu': 'thunderxt83', > + 'compiler_options': ['-march=armv8-a+crc'], > 'flags': flags_part_number_thunderx > }, > '0xaf': { > 'march': 'armv8.1-a', > 'march_features': ['crc', 'crypto'], > - 'compiler_options': ['-mcpu=thunderx2t99'], > + 'mcpu': 'thunderx2t99', > 'flags': [ > ['RTE_MACHINE', '"thunderx2"'], > ['RTE_ARM_FEATURE_ATOMICS', true], > @@ -153,7 +155,7 @@ implementer_cavium = { > '0xb2': { > 'march': 'armv8.2-a', > 'march_features': ['crc', 'crypto', 'lse'], > - 'compiler_options': ['-mcpu=octeontx2'], > + 'mcpu': 'octeontx2', > 'flags': [ > ['RTE_MACHINE', '"cn9k"'], > ['RTE_ARM_FEATURE_ATOMICS', true], > @@ -176,7 +178,7 @@ implementer_ampere = { > '0x0': { > 'march': 'armv8-a', > 'march_features': ['crc', 'crypto'], > - 'compiler_options': ['-mtune=emag'], > + 'mcpu': 'emag', > 'flags': [ > ['RTE_MACHINE', '"eMAG"'], > ['RTE_MAX_LCORE', 32], > @@ -186,7 +188,7 @@ implementer_ampere = { > '0xac3': { > 'march': 'armv8.6-a', > 'march_features': ['crc', 'crypto'], > - 'compiler_options': ['-mcpu=ampere1'], > + 'mcpu': 'ampere1', > 'flags': [ > ['RTE_MACHINE', '"AmpereOne"'], > ['RTE_MAX_LCORE', 320], > @@ -206,7 +208,7 @@ implementer_hisilicon = { > '0xd01': { > 'march': 'armv8.2-a', > 'march_features': ['crypto'], > - 'compiler_options': ['-mtune=tsv110'], > + 'mcpu': 'tsv110', > 'flags': [ > ['RTE_MACHINE', '"Kunpeng 920"'], > ['RTE_ARM_FEATURE_ATOMICS', true], > @@ -695,11 +697,23 @@ if update_flags > > machine_args = [] # Clear previous machine args > > + candidate_mcpu = '' > + support_mcpu = false > + if part_number_config.has_key('mcpu') > + mcpu = part_number_config['mcpu'] > + if (cc.has_argument('-mcpu=' + mcpu)) > + candidate_mcpu = mcpu > + support_mcpu = true > + endif > + endif > + > # probe supported archs and their features > candidate_march = '' > if part_number_config.has_key('march') > - if part_number_config.get('force_march', false) > - candidate_march = part_number_config['march'] > + if part_number_config.get('force_march', false) or support_mcpu > + if cc.has_argument('-march=' + part_number_config['march']) > + candidate_march = part_number_config['march'] > + endif > else > supported_marchs = ['armv8.6-a', 'armv8.5-a', 'armv8.4-a', 'armv8.3-a', > 'armv8.2-a', 'armv8.1-a', 'armv8-a'] > @@ -717,32 +731,43 @@ if update_flags > endif > endforeach > endif > - if candidate_march == '' > - error('No suitable armv8 march version found.') > - endif > + > if candidate_march != part_number_config['march'] > - warning('Configuration march version is ' + > - '@0@, but the compiler supports only @1@.' > - .format(part_number_config['march'], candidate_march)) > + warning('Configuration march version is @0@, not supported.' > + .format(part_number_config['march'])) > + if candidate_march != '' > + warning('Using march version @0@.'.format(candidate_march)) > + endif > endif > - candidate_march = '-march=' + candidate_march > > - march_features = [] > - if part_number_config.has_key('march_features') > - march_features += part_number_config['march_features'] > + if candidate_march == '' and candidate_mcpu == '' > + error('No suitable ARM march/mcpu version found.') > endif > - if soc_config.has_key('extra_march_features') > - march_features += soc_config['extra_march_features'] > - endif > - foreach feature: march_features > - if cc.has_argument('+'.join([candidate_march, feature])) > - candidate_march = '+'.join([candidate_march, feature]) > - else > - warning('The compiler does not support feature @0@' > - .format(feature)) > + > + if candidate_march != '' > + candidate_march = '-march=' + candidate_march > + march_features = [] > + if part_number_config.has_key('march_features') > + march_features += part_number_config['march_features'] > endif > - endforeach > - machine_args += candidate_march > + if soc_config.has_key('extra_march_features') > + march_features += soc_config['extra_march_features'] > + endif > + foreach feature: march_features > + if cc.has_argument('+'.join([candidate_march, feature])) > + candidate_march = '+'.join([candidate_march, feature]) > + else > + warning('The compiler does not support feature @0@' > + .format(feature)) > + endif > + endforeach > + machine_args += candidate_march > + endif > + endif > + > + if candidate_mcpu != '' > + candidate_mcpu = '-mcpu=' + candidate_mcpu > + machine_args += candidate_mcpu > endif > > # apply supported compiler options