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 BA5CDA0A02; Fri, 21 May 2021 05:37:15 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 347DD40143; Fri, 21 May 2021 05:37:15 +0200 (CEST) Received: from szxga06-in.huawei.com (szxga06-in.huawei.com [45.249.212.32]) by mails.dpdk.org (Postfix) with ESMTP id 81C3140041 for ; Fri, 21 May 2021 05:37:13 +0200 (CEST) Received: from dggems706-chm.china.huawei.com (unknown [172.30.72.60]) by szxga06-in.huawei.com (SkyGuard) with ESMTP id 4FmXKn3p8YzlfNw; Fri, 21 May 2021 11:34:53 +0800 (CST) Received: from dggpeml500024.china.huawei.com (7.185.36.10) by dggems706-chm.china.huawei.com (10.3.19.183) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Fri, 21 May 2021 11:37:10 +0800 Received: from localhost.localdomain (10.67.165.24) by dggpeml500024.china.huawei.com (7.185.36.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Fri, 21 May 2021 11:37:10 +0800 From: Chengwen Feng To: , CC: , , , , Date: Fri, 21 May 2021 11:33:54 +0800 Message-ID: <1621568034-29269-1-git-send-email-fengchengwen@huawei.com> X-Mailer: git-send-email 2.8.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.67.165.24] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To dggpeml500024.china.huawei.com (7.185.36.10) X-CFilter-Loop: Reflected Subject: [dpdk-dev] [PATCH] config/arm: add checking SVE cpuflag 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 Sender: "dev" If compiled with SVE feature (e.g. "-march=armv8.2-a+sve'), the binary could not run on non-SVE platform else it will encounter illegal instruction [1]. This patch fixes it by add 'RTE_CPUFLAG_SVE' to compile_time_cpuflags, so that rte_cpu_is_supported() will print meaningful log under above situation. [1] http://mails.dpdk.org/archives/dev/2021-May/209124.html Signed-off-by: Chengwen Feng --- config/arm/meson.build | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/config/arm/meson.build b/config/arm/meson.build index e83a56e..9b147c0 100644 --- a/config/arm/meson.build +++ b/config/arm/meson.build @@ -480,6 +480,10 @@ if (cc.get_define('__ARM_NEON', args: machine_args) != '' or compile_time_cpuflags += ['RTE_CPUFLAG_NEON'] endif +if cc.get_define('__ARM_FEATURE_SVE', args: machine_args) != '' + compile_time_cpuflags += ['RTE_CPUFLAG_SVE'] +endif + if cc.get_define('__ARM_FEATURE_CRC32', args: machine_args) != '' compile_time_cpuflags += ['RTE_CPUFLAG_CRC32'] endif -- 2.8.1