From patchwork Fri Jun 30 19:21:28 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcelo Henrique Cerri X-Patchwork-Id: 782956 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) by ozlabs.org (Postfix) with ESMTP id 3wzmcc3Cmjz9s81; Sat, 1 Jul 2017 05:22:08 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=canonical-com.20150623.gappssmtp.com header.i=@canonical-com.20150623.gappssmtp.com header.b="1eEGPI2J"; dkim-atps=neutral Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.76) (envelope-from ) id 1dR1UT-0003iE-K5; Fri, 30 Jun 2017 19:22:05 +0000 Received: from mail-qk0-f173.google.com ([209.85.220.173]) by huckleberry.canonical.com with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1dR1UC-0003bu-Aw for kernel-team@lists.ubuntu.com; Fri, 30 Jun 2017 19:21:48 +0000 Received: by mail-qk0-f173.google.com with SMTP id 16so108838117qkg.2 for ; Fri, 30 Jun 2017 12:21:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=eQWGGjXxQ2VZ7pd2v3q0qsfaw/0j9vBLc77GWnnN2r0=; b=1eEGPI2J/zx4gyE6lTMpUi33tkz3/Z3xSihqMq3+Kg7Nxg5A+TcmQwbaX8H0t0FwHf FZat/9OXkxwoJ4kJBJDBdSB65G21bSWDPs0UwhKeBuwRWaA3vTo/J3FFhEFsLQZsC188 6CXPftlIyMNyClh/rQQqwHLYZEJYcJK3RhFtk/W+LJL1ltEzawhRNrMYjZ/u0UV9yMB2 1eM+SxcdQQwAeMJwJ0pqxHJfJwD7aYETHe/G+Q5+Ssnw3imElvwR54fVCUuH7AzCtS9v PUpnHavfG5zNXPLGjxdTTX//dJkDZjTem/QCgOgprxzdazMk4mEc/hJnVcW1ZZczje3n tsdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=eQWGGjXxQ2VZ7pd2v3q0qsfaw/0j9vBLc77GWnnN2r0=; b=qYz47lTB7JR86rSt+4mp7+3fqvIjBKrdaJH2dNaLLV++w34AXq77dSab7SxjhknHIl IQ2zg4Ga+v+Jsq3+piLzuoKcem56NHVfXiiC2KOZmyrXBQ8kh1euqs3ErsACKFKEBP8Y 0AwKq0nDyBGKftq1EpqjR431SYO9z7PvlkCjTR5vGe7II/a3/6HJNM4UoQeiiACBf/1I HYzzsLyBm/R8LN8vURnkPvI6Yf69N9ME7VXqPyQiPvIngEHeQnFWiJrzKyrK8zFcMLat rTLaVFct6QYZlqmmWe1JpaSIynK9K6IIgP02Q+BJ1h9IZElbU2V9XBxS7iQb6EtsP4BF ODdQ== X-Gm-Message-State: AKS2vOzpfjt4LKD1C6cleS+YJ6IvFsVQnLIqHn/QD+St9BoU5bL5szGe KvtlBrEnNe76qQ1hN8E= X-Received: by 10.55.41.232 with SMTP id p101mr26605727qkp.105.1498850507197; Fri, 30 Jun 2017 12:21:47 -0700 (PDT) Received: from localhost.localdomain ([191.8.93.72]) by smtp.gmail.com with ESMTPSA id p24sm6945617qki.49.2017.06.30.12.21.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 30 Jun 2017 12:21:46 -0700 (PDT) From: Marcelo Henrique Cerri To: kernel-team@lists.ubuntu.com Subject: [xenial][PATCH v2 2/8] Drivers: hv: util: Use hv_get_current_tick() to get current tick Date: Fri, 30 Jun 2017 16:21:28 -0300 Message-Id: <1498850494-31277-3-git-send-email-marcelo.cerri@canonical.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1498850494-31277-1-git-send-email-marcelo.cerri@canonical.com> References: <1498850494-31277-1-git-send-email-marcelo.cerri@canonical.com> Cc: alexng@microsoft.com X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.14 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: kernel-team-bounces@lists.ubuntu.com From: K. Y. Srinivasan BugLink: http://bugs.launchpad.net/bugs/1676635 As part of the effort to interact with Hyper-V in an instruction set architecture independent way, use the new API to get the current tick. Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman (cherry picked from commit 305f7549c9298247723c255baddb7a54b4e63050) Signed-off-by: Marcelo Henrique Cerri --- drivers/hv/hv_util.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/hv/hv_util.c b/drivers/hv/hv_util.c index bcd06306f3e8..07a783b52784 100644 --- a/drivers/hv/hv_util.c +++ b/drivers/hv/hv_util.c @@ -27,6 +27,7 @@ #include #include #include +#include #include "hyperv_vmbus.h" @@ -199,7 +200,7 @@ static void hv_set_host_time(struct work_struct *work) */ u64 current_tick; - rdmsrl(HV_X64_MSR_TIME_REF_COUNT, current_tick); + hv_get_current_tick(current_tick); newtime += (current_tick - wrk->ref_time); } host_tns = (newtime - WLTIMEDELTA) * 100;