From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0073.outbound.protection.outlook.com [104.47.36.73]) by dpdk.org (Postfix) with ESMTP id 4F64D2C28 for ; Sun, 7 Oct 2018 08:20:03 +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:X-MS-Exchange-SenderADCheck; bh=SnN7IB8+0dzr1k4HKg1MeZ0eQm0Jtq9kJneCXWMLJaM=; b=fqdMVkSbUoeWG1BLGFLsPVbjknc7dqMy4GDqrU8/XHTRwqjZDj1fkdcqbJ61yHvGrpQFJFMxZ9OpmkDMqDYqy8cjiwM1LkLpapZ2lHtUX1hnNNZLb85NFu/1sNRHfroaNo4Qk9H5PRoLyCpCFyoW2PFGVLQAeOSJ3zNmbz13J4k= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.JacobKollanukkaran@cavium.com; Received: from jerin.8.8.4.4 (122.167.112.78) by BYAPR07MB5000.namprd07.prod.outlook.com (2603:10b6:a03:5b::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1207.23; Sun, 7 Oct 2018 06:19:57 +0000 From: Jerin Jacob To: Chao Zhu Cc: dev@dpdk.org, thomas@monjalon.net, gowrishankar.m@linux.vnet.ibm.com, ola.liljedahl@arm.com, Jerin Jacob Date: Sun, 7 Oct 2018 11:48:57 +0530 Message-Id: <20181007061857.29451-1-jerin.jacob@caviumnetworks.com> X-Mailer: git-send-email 2.19.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [122.167.112.78] X-ClientProxiedBy: BM1PR01CA0081.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:1::21) To BYAPR07MB5000.namprd07.prod.outlook.com (2603:10b6:a03:5b::25) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d32745d7-e205-421f-7a72-08d62c1ce906 X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(2017052603328)(7153060)(7193020); SRVR:BYAPR07MB5000; X-Microsoft-Exchange-Diagnostics: 1; BYAPR07MB5000; 3:TVpzL/883HZITAD59kq3m31n06x9l+f9fSxXaxBgbOp5vF+OpvimjnM/fXBq3ag6G7DTdJ5GyJKQhL3W4G9NjasXm5ggF0blj2fx3lozZvM5scUfu2MW+rWlrs8koWvbjvjKSOvkx68mO6jQ+zW0jitnsqLacDb0ZtKIkAdC+tIpDWc+R0EnOKqrSqOYtbJ6mKOAgSrUFU3jhVL0c0IWlcktATR3rcqt9GLuxQS7X9WdMQuIv+P0L+AKp65dW4qr; 25:K6y9+JI3MJD6fGngiu9jXSuUGYYK6/G23Gqt1o4fG1ouDNMXM+sWD9FsFlC77Bww+A3YZEP5adFnYEZvRVXnpa0zYP1QcXeIpjIA2fQZVRvaN0W14GRGuTIn6DTvqMb/RA+PmRRH/wqBu8JF6skE6COCNXGGoQfvYKkUhJlms7tlkkgD1lLy83OE4yViLLWJb9bL0W93jfyyfiSTUGItZIfD0+7e1y6xF2PVkUQwptHkq3R/iZio9wgoTYpMIMfJFvZeqBhrlqIJ19T2wIT9XUEcdq7gIqtEs9iMPaX1tL0xV/4sDiweIy8X2vXtcxHZ5fzZiaDH7423TmPswbDDgA==; 31:f9XGdh9QJoGrxH+fHn5vnUaRkthsE3rs5IPZtv1quNKj8yHDC/9sVS+rSGRZ6NfkD/ZfJlVsMwXSue7jiEzIqysmtlDIQ995tqDOUIc5pONwLgtmB5moHu/B8RNH70SovuAzLt8alDcRJSqsuf67bUXFkCpY1B+iVg/J9lET73f+73A0xMUA8oHIDHLT528+QqQwffKSE6sAwCjiN+ndlWrxmV5JNYACT9nTu8nHx2k= X-MS-TrafficTypeDiagnostic: BYAPR07MB5000: X-Microsoft-Exchange-Diagnostics: 1; BYAPR07MB5000; 20:ITPS/kQLZc9m6JseuJu7QEYCFrdaE86zgEIXvYgpqaAUF7gnT4Y0KPfu4KubNOYUSOKpcc5kmK1dtkrgE3IzmuCoECocE56PPt8eZYfn56jd9shDv6RJr3ZT7pLYi55jnhW1yWaVTLXhVDUK/uyN+XrdY0NVAOwcXaKV4p7bjm/nsWNFuH/VgY65fu3B2vKMwAUJZOoaQyuykFlBpJSQy0oOBHUyQ2hyCWHKoWmDU2OiH6rAoikupg3aPiF++apLa2D30t2gMlMDYUhua8n6/xpql0QFpuQC+AfxJlx/3wxCSmmwPPB42H1iGpJshBfw75LHyCT6MqIpvt4dOLLo3TO0WvzbJprKanYNYWColGK+hjvVvZUyoGopwxSOcG6KLpf0LKBEQ/dzgN+S1DT8eod7l/Nkm5DN53imM+n5GIjKhnWmg6dAcciUwNwUYFESmbRxWfEWf+KGiqnTai+KLZbNqeaXKgEndHLmfe5d9qNhhr1HDwn4LYbj4CIoQu+7nwtFF+EuIcoH08nWEad8XAblk7tRKVJAJrdrsjkQMipfK9UR6lpfBJ8bg8jB/Pu8H04ziS5SvhmziiApRxopOMd5OwNWrD8hstPRpxffimI=; 4:JCX+LhV4hwgSoPhI/o6KFqjVuIANVj+G3FBcA6XFQXW55HHAik16oQggqcVEUgpr0PFslZo6oZWNGFP08MaBcV+sGWocjCyjw31Xnt3284UkxKyHrdQRPv3CsiKMbgRANbMKzJKUMI+z60n4Mbo3iU65gTbkoLKAoPx0J08ZV0zZLratOKypc4NHYMHGVQ8+SYOp2o2IGeFEwbTq9wCl30RZc0Bs1MBobMKA/CPeML500JRtqt71mCkuSTNBQHGeBKPL2GSeFMLzmiMKwPSegg== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3002001)(10201501046)(93006095)(3231355)(944501410)(52105095)(149066)(150057)(6041310)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123560045)(20161123558120)(201708071742011)(7699051); SRVR:BYAPR07MB5000; BCL:0; PCL:0; RULEID:; SRVR:BYAPR07MB5000; X-Forefront-PRVS: 0818724663 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6049001)(136003)(396003)(366004)(39860400002)(346002)(376002)(189003)(199004)(50226002)(81156014)(107886003)(1076002)(25786009)(81166006)(3846002)(6116002)(53936002)(26005)(47776003)(478600001)(105586002)(106356001)(2870700001)(97736004)(48376002)(316002)(8676002)(7736002)(4326008)(68736007)(50466002)(305945005)(6306002)(8936002)(52116002)(51416003)(6916009)(956004)(386003)(5660300001)(72206003)(966005)(42882007)(36756003)(6486002)(486006)(2906002)(186003)(44832011)(66066001)(16526019)(2616005)(1857600001)(476003); DIR:OUT; SFP:1101; SCL:1; SRVR:BYAPR07MB5000; H:jerin.8.8.4.4; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BYAPR07MB5000; 23:g2GlMjVxVMYj/YNid1QY/3bxr0coUdLf57/80sYuz?= =?us-ascii?Q?wPsDBCnksEgDgOprJXOardqIJLTVeCxAjbWIKPQ26j9y8K1aqoM7CJy3CwhJ?= =?us-ascii?Q?VOHy4EOEH/QUQXveE7aax0/OEB+tbE+peVAcLa8e9jrvGfusrBbhHpmKkCdh?= =?us-ascii?Q?LhDNy5kY9g5VTJmkU8ibnKvthiXq84b0k6qTXQ7uIa7K+DwWwGPBq3GkYLtR?= =?us-ascii?Q?unFqQBOAAQnChcLd1o9TDOfBMybIy2/f4K8e+JpO2iH6P04/sUdX27wkavWQ?= =?us-ascii?Q?GaF55cXG03QqNTFhSHEJy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IvSp/eeW8Tm25+5xCusHcVN855rOm0yeeV062TbY1x+TysQprrgHZHH+6Wms=; 7:BduzIhST8vtXbvX2/SHigEi+561xUwA44wC+kxDnl0gJVOH/5EyQCKcUCMKa40vYXOElNQKgFt9W6DWGL2Akr1ftzapDQ+bDVISgQsacSQl9Ko2r4Fb9Dlqlnx5CH9V95LxvSNUPWACaa/g+YZWJS1CqjaKKH88YX1dJGvDY5i+DYaZn1+QkLScRogWzN8Gvm7+W1TfHGOGYaeiXAPKy5stfyT9/ZW3HXSbtyX8G+aadqo5jCk2WQEbp96PBQVDU SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Oct 2018 06:19:57.4413 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d32745d7-e205-421f-7a72-08d62c1ce906 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR07MB5000 Subject: [dpdk-dev] [PATCH] eal/ppc64: add support for rte pause 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: Sun, 07 Oct 2018 06:20:03 -0000 Add support for rte_pause() implementation for ppc64. Signed-off-by: Jerin Jacob --- The reference implementation for Linux's cpu_relax() for ppc64 is at https://elixir.bootlin.com/linux/latest/source/arch/powerpc/include/asm/processor.h#L440 --- lib/librte_eal/common/include/arch/ppc_64/rte_pause.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/librte_eal/common/include/arch/ppc_64/rte_pause.h b/lib/librte_eal/common/include/arch/ppc_64/rte_pause.h index 8bd835764..16e47ce22 100644 --- a/lib/librte_eal/common/include/arch/ppc_64/rte_pause.h +++ b/lib/librte_eal/common/include/arch/ppc_64/rte_pause.h @@ -9,10 +9,17 @@ extern "C" { #endif +#include "rte_atomic.h" + #include "generic/rte_pause.h" static inline void rte_pause(void) { + /* Set hardware multi-threading low priority */ + asm volatile("or 1,1,1"); + /* Set hardware multi-threading medium priority */ + asm volatile("or 2,2,2"); + rte_compiler_barrier(); } #ifdef __cplusplus -- 2.19.0