From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id E9AABA04BC; Fri, 9 Oct 2020 18:24:48 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 183241D163; Fri, 9 Oct 2020 18:24:47 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id 257581D162 for ; Fri, 9 Oct 2020 18:24:44 +0200 (CEST) IronPort-SDR: xk+Sto7SdD848+tMrfx2lgs1imLXeIrfUVPFifhbGXivfAR2lcB7gPuBltJE5Og6W/xkwETCot AoqUu6X/rA7w== X-IronPort-AV: E=McAfee;i="6000,8403,9769"; a="145373160" X-IronPort-AV: E=Sophos;i="5.77,355,1596524400"; d="scan'208";a="145373160" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Oct 2020 09:24:42 -0700 IronPort-SDR: gz1FmyQBO/0j8REi3BF2zNW89UYluzYMxe0btWQweXYKqBtlPW+8WMnAlejrq1dPVIcZP0KWT5 Np5AfB+XRndA== X-IronPort-AV: E=Sophos;i="5.77,355,1596524400"; d="scan'208";a="462246569" Received: from aburakov-mobl.ger.corp.intel.com (HELO [10.213.3.170]) ([10.213.3.170]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Oct 2020 09:24:38 -0700 To: Jerin Jacob Cc: dpdk-dev , Liang Ma , Jan Viktorin , Ruifeng Wang , David Christensen , Bruce Richardson , Konstantin Ananyev , David Hunt , Thomas Monjalon , "McDaniel, Timothy" , Gage Eads , chris.macnamara@intel.com References: <1601647919-25312-1-git-send-email-liang.j.ma@intel.com> <532f45c5d79b4c30a919553d322bb66e91534466.1602258833.git.anatoly.burakov@intel.com> From: "Burakov, Anatoly" Message-ID: <82c0ffb3-bde2-c691-2835-03256aebe931@intel.com> Date: Fri, 9 Oct 2020 17:24:36 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v5 02/10] eal: add power management intrinsics 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" On 09-Oct-20 5:09 PM, Jerin Jacob wrote: > On Fri, Oct 9, 2020 at 9:32 PM Anatoly Burakov > wrote: >> >> From: Liang Ma >> >> Add two new power management intrinsics, and provide an implementation >> in eal/x86 based on UMONITOR/UMWAIT instructions. The instructions >> are implemented as raw byte opcodes because there is not yet widespread >> compiler support for these instructions. >> >> The power management instructions provide an architecture-specific >> function to either wait until a specified TSC timestamp is reached, or >> optionally wait until either a TSC timestamp is reached or a memory >> location is written to. The monitor function also provides an optional >> comparison, to avoid sleeping when the expected write has already >> happened, and no more writes are expected. >> >> For more details, please refer to Intel(R) 64 and IA-32 Architectures >> Software Developer's Manual, Volume 2. >> >> Signed-off-by: Liang Ma >> Signed-off-by: Anatoly Burakov >> --- >> >> Notes: >> v5: >> - Removed return values >> - Simplified intrinsics and hardcoded C0.2 state >> - Added other arch stubs >> + >> +/** >> + * This function is not supported on ARM. >> + * >> + * @param p >> + * Address to monitor for changes. Must be aligned on an 64-byte boundary. >> + * @param expected_value >> + * Before attempting the monitoring, the `p` address may be read and compared >> + * against this value. If `value_mask` is zero, this step will be skipped. >> + * @param value_mask >> + * The 64-bit mask to use to extract current value from `p`. >> + * @param tsc_timestamp >> + * Maximum TSC timestamp to wait for. >> + * >> + * @return >> + * - 0 on success > > > remove return as it is a void function Oops, will fix in v6. Thanks! -- Thanks, Anatoly