From patchwork Wed Jul 11 12:41:00 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 10519693 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 07EC06028E for ; Wed, 11 Jul 2018 12:41:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E190628E19 for ; Wed, 11 Jul 2018 12:41:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D509128E5C; Wed, 11 Jul 2018 12:41:25 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id CA76328E59 for ; Wed, 11 Jul 2018 12:41:24 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E26F66EC57; Wed, 11 Jul 2018 12:41:22 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.17.10]) by gabe.freedesktop.org (Postfix) with ESMTPS id DEACC6EC57; Wed, 11 Jul 2018 12:41:21 +0000 (UTC) Received: from wuerfel.lan ([46.223.138.35]) by mrelayeu.kundenserver.de (mreue105 [212.227.15.145]) with ESMTPA (Nemesis) id 0MIw2b-1ff9Ix0nPt-002WRX; Wed, 11 Jul 2018 14:41:14 +0200 From: Arnd Bergmann To: Oded Gabbay , Alex Deucher , =?UTF-8?q?Christian=20K=C3=B6nig?= , "David (ChunMing) Zhou" , David Airlie Subject: [PATCH] [RESEND] amdgpu: kfd: use modern ktime accessors Date: Wed, 11 Jul 2018 14:41:00 +0200 Message-Id: <20180711124112.893478-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K1:zbQhCN9B1r/NhK/GO0NdtF/eLH0TON7Y5Qi3JC+J0rM0M6+0v5A y48ylpwLlpYL51CwKfNLGHIYkg7fpK3gwfQwSrlZjrxMkZAkvNXP0KT5zoHXi0kGYcr2YKZ 01NeJniDgG6RrgCfZKX8aVqW9IPbrfT88qeZvbqQMpXhJ4xOobTp5lg+ctjRJW7h712ZBhE 316S/Hq95lCHxZMmGMB2Q== X-UI-Out-Filterresults: notjunk:1; V01:K0:/bqLd/lg6rY=:q1BpeWJ09+lQZLZe7CTk6v /91F3tTlmDx7lNdnQ5sWjkJts7RpLajrPYOiMpSPIB17rMpbPGRu5a+j7lAuJzVf+EJDS/V2g 0Ef8k59WMmCljsmPBR/YT34d7f2dsZnXQ43BXNEblrg9WkJfC7wI6r1TZIi5VHqM7Poi6KOaC T0dwX1FzAwscKgG/w9nVVeQjm1G1FWwuPHmEkV9xrWQQpYZp8ZzaxKmcauJIIYfB5oPZN7Gyj 2MpXjAlaOsnKqS+Y0mMUjxK9hgla68akOunCj8gBZKF9MzCSGv9gSVgW8XW71Hr0Akoas34uU eW4dF7QhrVRCoGndId0pp7NxiJ7XpztOxUKEIexkZq3vDeOLQ2sAjHWUjJr5IgVISZ9fdQCK7 JJ3nKzKxldRvbrW3U1/G0gh9W8Z43HxaKgeJ0pC0T/PidTqzGMLoKWpBlL2ChfV1zR+GPldf9 z7i3e0gtx7KX1h75s3poHiLC8oYHMVtoGaP2Ti8nhM2v3fZQWiOSv5Lc1ItZkRhqxWKkOEuoO NQbLN1VNdeetZo6aisil9KlHfMS04IvsktWKBIZ+7VGyw61P18/9zVNsETCktNHanab5AYK8D uF2yp0V5gz+ILIexcYzbjS3fJsEqno1SXpCs2hBnIjngSIFt30OI2kdDTJX+cLihZZzJ/kVqe 2zvxUCTI1X21VX7jorA1EC2ShUqNyd5cdsYZlsDg5dQGzl1zyJR/IVyDwpm2uhG42w+U= X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Yong Zhao , amd-gfx@lists.freedesktop.org, Arnd Bergmann , Philip Yang , Felix Kuehling , Harish Kasiviswanathan , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Andres Rodriguez , Kent Russell MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP getrawmonotonic64() and get_monotonic_boottime64() are deprecated because of the nonstandard naming. The replacement functions ktime_get_raw_ns() and ktime_get_boot_ns() also simplify the callers. Reviewed-by: Felix Kuehling . Signed-off-by: Arnd Bergmann --- Patch was originall sent on Jun 18 but not applied yet, resending With Felix' Reviewed-by tag --- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c b/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c index f64c5551cdba..7e717716b90e 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c +++ b/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c @@ -754,7 +754,6 @@ static int kfd_ioctl_get_clock_counters(struct file *filep, { struct kfd_ioctl_get_clock_counters_args *args = data; struct kfd_dev *dev; - struct timespec64 time; dev = kfd_device_by_id(args->gpu_id); if (dev) @@ -766,11 +765,8 @@ static int kfd_ioctl_get_clock_counters(struct file *filep, args->gpu_clock_counter = 0; /* No access to rdtsc. Using raw monotonic time */ - getrawmonotonic64(&time); - args->cpu_clock_counter = (uint64_t)timespec64_to_ns(&time); - - get_monotonic_boottime64(&time); - args->system_clock_counter = (uint64_t)timespec64_to_ns(&time); + args->cpu_clock_counter = ktime_get_raw_ns(); + args->system_clock_counter = ktime_get_boot_ns(); /* Since the counter is in nano-seconds we use 1GHz frequency */ args->system_clock_freq = 1000000000;