From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0046.outbound.protection.outlook.com [104.47.42.46]) by dpdk.org (Postfix) with ESMTP id B967847CE for ; Thu, 11 May 2017 12:11:25 +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=Y95vehS1MPpm70UXdRo7H6Wk0lZyvrD2YAK/6q+QcJg=; b=LP8AIgcBIPB4e5O7W9GE9OynLqa9jNgYSOmT5QauVO7sVxa6KkzBj5MjStKF7PicVKccNTEgOi1junbqXwew1ZtoBDIzV0pUIlyyOGc4b4Hw3hJzGnBIzvKLxQTlTYRIhd689u5ZWjZgCqXUEJy8NDqEjm61JuBzsJI7SpAFO1c= Authentication-Results: dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=none action=none header.from=caviumnetworks.com; Received: from jerin.domain.name (111.93.218.67) by BLUPR0701MB1716.namprd07.prod.outlook.com (10.163.85.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1075.11; Thu, 11 May 2017 10:11:21 +0000 From: Jerin Jacob To: dev@dpdk.org Cc: thomas@monjalon.net, jianbo.liu@linaro.org, viktorin@rehivetech.com, Jerin Jacob Date: Thu, 11 May 2017 15:40:43 +0530 Message-Id: <20170511101046.26456-3-jerin.jacob@caviumnetworks.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170511101046.26456-1-jerin.jacob@caviumnetworks.com> References: <20170511101046.26456-1-jerin.jacob@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: PN1PR01CA0070.INDPRD01.PROD.OUTLOOK.COM (10.164.136.170) To BLUPR0701MB1716.namprd07.prod.outlook.com (10.163.85.142) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 89c19bda-f330-4f6e-fc38-08d498561424 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131423075)(201703031133081); SRVR:BLUPR0701MB1716; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1716; 3:mS02fn/gZU+35jpieQ00qjU8ipD4FYkHreSdW2ON+c6+1bQMhmZ05B7ZxME6fvGNnZ+xAW9CEot3vg+m2BRphoMSCFqDdZ0sqUosUjebS8ym5d6zsiYMI4CSiz0ToPZ6oiMkqmxd1wpjxs/Fw9LPhpEmLGTkOo0/bxDj6I8fxr4LpnuAZq94noC8rappsE5c19Cgr2suw+kAumt6Bsph4tEdgWdX0Fdu4BREAAROOYG8xFk/zSBUcz7DhzmVJYUVyjwoZo4e5j0GeapBxWnubbJGnNcm/JLME4ljSGfZj7hfTd/DFmbBAhQBbYoVJJDLj4P0j/RpASY5s725coqNZA==; 25:RJl754JEbmjq0zu+06Ox1H30Hnb4AjuHeXweW9WVO8qPAIpk1Tw5Y2+F1ar4uy6/ID6BlksaY6+hfrcP08nGLhZvhKJYhvmGTNgrkkJ+poiRzwI1x9W7amoNZ8sGZekeDVpcYdh272vKQiNbnX3vi39e/em102wbC6XXBAu3DMI6OmHchpZYIhqFQGMmanC/Y7lNlXtff0PhYVh4UO0/B9HiIUli3dphfDTW4nPvgrCnJpteoBMkZDjLddFdyUPaG8/vQBqVlRsiXaBGDLq60HiIqf5AZYtNzD36iF2DzpnGNoteOJZiWZXz7c/ztyAh11QDM4hC1GDDoCxLtRlubzpxpwSyH3fN4k6wGRcKObe8aVYka5a5x1eO5rYm1oqjysZVk4f99P2FlF2T7r7/V5/t5TOOzh2zUtL5nOncs5gVnrlATi88uwr5lBunnvDKRoJXRJGSWb35N7myItHZzgX115izLyeD+yzPjaNapEk= X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1716; 31:KDSozRVVPf7pLsBraVA7SuXyftqQ4Il6WZkd8SF04lzzMSWa6dqJdmC+fzcO/CJWQWKhEEjG6DHXj2A0FcK7LDdg6MmrSsYcB2UI8uaVWphS6agbsDoy3QKPOBiNBuBG4bYXd5jweMrrHKD+XEv4gQl3J7lb6l3WytlxHuyxD+/N9ceIyq7keXyrIm7BY5QCicjSTXUFeUeP3WpyN8dGF8BE8UjDzvnzqT/dRYO0zzs=; 20:lj0f0Pgrd2zB95XWggVzedfTXQvniEDa+nPVG+enwCxstCgnIiE6VOvmnWvDdm/LjEVaoGFtgCpqPvcNFms2N7dzNHx94FKODUoyYLA5xqWExt57ohvoXPrk1PlLwr4ualoEiFUFUabUKG5dsurkzhkYSTl+7xCPygU36wNJiFbXg7ISnoS4N+iJI4bQlB5dETMi7ptRvGI2+kVJoh7foC3qabu3I+Sqhob8LWmbIxuKwpwZhFRZb628F0PG1XTCDl6EYqdpLKyC+7QF6gFt8MCkcni5K5nN+SJEZ1pp+/fWKdcEq7DYykiiB4bd7s5VmdViGQQNT74iNOVnbP/AiWB9lOnR33tdNSETip91FZrSifDarqljsaPivMNjMBtTi6eCItgHAbFezfzjvN8yxBxwMH8byx4pSTGzDbQDNAgn+x2NVkbbrvjSjpZuVTaq0BduulkybTWjvQWZZM3y1Yr2bz359dW6TWhjxdA4TmVaT/RvWm87Q8b/EwR3tUWp+2GvfSOTg9Tyeu7jM9ciRKNBx6nTu6CU/34XyTCaBVTrzZVnyYVvwipi1Zj6hjpJck/AZyal13PvsUQb/l9O++8q/+kpnAUVPIG5IAV1bWo= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(5005006)(8121501046)(3002001)(93006095)(10201501046)(6041248)(20161123555025)(20161123562025)(20161123560025)(20161123564025)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148); SRVR:BLUPR0701MB1716; BCL:0; PCL:0; RULEID:; SRVR:BLUPR0701MB1716; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1716; 4:ViVCay+c7Wto9PVBrePDWLYN88L4rFoqxeaq5Q+DZJ22Gh97XDPioqahxZoblzPKzTSH+dEKCX+kPxD0ICPHlMPaSBeTDRDIMLfmmqZO5spLYOpTBRrzqeR8kzUjhzOUX8T+FW+sG3vPuG9suVGQnPXhLT/F8GXxVviN7dV65aXlFp0X15bQBJYjolXspgZaKZSyXw4wdi7X87sBzQPWuE1HiS6E5FjUB9o2Gdx+LqQ8SBIFjiVASfXDZuljyhu6RSDrJQFancrDLN3TBWijMA7utmvn2Y+RCHnvsno3yzlUfIQLSAVz8Usbm0RRJAo1dYMXlj841VZ3OPDT8m6m6NV0xnSDKqgIWcr0wzQfP+uls+NEB5xkIRFcKIoXk0N8VSoBPqUZafl/JohztsNQ9gSi/WxngT4y1kpdJAxUWYeXNoQF2OT9TSVA6vHJ7ffHSf8CcrM7g/e9d4sb6W5KcjlX6psr7aJl7W6lAQHcY4dtDWFN5Zsy3yvNj1X4F842Zi39M4gpDPFYGHH05QMZ7lqPhq45+qET58vp2fYMKU816lUFqKzUAea8DzXlwrehqvrbFPZE2GiwKMBTUXiIMFyV4fTA8zr4fTJERHmbD7c2Tu9NB9BpuNx3tDORUEKxeWgALff6zM7znLog07T75/P9E2IqI2bbj3qN+NPcOm4Cma7urfC3lUCazNg8DkW0weqR2OiaIMpU1OS7HvrdR0GzMD4okuKOIpc1VFAwSlgm0z1CQZauRHiu4r1AKIn4MHCSo+75UarqY5jT4T1j1A== X-Forefront-PRVS: 0304E36CA3 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(39840400002)(39450400003)(39850400002)(39400400002)(39410400002)(5009440100003)(2361001)(3846002)(110136004)(2351001)(478600001)(107886003)(38730400002)(189998001)(25786009)(4326008)(72206003)(6512007)(36756003)(53936002)(305945005)(7736002)(2906002)(1076002)(8676002)(50226002)(50466002)(6116002)(48376002)(5003940100001)(76176999)(50986999)(66066001)(6486002)(47776003)(33646002)(6666003)(42882006)(53416004)(81166006)(5660300001)(6506006)(2950100002)(42186005)(6916009); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR0701MB1716; H:jerin.domain.name; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BLUPR0701MB1716; 23:jMCYaL2gmkogQxkisBxhh3EprSIOjp3gEUhaHXz?= =?us-ascii?Q?M1bTRNFmcKjKvlZySNU813j5XAdGu5RXscJaQa+UHt4F6lPHB8uj1fBPAAl7?= =?us-ascii?Q?z84sWtM7p2xnvZjjBS61xRxgWDXQzoCi84fzvky27l7EpD2iWS92tSg8ZnmI?= =?us-ascii?Q?nuqM5nHaHtHf5VDkTRBRWRndX3UBlj+MStIgn+2PHRYxEf5zOASUZIkPAdat?= =?us-ascii?Q?cp+Zv4fXJe1uOV4I4QE5cf3SpcJ82cIF8w4hOVUSqxcsh+tGnziC/u3PADs1?= =?us-ascii?Q?yvKQSNrFFgtGpEEVZyLGti9obyjAsDzZmUD6i3R/73sQz1OjhbpKPWEsgTQ+?= =?us-ascii?Q?JqlqovuCb2zL7tpde85qT4wOZSVhHOWNyw+uwJcHaQvg2bzZecwMlv3VuaUc?= =?us-ascii?Q?Bw645EwXIA2PdeDIAIacx62u5kpG8jVps+9/qsSjlohNEgSMqAxhHu2IURuu?= =?us-ascii?Q?PP+765qDvg4msBW5EeuonNc38HNZ7gNM0afqx35eqc6y+tAW7F1xFwZsfWbE?= =?us-ascii?Q?P5yjK+3tau4yTsEzOdmHqQJl1VddcDQqgczygB7I1T53reku8dXVupqr1e6m?= =?us-ascii?Q?pOk91N3pJi1hx0/zESUmml20Mwlzupp7eWUWnPFvtuHTQJUv+FWo8dSKDMbq?= =?us-ascii?Q?WBVaRVfPFacezfcPdcpuzVuCnAOmTn66LhKFfkvnDQ9maYPLRnXrNyWsglkO?= =?us-ascii?Q?HNBe9MQHo7GF8HJYgCabQQHsjvFr39Tef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WYnRf3vTxncAeJqokM32Uv7clJ7AAy9grtWvnU3E+zJN9sd9XiDD3FZkcXbEHb58MV4kXWbaNGWnBdb+k0Q==; 5:hniAA8Dg9QNUgykoW8JEma5Pb18HulcpBkTA0mIZA2v2fqRRvae24Yqz3b9PiPgyUpOW37o70W0P5HP+/N6bIuPTPJ1QxbLWF3l0zdUOlJJLH82wHKUuOEJ61s13owVze6rYq3Xr7qEMRQdw0kJIlQ==; 24:g/xGwW53RlQLHP2OUy99GQ/d8N3xaHJV9HSWB8rGu7wW5a0MG4MLL5HJAShAlB+wHcdzEfyyt5yQ51o/rFZE9rkOMDeV/t3x5oQTCMBU+i8= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1716; 7:r8c902g5fJb9yCS1VAC9xG0qb/J16ZoNAeZ0Ro6UM9dR/6Nx3BzZefGi8SsLcsshDeTvNW1ZGcCyWRpS9Ym9Rg5Abqt/3gkyA6GZGyHjDAlvh3HfNfyt+urQKZOKG9OcSKNJxlB+OQsaFEUYDwMg5FwpzCAWTSL3LlQEqphyc6d55O7dx3viWuxVsQxnaJ5DiHQ31/t0e1l7m7kBjLG//xGxl9GCId1tyta1ad6T8Rd71M5jP3dW5AhyMvMAPNdijuznZPWIBQy/6XzIbrn1iEdtOCj5kxmxpG4zWXVK3EcbWluPo2H/AfGDsjpOtY3y2Mw5lV8eKcBSkbWyUfq5Bw== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 May 2017 10:11:21.7409 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR0701MB1716 Subject: [dpdk-dev] [PATCH 3/6] eal/arm64: rte pause implementation for 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: Thu, 11 May 2017 10:11:26 -0000 CC: Jianbo Liu Signed-off-by: Jerin Jacob --- lib/librte_eal/common/include/arch/arm/rte_pause.h | 4 ++ .../common/include/arch/arm/rte_pause_64.h | 55 ++++++++++++++++++++++ 2 files changed, 59 insertions(+) create mode 100644 lib/librte_eal/common/include/arch/arm/rte_pause_64.h diff --git a/lib/librte_eal/common/include/arch/arm/rte_pause.h b/lib/librte_eal/common/include/arch/arm/rte_pause.h index 0fe88aba9..9b79405e6 100644 --- a/lib/librte_eal/common/include/arch/arm/rte_pause.h +++ b/lib/librte_eal/common/include/arch/arm/rte_pause.h @@ -37,7 +37,11 @@ extern "C" { #endif +#ifdef RTE_ARCH_64 +#include +#else #include +#endif #ifdef __cplusplus } diff --git a/lib/librte_eal/common/include/arch/arm/rte_pause_64.h b/lib/librte_eal/common/include/arch/arm/rte_pause_64.h new file mode 100644 index 000000000..cae996de8 --- /dev/null +++ b/lib/librte_eal/common/include/arch/arm/rte_pause_64.h @@ -0,0 +1,55 @@ +/* + * BSD LICENSE + * + * Copyright(c) 2017 Cavium. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Cavium nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef _RTE_PAUSE_ARM64_H_ +#define _RTE_PAUSE_ARM64_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#include +#include "generic/rte_pause.h" + +static inline void rte_pause(void) +{ + /* YIELD hints the CPU to switch to another thread if possible + * and executes as a NOP otherwise. + */ + asm volatile("yield" ::: "memory"); +} + +#ifdef __cplusplus +} +#endif + +#endif /* _RTE_PAUSE_ARM64_H_ */ -- 2.12.2