From patchwork Thu Mar 12 17:24:17 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 45740 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f200.google.com (mail-wi0-f200.google.com [209.85.212.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 77253214BF for ; Thu, 12 Mar 2015 17:24:26 +0000 (UTC) Received: by widex7 with SMTP id ex7sf13476124wid.2 for ; Thu, 12 Mar 2015 10:24:25 -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=Yv++7AX8f6woCBNP0FFK7oUhiASx+ji39ia7uLlkhwc=; b=cfprYrAVKP7d7qwwmz0m3HDWoA1Sj8ZJx8bmSGevB5A8xPiKoRImgG3gfdvft1g2mL wBF56l/VIruMLyQZ0DrdRMHADhufKQeMqGzI7vz65qxqpcNosbxhm2zW1OCAevg8StKe hL5SOnZ9oSTSIuxjZ25liF25DaVtrNXAWqj54ek9OcgZqfxIDBZEnfSAWqDTpih55UAf GMZM+HgnRWqy59+Qf0Rh5BK5+ILiQCAKFkkxJw9ANoA/bJ7w9CTMTmkh0+nYJPulUm1E LTWaknHpmoC+MwUXXOMTmBYZNMWExE5B0H9oQ1IDpfIDtxWV6saiwdyP3TAVVKcOXQVu TVjQ== X-Gm-Message-State: ALoCoQn2T+uS32rY1Kt0jlwrlTcSqr4MR2WY0euKDGVkaLSQALHZxGZxQJ5EwXw8qdnUwO7Wu6cN X-Received: by 10.180.80.35 with SMTP id o3mr1516004wix.0.1426181065753; Thu, 12 Mar 2015 10:24:25 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.1.3 with SMTP id 3ls290511lai.36.gmail; Thu, 12 Mar 2015 10:24:25 -0700 (PDT) X-Received: by 10.152.21.136 with SMTP id v8mr40355108lae.64.1426181065378; Thu, 12 Mar 2015 10:24:25 -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 z2si4870363laz.78.2015.03.12.10.24.25 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Mar 2015 10:24:25 -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 labgq15 with SMTP id gq15so17403011lab.1 for ; Thu, 12 Mar 2015 10:24:25 -0700 (PDT) X-Received: by 10.152.43.51 with SMTP id t19mr39378210lal.73.1426181065261; Thu, 12 Mar 2015 10:24:25 -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 h5csp372914lbj; Thu, 12 Mar 2015 10:24:24 -0700 (PDT) X-Received: by 10.66.63.72 with SMTP id e8mr90432037pas.3.1426181062939; Thu, 12 Mar 2015 10:24:22 -0700 (PDT) Received: from mail-pa0-f46.google.com (mail-pa0-f46.google.com. [209.85.220.46]) by mx.google.com with ESMTPS id nl16si10627003pdb.114.2015.03.12.10.24.21 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Mar 2015 10:24:21 -0700 (PDT) Received-SPF: pass (google.com: domain of john.stultz@linaro.org designates 209.85.220.46 as permitted sender) client-ip=209.85.220.46; Received: by pablj1 with SMTP id lj1so22102519pab.8 for ; Thu, 12 Mar 2015 10:24:21 -0700 (PDT) X-Received: by 10.66.124.227 with SMTP id ml3mr93500023pab.28.1426181060917; Thu, 12 Mar 2015 10:24:20 -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 dl1sm11819100pdb.75.2015.03.12.10.24.19 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 12 Mar 2015 10:24:20 -0700 (PDT) From: John Stultz To: lkml Cc: John Stultz , Arnd Bergmann , Rik van Riel , Frederic Weisbecker Subject: [RFC][PATCH] uptime: Convert uptime to use 64bit time accessor Date: Thu, 12 Mar 2015 10:24:17 -0700 Message-Id: <1426181057-2506-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 uptime output to use the timespec64 structure. Cc: Arnd Bergmann Cc: Rik van Riel Cc: Frederic Weisbecker Signed-off-by: John Stultz --- fs/proc/uptime.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/proc/uptime.c b/fs/proc/uptime.c index 33de567..a0b262f 100644 --- a/fs/proc/uptime.c +++ b/fs/proc/uptime.c @@ -9,7 +9,7 @@ static int uptime_proc_show(struct seq_file *m, void *v) { - struct timespec uptime; + struct timespec64 uptime; struct timespec idle; u64 idletime; u64 nsec; @@ -20,12 +20,12 @@ static int uptime_proc_show(struct seq_file *m, void *v) for_each_possible_cpu(i) idletime += (__force u64) kcpustat_cpu(i).cpustat[CPUTIME_IDLE]; - get_monotonic_boottime(&uptime); + get_monotonic_boottime64(&uptime); nsec = cputime64_to_jiffies64(idletime) * TICK_NSEC; idle.tv_sec = div_u64_rem(nsec, NSEC_PER_SEC, &rem); idle.tv_nsec = rem; - seq_printf(m, "%lu.%02lu %lu.%02lu\n", - (unsigned long) uptime.tv_sec, + seq_printf(m, "%llu.%02lu %lu.%02lu\n", + (unsigned long long) uptime.tv_sec, (uptime.tv_nsec / (NSEC_PER_SEC / 100)), (unsigned long) idle.tv_sec, (idle.tv_nsec / (NSEC_PER_SEC / 100)));