From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from na01-bl2-obe.outbound.protection.outlook.com (mail-bl2on0060.outbound.protection.outlook.com [65.55.169.60]) by dpdk.org (Postfix) with ESMTP id BF15E9AC4 for ; Wed, 2 Mar 2016 14:21:40 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-caviumnetworks-com; h=From:To:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=jCcYP7cWH2LIfCWNWfW1aFl30cXbV9lKYfJHnCOrX4c=; b=AmHAmkTEsZw82xmB/vTaeTft3EeSneLvIElXieQDvWjCmvsOfk0VSYFZ/sP25XAa1iKu1H7qAkKzbX4J3JXu/1ntGe3ZZhrXx18uEJcg87JAXJ9/fPwJBK4KOJLToNPqjmMpyhR8WtFI09C8cxkyz0+nsG5soc4dhmvtIYWlaPk= Authentication-Results: dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=none action=none header.from=caviumnetworks.com; Received: from localhost.caveonetworks.com (122.166.168.2) by BN3PR0701MB1720.namprd07.prod.outlook.com (10.163.39.19) with Microsoft SMTP Server (TLS) id 15.1.427.16; Wed, 2 Mar 2016 13:21:37 +0000 From: Jerin Jacob To: Date: Wed, 2 Mar 2016 18:50:59 +0530 Message-ID: <1456924859-18841-1-git-send-email-jerin.jacob@caviumnetworks.com> X-Mailer: git-send-email 2.1.0 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [122.166.168.2] X-ClientProxiedBy: BM1PR01CA0042.INDPRD01.PROD.OUTLOOK.COM (25.163.199.14) To BN3PR0701MB1720.namprd07.prod.outlook.com (25.163.39.19) X-MS-Office365-Filtering-Correlation-Id: 7dc79e9d-4f06-4b1e-1fcf-08d3429d969a X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1720; 2:QaBxc2MCqsAUPseJzzNrVOKzH/Pxihb+KKGr0kmC2/QeXLWgPbZU/XHk8WIa0UA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nECf39x2BT/k5h97hQj2HPxovdxz5+1Z1LeFGCq31xGh82/v5marqO/LaH/v0e05NqtAmxX5NvzIeKCiu4II33L8cwl6FbfiPcHpwY/4HfOK0DFr3gLB74y8DtUavXcJ0N2E6tjCtVl50zynHQg0kBeOXIxucV67ULvN7QVF+Rc3Qibt43WpxUPu9ouRDN2s1/gSfSPtjUfQDDbRvKAssf1MPYpf05sz1oEiWG8wb8F2HCRFmdzG1Elew= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046); SRVR:BN3PR0701MB1720; BCL:0; PCL:0; RULEID:; SRVR:BN3PR0701MB1720; X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1720; 4:UCz90pz0ioFMYw9mS/WIZi5HgdyymTwbLQzTECFfiXV1cLejJDAy4Bok1/RDpDGKfVQqmTlxzPuwrz2JhiENluLppM5XBaI1/hxpN5rq1nTaHyKw4eQxsTIL0b9l3CVkuDlBobWyoI6QGmALAJrjbo19Wxt94f+A45E1iBBwLeXG1O6fZMuSY6pkvdppAMRn06RnmdaAYmghNmeibKIdKDvwN0WRLpKmczYJkY3vxKe/3k815u9RQdFTC8Tj01VsveYbh+7mDV+wqKusk1KbE4vtEV+2AlmI0A+U4MrSuXeHD98vCwZYdA8wZcIduYwzb3q0DVVlv/QavoxUegPbIRsisLt5pw5NB4UXhx8/3xt3FDgDhGTRd8+UL34D/Dsq X-Forefront-PRVS: 086943A159 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6069001)(6009001)(3846002)(48376002)(4326007)(77096005)(1096002)(107886002)(110136002)(33646002)(6116002)(19580405001)(586003)(2906002)(5008740100001)(50466002)(66066001)(122386002)(19580395003)(5001960100004)(81156009)(4001430100002)(40100003)(575784001)(86362001)(87976001)(47776003)(50986999)(36756003)(229853001)(5003940100001)(2351001)(5004730100002)(53416004)(42186005)(92566002)(76506005)(50226001)(189998001); DIR:OUT; SFP:1101; SCL:1; SRVR:BN3PR0701MB1720; H:localhost.caveonetworks.com; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN3PR0701MB1720; 23:PB+v7E3p8TQLijMjnyUDQiVBWbjOb4bMmATlPnA?= =?us-ascii?Q?TeKEAEEKN8BWzJv0I9q9AGfrVZUWI+87a+lD9iLqiBLMWeWOT0dkfBzb04SB?= =?us-ascii?Q?Uzx38zvenC0FpiXUGJ7ThEo6H4attsfVsQpkRX5pp4t6qyb9Vh3ZSzlDDAjP?= =?us-ascii?Q?FVLEX3Rah9o4cpdB03/+1zzdoTQ4X3uWmawHO1+rqleCJrzzY45rR98UXtQ0?= =?us-ascii?Q?oO7bF5qkO/KYiCKuWtx9cHVryPRrHjnut5O5yn2i/vtO/hOGXBAEX/BBCd3w?= =?us-ascii?Q?ZcDiX0ZzfmgTTspQSxjeGtWRJVADIkjzrqsAgt1QfM9V5f71RdOuZz417LEW?= =?us-ascii?Q?bJITQxE+hpGB/5iVciqrP01/Hgy9smiUPI2YVcGAuou7GQWzq5x1e0kWgnyF?= =?us-ascii?Q?I3Zji5cT3Wyn35nZWskZDY9SdGK8OSd0NCCRp1aAoqe+AvprMmD6CJxBbWHa?= =?us-ascii?Q?82Vv9X8BDHNfZ1SLi69VxAT5k61HtH0hMp8G4ulCmdtcJNYiBmAnM+YXwigJ?= =?us-ascii?Q?mG7XcQZ6ZDLUQw0+uOXX7JTNDl5VgFnowsNdQk+TCZ67FV8RFjalf90y/Rp5?= =?us-ascii?Q?Lfm0l5UXczEllP39mwXZzkiJdNRPhYRdzGBXuIUV0Fozh+rblifYt1S+7INU?= =?us-ascii?Q?93N7I5nxSEixIFQLQHy7LOunSWUF6Cxd0xkJN95e1KQdy9vsumb9tZ3phnFS?= =?us-ascii?Q?nplgAL2M6UrLhf12dmx+WhU1raBy9vFpyWO5J681YgNo/rLDnyfEP2HIIzVN?= =?us-ascii?Q?o5nKIBkIbKSWFmVOMxHLeVufw2gq6kBm2TJWK1R//Ui+bGD2mdfPOpzNBd+0?= =?us-ascii?Q?iDqVD06NnG7AfRkCDodhG0e5WMi4mwPezKSpzx3psZtURBz/6rcuhIGjlJTN?= =?us-ascii?Q?ycEglfvoglnIVpOjCtTZoXe12xw70VDl1nYCfu3lidMEmkYUJpakn7CHW7x+?= =?us-ascii?Q?oKNmzLrxoVE8K3UR/KMY0WZQbYGGGyzwqYnWz4Coge0UUKqiAla2e/h7+Mpv?= =?us-ascii?Q?VOEEyw0Io6JgLI2NE7F69JjIiJEUSF6yQhKTDh8qY7OTZFs+SjKymiI9G2T0?= =?us-ascii?Q?w6s6enhJTlHxyUZwgLNA5DbVZstCx?= X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1720; 5:qoeAAufYDOv1zXO8GdB1qmKE6SRwFTa8h+Ib3Bx2LylpzJsKJEm/IK98emdJL3kkvvO+jMJbvDGprTaMXJxAIo0QeOpLwcxC2ukO8XwTWKJb/tVKH+ZXDCwlNcR6N43jG7PfVuipy/qHLUjUyWhSKg==; 24:LavqVcn95s0hVbfSdwqZ5t0ZPexBkN5pasHzDgqTg1ujDX/6xEgSO/nsUwyexrJXBjxpkpEOzbBldRaQAXySL/T/tqsIraVngKOwcesqk2g= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Mar 2016 13:21:37.0228 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR0701MB1720 Cc: viktorin@rehivetech.com Subject: [dpdk-dev] [PATCH] eal: arm64: introduce RTE_CPUFLAG_ATOMICS X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Mar 2016 13:21:41 -0000 armv8.1 adds support for new atomic instructions. Linux kernel v4.3 onwards, the presence of atomic instruction support can detect through HWCAP_ATOMICS Signed-off-by: Jerin Jacob --- app/test/test_cpuflags.c | 3 +++ lib/librte_eal/common/arch/arm/rte_cpuflags.c | 1 + lib/librte_eal/common/include/arch/arm/rte_cpuflags_64.h | 1 + 3 files changed, 5 insertions(+) diff --git a/app/test/test_cpuflags.c b/app/test/test_cpuflags.c index e8d0ce7..d083c86 100644 --- a/app/test/test_cpuflags.c +++ b/app/test/test_cpuflags.c @@ -144,6 +144,9 @@ test_cpuflags(void) printf("Check for CRC32:\t"); CHECK_FOR_FLAG(RTE_CPUFLAG_CRC32); + + printf("Check for ATOMICS:\t"); + CHECK_FOR_FLAG(RTE_CPUFLAG_ATOMICS); #endif #if defined(RTE_ARCH_X86_64) || defined(RTE_ARCH_I686) diff --git a/lib/librte_eal/common/arch/arm/rte_cpuflags.c b/lib/librte_eal/common/arch/arm/rte_cpuflags.c index f14c56a..23240ef 100644 --- a/lib/librte_eal/common/arch/arm/rte_cpuflags.c +++ b/lib/librte_eal/common/arch/arm/rte_cpuflags.c @@ -122,6 +122,7 @@ const struct feature_entry rte_cpu_feature_table[] = { FEAT_DEF(SHA1, REG_HWCAP, 5) FEAT_DEF(SHA2, REG_HWCAP, 6) FEAT_DEF(CRC32, REG_HWCAP, 7) + FEAT_DEF(ATOMICS, REG_HWCAP, 8) FEAT_DEF(AARCH64, REG_PLATFORM, 1) }; #endif /* RTE_ARCH */ diff --git a/lib/librte_eal/common/include/arch/arm/rte_cpuflags_64.h b/lib/librte_eal/common/include/arch/arm/rte_cpuflags_64.h index 810e8a0..49aead9 100644 --- a/lib/librte_eal/common/include/arch/arm/rte_cpuflags_64.h +++ b/lib/librte_eal/common/include/arch/arm/rte_cpuflags_64.h @@ -49,6 +49,7 @@ enum rte_cpu_flag_t { RTE_CPUFLAG_SHA1, RTE_CPUFLAG_SHA2, RTE_CPUFLAG_CRC32, + RTE_CPUFLAG_ATOMICS, RTE_CPUFLAG_AARCH64, /* The last item */ RTE_CPUFLAG_NUMFLAGS,/**< This should always be the last! */ -- 2.1.0