From patchwork Mon Jul 3 12:56:59 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: 783463 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 3x1RxL4SqNz9s7C; Mon, 3 Jul 2017 22:57:26 +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="MNHshCUH"; 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 1dS0up-0006kv-UE; Mon, 03 Jul 2017 12:57:23 +0000 Received: from mail-qk0-f180.google.com ([209.85.220.180]) by huckleberry.canonical.com with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1dS0uk-0006hz-S0 for kernel-team@lists.ubuntu.com; Mon, 03 Jul 2017 12:57:18 +0000 Received: by mail-qk0-f180.google.com with SMTP id d78so144571067qkb.1 for ; Mon, 03 Jul 2017 05:57:18 -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=MNHshCUH3NczFT9F/CYRfZXoVoaumuBptJy7FZ2CsBltUNYsxlAKnZwVmMmuWR0Nfg X8if/rxwmJKKyTUP6jndNbmMkniULIfo7mdsEUtfYj1V+1tO663aSsuE9xlewunkIseb iOnFbL+Li0UhN7DKYmvduivnLO2yqRGnDDVjFe4Zw8ZvwJHntvwJ45ymphxxhowgEbMu i4b5ygmE/753A7g0OxUJ8u/6NukJu+jNmLNUfZqvSmW3n42OLJxZmvGFbVir3Snm+/Oi iATJkWH7R60B+KG7iLoce2NZo0UTjrxORx3ADUhXA/Xqj/DG+vO79hJs83xwYIxxU54F QQ2Q== 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=bZG0egD6M858tAVj3GVhuQFemPGWvvpPSMRT402cJaj+oVsNB6rwHGYBUwlbU5K8jJ J7qxvk1m7QG6bZq3lnHLqOqlauwSlV4vEq272AxS2z64NYM1F2eacQcUZJnVrrSswGyP oOznLtcaBsMfX0E84ZSNg1dRhru+IUElCkIRlTPATJY4KFs8plqfdSzmUsQ7W0qp06by vrLf/BV57aeuSiQsRb9b+PaJytiV5PvIGb7z6mZrPJA7zsv7RhO3GH/OPFmtxcH1mtAI ycyoSymXz+OKH2V502rB5OslYbuAYD7BCAqjVAhH+8WIJGWl6FI4BqLm272ltWYfXa4o t8zA== X-Gm-Message-State: AIVw110Yt7dJRdfE5HeigS3C87s1v5LYs9Q/GxJ8FrDtI3ZM/XESplrj fCBTcfG09olWh2NTiq4= X-Received: by 10.55.215.4 with SMTP id m4mr27423557qki.117.1499086637669; Mon, 03 Jul 2017 05:57:17 -0700 (PDT) Received: from localhost.localdomain ([187.34.40.196]) by smtp.gmail.com with ESMTPSA id n69sm11699553qke.68.2017.07.03.05.57.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 03 Jul 2017 05:57:16 -0700 (PDT) From: Marcelo Henrique Cerri To: kernel-team@lists.ubuntu.com Subject: [xenial][PATCH v3 2/8] Drivers: hv: util: Use hv_get_current_tick() to get current tick Date: Mon, 3 Jul 2017 09:56:59 -0300 Message-Id: <1499086625-15995-3-git-send-email-marcelo.cerri@canonical.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1499086625-15995-1-git-send-email-marcelo.cerri@canonical.com> References: <1499086625-15995-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;