From patchwork Fri Sep 11 16:26:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Timothy McDaniel X-Patchwork-Id: 77460 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id C39B1A04BB; Fri, 11 Sep 2020 18:30:03 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6DBE21BF90; Fri, 11 Sep 2020 18:30:03 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id 044F9255 for ; Fri, 11 Sep 2020 18:30:00 +0200 (CEST) IronPort-SDR: HPDjvLEtDLtCwPTZIa7wlE85chGfQfUgzSPl7vxnB9qrBJarPB257VIoNvSMvxqPV7EMKZrsEE HYb/aupV4AEw== X-IronPort-AV: E=McAfee;i="6000,8403,9741"; a="138308742" X-IronPort-AV: E=Sophos;i="5.76,416,1592895600"; d="scan'208";a="138308742" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Sep 2020 09:29:54 -0700 IronPort-SDR: +kwEKE5Zso0Nw9g5Yo1UPpqwaUI19GmO7hu1Y1p0a4Kdr+NdG5iZdTROFLSWnIfTBNrNb343Uc fDfsSclhqR9Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,416,1592895600"; d="scan'208";a="286936755" Received: from txasoft-yocto.an.intel.com ([10.123.72.192]) by fmsmga008.fm.intel.com with ESMTP; 11 Sep 2020 09:29:53 -0700 From: Timothy McDaniel To: Bruce Richardson , Konstantin Ananyev Cc: dev@dpdk.org, erik.g.carrillo@intel.com, gage.eads@intel.com, harry.van.haaren@intel.com Date: Fri, 11 Sep 2020 11:26:29 -0500 Message-Id: <1599841589-9150-1-git-send-email-timothy.mcdaniel@intel.com> X-Mailer: git-send-email 1.7.10 Subject: [dpdk-dev] [PATCH] eal: add umonitor umwait to x86 cpuflags 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" umonitor/umwait are user-level versions of the monitor/mwait instructions. These allow the core to wait in a low-power state until a specified cache line is accessed, a timeout occurs, or the core is interrupted. Signed-off-by: Timothy McDaniel --- lib/librte_eal/x86/include/rte_cpuflags.h | 1 + lib/librte_eal/x86/rte_cpuflags.c | 1 + 2 files changed, 2 insertions(+) diff --git a/lib/librte_eal/x86/include/rte_cpuflags.h b/lib/librte_eal/x86/include/rte_cpuflags.h index c1d2036..ab2c3b3 100644 --- a/lib/librte_eal/x86/include/rte_cpuflags.h +++ b/lib/librte_eal/x86/include/rte_cpuflags.h @@ -130,6 +130,7 @@ enum rte_cpu_flag_t { RTE_CPUFLAG_CLDEMOTE, /**< Cache Line Demote */ RTE_CPUFLAG_MOVDIRI, /**< Direct Store Instructions */ RTE_CPUFLAG_MOVDIR64B, /**< Direct Store Instructions 64B */ + RTE_CPUFLAG_UMWAIT, /**< UMONITOR/UMWAIT */ RTE_CPUFLAG_AVX512VP2INTERSECT, /**< AVX512 Two Register Intersection */ /* The last item */ diff --git a/lib/librte_eal/x86/rte_cpuflags.c b/lib/librte_eal/x86/rte_cpuflags.c index 30439e7..6bed3eb 100644 --- a/lib/librte_eal/x86/rte_cpuflags.c +++ b/lib/librte_eal/x86/rte_cpuflags.c @@ -137,6 +137,7 @@ const struct feature_entry rte_cpu_feature_table[] = { FEAT_DEF(CLDEMOTE, 0x00000007, 0, RTE_REG_ECX, 25) FEAT_DEF(MOVDIRI, 0x00000007, 0, RTE_REG_ECX, 27) FEAT_DEF(MOVDIR64B, 0x00000007, 0, RTE_REG_ECX, 28) + FEAT_DEF(UMWAIT, 0x00000007, 0, RTE_REG_ECX, 5) FEAT_DEF(AVX512VP2INTERSECT, 0x00000007, 0, RTE_REG_EDX, 8) };