Commit bdf228a2 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Linus Torvalds

fs/proc/uptime.c: use ktime_get_boottime_ts64

get_monotonic_boottime() is deprecated and uses the old timespec type.
Let's convert /proc/uptime to use ktime_get_boottime_ts64().

Link: 's avatarArnd Bergmann <>
Acked-by: 's avatarThomas Gleixner <>
Cc: Al Viro <>
Cc: Deepa Dinamani <>
Cc: Alexey Dobriyan <>
Signed-off-by: 's avatarAndrew Morton <>
Signed-off-by: 's avatarLinus Torvalds <>
parent 2d6e4e82
......@@ -9,7 +9,7 @@
static int uptime_proc_show(struct seq_file *m, void *v)
struct timespec uptime;
struct timespec64 uptime;
struct timespec64 idle;
u64 nsec;
u32 rem;
......@@ -19,7 +19,7 @@ static int uptime_proc_show(struct seq_file *m, void *v)
nsec += (__force u64) kcpustat_cpu(i).cpustat[CPUTIME_IDLE];
idle.tv_sec = div_u64_rem(nsec, NSEC_PER_SEC, &rem);
idle.tv_nsec = rem;
seq_printf(m, "%lu.%02lu %lu.%02lu\n",
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment