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: 45737 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f199.google.com (mail-wi0-f199.google.com [209.85.212.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id C42FE214BF for ; Thu, 12 Mar 2015 17:23:49 +0000 (UTC) Received: by widex7 with SMTP id ex7sf13472796wid.2 for ; Thu, 12 Mar 2015 10:23:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=CpbmxnUyU6G0DXgLqNZyWe50CU+Q3iJcqcz7k5Mwo+E=; b=GCt+K5viAvNf0BnP3ouO9vxnBaGdbqsOpkgD6wK1/Swfml9ItJyZFQPpUFiISx8ZrQ WQbalxYHqZ535IkWG+3qR6kq+OwuUaflDkWSsA2bOyU18rz8CdldnwbJRZpkYheY4Iip TqDhbkL31m5DrvY7FXWbrS4gNxcH8JtUeUkzl6NdPhWFgYgyF1NpEsMf/glrSgBnEA8l Eo0qZEUBu2sitr5XSDi7MJ8dpx8R3ER2WKZWHE6qGzGn9BaO/Bxtd8kVyQWCtOTDlZVu MGpIhs/43x0CzqiavTPOrN/+F+wrGLt8QPMycS9/hUHeDl20eundXfEwJ0i6dKnAeVXE KAuQ== X-Gm-Message-State: ALoCoQk/OjnVf7f1EA9ijutKaKe3gWeV5DVoEr0skmDp2weDB677LAFDmjTuTb28M99m0JARQHpK X-Received: by 10.152.45.7 with SMTP id i7mr6544095lam.9.1426181028776; Thu, 12 Mar 2015 10:23:48 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.37.227 with SMTP id b3ls272052lak.58.gmail; Thu, 12 Mar 2015 10:23:48 -0700 (PDT) X-Received: by 10.112.110.231 with SMTP id id7mr40127877lbb.28.1426181028545; Thu, 12 Mar 2015 10:23:48 -0700 (PDT) Received: from mail-la0-f49.google.com (mail-la0-f49.google.com. [209.85.215.49]) by mx.google.com with ESMTPS id r2si4900195lbb.46.2015.03.12.10.23.48 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Mar 2015 10:23:48 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.49 as permitted sender) client-ip=209.85.215.49; Received: by labgd6 with SMTP id gd6so17374372lab.3 for ; Thu, 12 Mar 2015 10:23:48 -0700 (PDT) X-Received: by 10.112.185.66 with SMTP id fa2mr39138365lbc.117.1426181028442; Thu, 12 Mar 2015 10:23:48 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.112.35.133 with SMTP id h5csp372553lbj; Thu, 12 Mar 2015 10:23:47 -0700 (PDT) X-Received: by 10.70.89.174 with SMTP id bp14mr9000695pdb.14.1426181026582; Thu, 12 Mar 2015 10:23:46 -0700 (PDT) Received: from mail-pd0-f182.google.com (mail-pd0-f182.google.com. [209.85.192.182]) by mx.google.com with ESMTPS id ou8si14282352pdb.173.2015.03.12.10.23.45 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Mar 2015 10:23:46 -0700 (PDT) Received-SPF: pass (google.com: domain of john.stultz@linaro.org designates 209.85.192.182 as permitted sender) client-ip=209.85.192.182; Received: by pdbfp1 with SMTP id fp1so21712766pdb.2 for ; Thu, 12 Mar 2015 10:23:45 -0700 (PDT) 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 Cc: John Stultz , Arnd Bergmann , Oded Gabbay , David Airlie , dri-devel@lists.freedesktop.org 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 X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: john.stultz@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.49 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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;