From patchwork Thu Mar 12 17:23:40 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 5997511 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 02527BF90F for ; Thu, 12 Mar 2015 17:23:54 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 318352034F for ; Thu, 12 Mar 2015 17:23:53 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 32168202FF for ; Thu, 12 Mar 2015 17:23:52 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3DB8A6EA04; Thu, 12 Mar 2015 10:23:51 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pd0-f181.google.com (mail-pd0-f181.google.com [209.85.192.181]) by gabe.freedesktop.org (Postfix) with ESMTP id 84AD16EA04 for ; Thu, 12 Mar 2015 10:23:50 -0700 (PDT) Received: by pdjp10 with SMTP id p10so21688042pdj.10 for ; Thu, 12 Mar 2015 10:23:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=CpbmxnUyU6G0DXgLqNZyWe50CU+Q3iJcqcz7k5Mwo+E=; b=jCMbbplbLmJ9elnniZxVqJ4cJh+NZuIaG0EMxOYETmE4SpkMAxRq8oleZElKEWAtzc f+QKhicyZPIvC27kcVrHNjBd6ohjvo94pALn/vRx2qc+yVi2PSUnyzR+DCxg1smLA2pL xbmExJO7RK3ZO0aq6K82POswhPXt5wSHnEDIeosTEDlgj8gAGcJ3waPaxWkmf7AwFEtY n2/hgvmWGQulBWN6maguOd5FTtw/BYDJ5eyjQ5KztbeAoN7+WwFplqX2CEu7BVbFb4NB bXoFv1rnNaePUI1XlvDJWVYY5N3OO5W6ZFVHQzTQNNemRYNr3iAN4Ezh9Gl92nWoWGV9 Qveg== X-Gm-Message-State: ALoCoQljvVpbS2voyg1UWIBpsfLVhuasf0rBIKIZlAN9hA4Rj3m8AUXqzEdHNid/EptyMNveY0Bi X-Received: by 10.70.126.225 with SMTP id nb1mr92990987pdb.40.1426181024909; Thu, 12 Mar 2015 10:23:44 -0700 (PDT) Received: from localhost.localdomain (c-67-170-153-23.hsd1.or.comcast.net. [67.170.153.23]) by mx.google.com with ESMTPSA id g3sm11912298pdg.39.2015.03.12.10.23.43 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 12 Mar 2015 10:23:44 -0700 (PDT) From: John Stultz To: lkml Subject: [RFC][PATCH] amdkfd: Convert timestamping to use 64bit time accessors Date: Thu, 12 Mar 2015 10:23:40 -0700 Message-Id: <1426181020-2344-1-git-send-email-john.stultz@linaro.org> X-Mailer: git-send-email 1.9.1 Cc: dri-devel@lists.freedesktop.org, Arnd Bergmann X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Convert the timestamping in the amdkfd driver to use a timespec64 and 64bit time accessors. Cc: Arnd Bergmann Cc: Oded Gabbay Cc: David Airlie Cc: dri-devel@lists.freedesktop.org Signed-off-by: John Stultz --- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c b/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c index 5c50aa8..50fc8ba 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c +++ b/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c @@ -435,7 +435,7 @@ static int kfd_ioctl_get_clock_counters(struct file *filep, { struct kfd_ioctl_get_clock_counters_args *args = data; struct kfd_dev *dev; - struct timespec time; + struct timespec64 time; dev = kfd_device_by_id(args->gpu_id); if (dev == NULL) @@ -445,11 +445,11 @@ static int kfd_ioctl_get_clock_counters(struct file *filep, args->gpu_clock_counter = kfd2kgd->get_gpu_clock_counter(dev->kgd); /* No access to rdtsc. Using raw monotonic time */ - getrawmonotonic(&time); - args->cpu_clock_counter = (uint64_t)timespec_to_ns(&time); + getrawmonotonic64(&time); + args->cpu_clock_counter = (uint64_t)timespec64_to_ns(&time); - get_monotonic_boottime(&time); - args->system_clock_counter = (uint64_t)timespec_to_ns(&time); + get_monotonic_boottime64(&time); + args->system_clock_counter = (uint64_t)timespec64_to_ns(&time); /* Since the counter is in nano-seconds we use 1GHz frequency */ args->system_clock_freq = 1000000000;