Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dc9b77b5 authored by Frederic Weisbecker's avatar Frederic Weisbecker Committed by Ingo Molnar
Browse files

alpha: Convert obsolete cputime_t to nsecs



Use the new nsec based cputime accessors as part of the whole cputime
conversion from cputime_t to nsecs.

Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Rik van Riel <riel@redhat.com>
Cc: Stanislaw Gruszka <sgruszka@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Wanpeng Li <wanpeng.li@hotmail.com>
Link: http://lkml.kernel.org/r/1485832191-26889-9-git-send-email-fweisbec@gmail.com


Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent 5613fda9
Loading
Loading
Loading
Loading
+4 −4
Original line number Original line Diff line number Diff line
@@ -1145,7 +1145,7 @@ struct rusage32 {
SYSCALL_DEFINE2(osf_getrusage, int, who, struct rusage32 __user *, ru)
SYSCALL_DEFINE2(osf_getrusage, int, who, struct rusage32 __user *, ru)
{
{
	struct rusage32 r;
	struct rusage32 r;
	cputime_t utime, stime;
	u64 utime, stime;
	unsigned long utime_jiffies, stime_jiffies;
	unsigned long utime_jiffies, stime_jiffies;


	if (who != RUSAGE_SELF && who != RUSAGE_CHILDREN)
	if (who != RUSAGE_SELF && who != RUSAGE_CHILDREN)
@@ -1154,9 +1154,9 @@ SYSCALL_DEFINE2(osf_getrusage, int, who, struct rusage32 __user *, ru)
	memset(&r, 0, sizeof(r));
	memset(&r, 0, sizeof(r));
	switch (who) {
	switch (who) {
	case RUSAGE_SELF:
	case RUSAGE_SELF:
		task_cputime_t(current, &utime, &stime);
		task_cputime(current, &utime, &stime);
		utime_jiffies = cputime_to_jiffies(utime);
		utime_jiffies = nsecs_to_jiffies(utime);
		stime_jiffies = cputime_to_jiffies(stime);
		stime_jiffies = nsecs_to_jiffies(stime);
		jiffies_to_timeval32(utime_jiffies, &r.ru_utime);
		jiffies_to_timeval32(utime_jiffies, &r.ru_utime);
		jiffies_to_timeval32(stime_jiffies, &r.ru_stime);
		jiffies_to_timeval32(stime_jiffies, &r.ru_stime);
		r.ru_minflt = current->min_flt;
		r.ru_minflt = current->min_flt;