From patchwork Mon Jun 18 15:35:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 10472119 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 AC62C601D7 for ; Mon, 18 Jun 2018 15:37:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9CC1C289DD for ; Mon, 18 Jun 2018 15:37:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 90FBB28B06; Mon, 18 Jun 2018 15:37:11 +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 550EB289DD for ; Mon, 18 Jun 2018 15:37:11 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E09036E0AC; Mon, 18 Jun 2018 15:37:09 +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.13]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0932E6E0AC; Mon, 18 Jun 2018 15:37:06 +0000 (UTC) Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue102 [212.227.15.145]) with ESMTPA (Nemesis) id 0MOjCA-1fXg1y3Ef8-0067iH; Mon, 18 Jun 2018 17:37:00 +0200 From: Arnd Bergmann To: Oded Gabbay , Alex Deucher , =?UTF-8?q?Christian=20K=C3=B6nig?= , "David (ChunMing) Zhou" Subject: [PATCH 2/2] amdgpu: kfd: use modern ktime accessors Date: Mon, 18 Jun 2018 17:35:11 +0200 Message-Id: <20180618153649.2015346-2-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20180618153649.2015346-1-arnd@arndb.de> References: <20180618153649.2015346-1-arnd@arndb.de> X-Provags-ID: V03:K1:db5AyKfnoApCkOjdUqSR4FofUO9/GgmgPAOirl2VzoUhMMbSo6t EAf2GFiSHkI+adSyeNgbB5KnCVG1fddyhyd8P69SkKT/KbEhNY5W5aqy5fgfqXlICKOezUb R3hT2GJPCD8aWjOrbmAdScldBnOmI11fg5BvN03QqrcnW8EpwIJO2YubU9dZxLAAQlNBuEQ noqlkbBJWrDF+52sA4H6A== X-UI-Out-Filterresults: notjunk:1; V01:K0:K5pE9ej9gxI=:m7gHveVMybd+mu/0BBmfVD C45wzSnVytJcPNU++6LJuS/pGphTd2xaL6GNhuWG1IP3RsXcfE9dJlpmV7Jt3/lFYbuNuiN5g bUDITVDz7D6XZuGWc2ysXStwWw0W9BkewJjn0iUKI0N+ZtG1xJ9hVkPpsAvByfJuGtc6TUEDk nRAjtXBe8EOScgQZ7Vt/YdKuyKUMpS1q1XLv27x+9G8PgHuOZkkn/L0E+JtPv1i20p5G+iVDv /umpn62qkppI9t8Tr/LPWIQaMAAkwllJYZ+R6oDLgGfSbMU0zxhCKXBLdnoWsGYnr0pgTnLP8 zX+h5dg1keRSDd6nRRaY/lqx6qYDExUuuu82djE9m/RosaPPTilOldZ8e6KRjcVSbi49/4bof xYkx6ndApU+pzHBexqZbkEiQhlKmb7snggkenYK/TtOAtK9fa4zBTO0F6h2IsDzFUsBgLBBWm DB/X+zQAm1kue1iq/eEOxlJGwnUdoVPebA1N03xaFKC4LZk3GApRs9oUq/rlO1Qx0AhG38EQs l8BnK2KdI0tksWrGvjFvEs281ksq1h7YhtKX8QoINrWOY8KBu3W627P/HNaRKVGH8V1Hfv5/+ iRg/hd0e+DJnULPDwZU6Gd+L1LwV1CKiY+qLFt/UxSeA7oV9gQfmaVxhGUJNU5yUuJ9PsODGw 7VeD10ybdhaoNiT+g6OJl4VvaPZhsyGQJZjp5o02pq9v2XNAXHJ2g23/nFK/DKhUOA48= 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 , y2038@lists.linaro.org, Felix Kuehling , Harish Kasiviswanathan , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, David Airlie , Andres Rodriguez , Kent Russell , Shaoyun Liu 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. Signed-off-by: Arnd Bergmann --- 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;