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: 141734 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp239991ljj; Wed, 11 Jul 2018 05:41:24 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdO3/X2ls+ENQL6LRTa2SkyM0Ja8OQRNAWuVEqy+7J6sz9PL5EJnnnXs6Ulf+eLp5A9nhoG X-Received: by 2002:a63:6e0a:: with SMTP id j10-v6mr20610791pgc.321.1531312884870; Wed, 11 Jul 2018 05:41:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531312884; cv=none; d=google.com; s=arc-20160816; b=F9JYfEfGc6xKGh0XlQSl7mvuI5vSiawz58jpywqg5P0mN3o5yMeQTVDK9CS6rvaRBG 9R2KG5NthloDf9U/uKnLip75h/QopNBc0PQunfwsboicFK3E35/SLTkhJFskZOlccd48 V1M07A/FB1QwsMs7BKNRsGBG2LJ+5wIYFlLhxGvvk/V7B/qEM/wz4Ns7aBP8H2TWQgm4 q8D9AwBnOAtX/6reNAjn07rRaEQroaX6CdoeW9upNny+243lQ/k2p5rs3Uplx44Y1toO SKgTjAl1c8mttL2plsg/+ZhNBoUYwr1jmli70GRsMF15rTDiBRgN4RqnjfdHAVTwsWCa kFDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:message-id:date:subject:to:from:delivered-to :arc-authentication-results; bh=LvoYoY9E2Y1343yTq4l3EMkRu/Gxqj0XKHRqyRmpDU8=; b=cfBAwOjqD4w6Dh9Aea1vLgjAqb+VLAuedyUCjVfAoNcLJ24tmii1QXtLi+H7yaBsfc sjlqc39smy9eGsGsOKVDuFum1QyRBJIBRK2IGc5CQqd7vdQ1QnWOm3K9UPOfhkbUXTl+ 53Nvjyl9JS/e/6o7asEn8GdbP4dhcjjiDKP3embTPmQiRCbzstNdLttCPh4+H1fvB2z0 Us0jNr3C6qIGlevicRQ3XVQWTuEoP4eQoH4G6Str2uGzWRYAOdKYq3tbGB+bJqLCzuBU p/BrGdYfZ0UH8K6GFyujZcoDjaVmcFZgJYk2+04/oIX/7w3ccMRSpLa3Yi6NqvPrwJP6 MPNQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id h1-v6si18022929pgs.221.2018.07.11.05.41.24 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 11 Jul 2018 05:41:24 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org 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_K=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" 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;