From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on0085.outbound.protection.outlook.com [104.47.38.85]) by dpdk.org (Postfix) with ESMTP id 7948E1B3FC for ; Wed, 11 Apr 2018 19:02:22 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=E1pwe/LhkEbXCMcOuHtGRT1QpErkA6YSxs5qG2dROp8=; b=Hnh4xD0KUOCVF5T51vBEgzuhX1X2U+jGMJo1ac/xuBs8ONCmVWiwR+/eZ/bBZPtPQzdFY/wbn4qPgRbm/z4JWh/75+0lDT4SSNNgkvmaqZ5CuusIbMM2PdFk81ZvCzKl15zqT3+bDUZ3a5bpDdtT4YHELzcsRZtF54T4lyJTRR4= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Pavan.Bhagavatula@cavium.com; Received: from localhost.localdomain (111.93.218.67) by DM5PR07MB3466.namprd07.prod.outlook.com (2603:10b6:4:67::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.653.12; Wed, 11 Apr 2018 17:02:17 +0000 From: Pavan Nikhilesh To: jerin.jacob@caviumnetworks.com, ferruh.yigit@intel.com, stephen@networkplumber.org, konstantin.ananyev@intel.com, thomas@monjalon.net Cc: dev@dpdk.org, Pavan Nikhilesh Date: Wed, 11 Apr 2018 22:31:50 +0530 Message-Id: <20180411170150.11985-1-pbhagavatula@caviumnetworks.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180406110103.29163-1-pbhagavatula@caviumnetworks.com> References: <20180406110103.29163-1-pbhagavatula@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: SG2PR02CA0006.apcprd02.prod.outlook.com (2603:1096:3:17::18) To DM5PR07MB3466.namprd07.prod.outlook.com (2603:10b6:4:67::21) X-MS-PublicTrafficType: Email X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(2017052603328)(7153060)(7193020); SRVR:DM5PR07MB3466; X-Microsoft-Exchange-Diagnostics: 1; DM5PR07MB3466; 3:20bJwn3vzgCqrIpUHNzAmX15jolJsasm615mPFufUpZi6yw93jIp9zHgTsF74eQ2c+S7GTmvVROIKlz9dBYn6nIX/sYEdIrTIcAkmj6km+919hOaBGgmEn2tq4b9kKOlLghrMmExJxthQ+NMlfVfS2Uq8MkJugCs4vCrT/ZdYQgJHrFsxl+DhOEZWvhh8Bxbxw8/1+10SMVHnm2OglvacytAsIi3sGafRbtdWmGLD2um2+kwqUQ5RjA4eTsKx7wZ; 25:KGKRpMsuksVpgHnGC6Nt2+dpwix3E9/+yjLXW+L4jYZvZqOHL+iDNrLBHyswwGReuyjST+Qm0i33zLWgjqdyj6Bda6FyfXH6bTgOLSYvr0f6O5vWPIRbhTI/UtRyShG7djE4xINetqv4pN3HQCGPQHkKXyeT77MGz5Eb1cHiDMEwD/hh2sjMRT4Jl1vjKotjFves7GsA0ePPTV5tD1D9v3Q8+cdqUTyMs9AQf54Ak6r9ZTE+Xbj1E/HT6hwtTDH5GbydB1j1vNhDHAUpUaXjr19asuejrvXV7VRohrY71ZZZzd7XYQQ0QXWyPRLZj5AHB26MJT38jGjEhCzj2/TKCg==; 31:Ok5Uy9st/1KKgVNImuuHabBne08sct9Oh7zY1EvWUv5FAvJWtRmTFR+/ldemYFgH98icqmj7CJph2MFy7kZMqgpcX894QY9ohoR5kM5R4DjUiUd5/l5wkkXBltwie+AHMl/dmVJTPtb4710+H84/IC7bgG0BhmNON2tpzc0glovO5Se8oH0Z+I21OFodNPPWme2ejt0MsTnrmmkn3DbAQ3GjVpd22iceOx0uOtVqbA8= X-MS-TrafficTypeDiagnostic: DM5PR07MB3466: X-Microsoft-Exchange-Diagnostics: 1; DM5PR07MB3466; 20:1ROUbU1e/kBHk8Un9wrfuUbik15zKZ46leFS0mvmNyq55dd4aqD6BfoyIbMo56ASQwrDTNv1HbpUH8QZiL7fx5Lc0V8g9mEQYnbXJYyHjPrRh3T7BtgwD2uSiu5gOYC9XT63xW4RHO5aQQyFp+YXwmHHIR2EXxEMs1/jnsZpyMqSmltdx5XkcZRLilVfSZd6UeUmgzHj7ZMmhkLNT8m+cr00hUrrDe9IzOWxvz+mkGgutaKhs7/loAi7aY98JwSDI5b8puKvLzSKtfznYzL2WVyptZ0ujqBD9u6v8TokysXisJNwv7yZ9OmAxA+CzbqSvQRXXWaqD1BU2uyf5X9PUafBjVUR5AVKX1S0HlnEM4QAKd26wgnZdFGYl9fiWFD51YyIv+vhHSDX3l9moeH7FqD6MwE2ICL4efakRSPOg8PUAXQ6o8QZk3iPL+tEpdOBmd4ewD5AOOFqSH5xF/O/n/wnfNaRTTZ0oZm6FGS713f5ESZfUV82QKXf7OOkzIOMWanEhCv9gITv5T0K8Ngi5euyGG6bFB7WsrjXaA9+SRmrXUFAr5hQZtLrUpbzclWBplU70A3At4CjXZTrozG7VcmovQGp6RAKFqb2A1znEDo=; 4:fmVwDFU1f2uyFPYv2Uz9mLXWa2qMJxI7m+Qs/2eAVXWld6T1YZ3H/hb+2ohzeei8Yio3XgrQNpXKhd2QvbQS0XPZKBtt8wDKI2SgMZIyMdXmDDXjvaUY6sHDQei9SLhBNkJSacTAOVcjwE+c2t1ypsm6Xx3sha6eMRfy7beGhWEEWL53vIlfIgMQjYUJMZARxXkDgKpVTfEzzv7FU2AFdp0PhnEkdzLvjG0BeC8Ejv5mqdmDwzl4o/Y0IKqN5+Xc+4Xr0Q2QzpPuU6gOMwF8/w== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3002001)(10201501046)(3231221)(944501327)(52105095)(93006095)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123564045)(20161123560045)(20161123562045)(6072148)(201708071742011); SRVR:DM5PR07MB3466; BCL:0; PCL:0; RULEID:; SRVR:DM5PR07MB3466; X-Forefront-PRVS: 0639027A9E X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6069001)(396003)(39380400002)(39860400002)(376002)(346002)(366004)(199004)(189003)(1076002)(3846002)(42882007)(386003)(48376002)(316002)(50466002)(105586002)(16586007)(16526019)(52116002)(36756003)(76176011)(1857600001)(51416003)(26005)(50226002)(2906002)(446003)(476003)(66066001)(6506007)(8936002)(81156014)(81166006)(956004)(486006)(6666003)(11346002)(47776003)(2616005)(8676002)(97736004)(478600001)(5660300001)(72206003)(107886003)(6512007)(6486002)(305945005)(4326008)(5009440100003)(25786009)(68736007)(7736002)(53936002)(6116002)(106356001)(42262002); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR07MB3466; H:localhost.localdomain; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM5PR07MB3466; 23:I3hhLcVuA1aP4ZpjHRa61jaBb7rLrc8d4rj5Wf96Q?= =?us-ascii?Q?lchpnJ7lGAS6tC67ipbKH+Pxh9Xr7hMoxQQ++z6hpDFAcpN1JNBRqFz2y6Kk?= =?us-ascii?Q?7pNdV/SA4tuPE/NqJD/dKUqpVThiilk9LcHQOzJPKFShx2APeYkBDCQFDRju?= =?us-ascii?Q?9nmywymAH1dPk7SgYPNEr92yn+xy2KycBE1ahrtNwPmvh3K9DO9c2+6xIVOM?= =?us-ascii?Q?oV3ezCy9gZdKWcHjidp1dX5vquFZdiWO45qcauONwOswT4JCIhzRsnhGgW4w?= =?us-ascii?Q?6vlfkzdC8mF9YJJMV/1OUQOEwJRzfy8QaUFMqGmZvz635ej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yrwrIUyKspI8EvbtIoVHEtZoT4DPmsxOQKZwuhupIEMje91/3RhX5U= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DM5PR07MB3466; 7:59AAkT+JSfVbwqeg9i0ebgG99A0SYxt+m2BP6ksY4gxiHsiwjBexOBXNIu9P2MN3ii3vK5fsHhdlN8t6V2+yRP5Bv19TVrshEF2FbEtEwQim7uyKYaNfDXQKAx/dULHjcOMA65eCavfHII8GtIoONIPosRzmXZTTan21kVRd6LhtT79ITN5D229a2+moJ/ym/scUDgjCQij3fqnIAQlJZpOT6dcNpM8sdksbJmoLsb+lsfYYM5TO6qtrxwJaWsuI X-MS-Office365-Filtering-Correlation-Id: 314b7ee4-d1c9-4e03-8a3b-08d59fcdfcdf X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Apr 2018 17:02:17.2881 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 314b7ee4-d1c9-4e03-8a3b-08d59fcdfcdf X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR07MB3466 Subject: [dpdk-dev] [PATCH v2] eal: fix clang compilation error on ARM64 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Apr 2018 17:02:22 -0000 Use __atomic_exchange_n instead of __atomic_exchange_(2/4/8). The error was: include/generic/rte_atomic.h:215:9: error: implicit declaration of function '__atomic_exchange_2' is invalid in C99 include/generic/rte_atomic.h:494:9: error: implicit declaration of function '__atomic_exchange_4' is invalid in C99 include/generic/rte_atomic.h:772:9: error: implicit declaration of function '__atomic_exchange_8' is invalid in C99 Fixes: ff2863570fcc ("eal: introduce atomic exchange operation") Signed-off-by: Pavan Nikhilesh --- lib/librte_eal/common/include/generic/rte_atomic.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/librte_eal/common/include/generic/rte_atomic.h b/lib/librte_eal/common/include/generic/rte_atomic.h index 8652c0264..b99ba4688 100644 --- a/lib/librte_eal/common/include/generic/rte_atomic.h +++ b/lib/librte_eal/common/include/generic/rte_atomic.h @@ -212,7 +212,11 @@ rte_atomic16_exchange(volatile uint16_t *dst, uint16_t val); static inline uint16_t rte_atomic16_exchange(volatile uint16_t *dst, uint16_t val) { +#if defined(RTE_ARCH_ARM64) && defined(RTE_TOOLCHAIN_CLANG) + return __atomic_exchange_n(dst, val, __ATOMIC_SEQ_CST); +#else return __atomic_exchange_2(dst, val, __ATOMIC_SEQ_CST); +#endif } #endif @@ -491,7 +495,11 @@ rte_atomic32_exchange(volatile uint32_t *dst, uint32_t val); static inline uint32_t rte_atomic32_exchange(volatile uint32_t *dst, uint32_t val) { +#if defined(RTE_ARCH_ARM64) && defined(RTE_TOOLCHAIN_CLANG) + return __atomic_exchange_n(dst, val, __ATOMIC_SEQ_CST); +#else return __atomic_exchange_4(dst, val, __ATOMIC_SEQ_CST); +#endif } #endif @@ -769,7 +777,11 @@ rte_atomic64_exchange(volatile uint64_t *dst, uint64_t val); static inline uint64_t rte_atomic64_exchange(volatile uint64_t *dst, uint64_t val) { +#if defined(RTE_ARCH_ARM64) && defined(RTE_TOOLCHAIN_CLANG) + return __atomic_exchange_n(dst, val, __ATOMIC_SEQ_CST); +#else return __atomic_exchange_8(dst, val, __ATOMIC_SEQ_CST); +#endif } #endif -- 2.17.0