lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-e2339a4caa5e83a3da5e76880d81e8a23e97aa16@git.kernel.org>
Date:   Wed, 1 Feb 2017 02:04:50 -0800
From:   tip-bot for Frederic Weisbecker <tipbot@...or.com>
To:     linux-tip-commits@...r.kernel.org
Cc:     benh@...nel.crashing.org, fenghua.yu@...el.com,
        torvalds@...ux-foundation.org, linux-kernel@...r.kernel.org,
        hpa@...or.com, heiko.carstens@...ibm.com, schwidefsky@...ibm.com,
        mingo@...nel.org, tony.luck@...el.com, peterz@...radead.org,
        tglx@...utronix.de, wanpeng.li@...mail.com, sgruszka@...hat.com,
        paulus@...ba.org, mpe@...erman.id.au, fweisbec@...il.com,
        riel@...hat.com
Subject: [tip:sched/core] ia64: Convert vtime to use nsec units directly

Commit-ID:  e2339a4caa5e83a3da5e76880d81e8a23e97aa16
Gitweb:     http://git.kernel.org/tip/e2339a4caa5e83a3da5e76880d81e8a23e97aa16
Author:     Frederic Weisbecker <fweisbec@...il.com>
AuthorDate: Tue, 31 Jan 2017 04:09:45 +0100
Committer:  Ingo Molnar <mingo@...nel.org>
CommitDate: Wed, 1 Feb 2017 09:14:02 +0100

ia64: Convert vtime to use nsec units directly

There is no need anymore for this cputime_t midlayer. Let's use nsec
units directly.

Signed-off-by: Frederic Weisbecker <fweisbec@...il.com>
Cc: Benjamin Herrenschmidt <benh@...nel.crashing.org>
Cc: Fenghua Yu <fenghua.yu@...el.com>
Cc: Heiko Carstens <heiko.carstens@...ibm.com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Martin Schwidefsky <schwidefsky@...ibm.com>
Cc: Michael Ellerman <mpe@...erman.id.au>
Cc: Paul Mackerras <paulus@...ba.org>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Rik van Riel <riel@...hat.com>
Cc: Stanislaw Gruszka <sgruszka@...hat.com>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: Tony Luck <tony.luck@...el.com>
Cc: Wanpeng Li <wanpeng.li@...mail.com>
Link: http://lkml.kernel.org/r/1485832191-26889-30-git-send-email-fweisbec@gmail.com
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
 arch/ia64/kernel/head.S |  4 ++--
 arch/ia64/kernel/time.c | 14 +++++++-------
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/arch/ia64/kernel/head.S b/arch/ia64/kernel/head.S
index c9b5e94..3204fdd 100644
--- a/arch/ia64/kernel/head.S
+++ b/arch/ia64/kernel/head.S
@@ -1031,7 +1031,7 @@ GLOBAL_ENTRY(ia64_native_sched_clock)
 END(ia64_native_sched_clock)
 
 #ifdef CONFIG_VIRT_CPU_ACCOUNTING_NATIVE
-GLOBAL_ENTRY(cycle_to_cputime)
+GLOBAL_ENTRY(cycle_to_nsec)
 	alloc r16=ar.pfs,1,0,0,0
 	addl r8=THIS_CPU(ia64_cpu_info) + IA64_CPUINFO_NSEC_PER_CYC_OFFSET,r0
 	;;
@@ -1047,7 +1047,7 @@ GLOBAL_ENTRY(cycle_to_cputime)
 	;;
 	shrp r8=r9,r8,IA64_NSEC_PER_CYC_SHIFT
 	br.ret.sptk.many rp
-END(cycle_to_cputime)
+END(cycle_to_nsec)
 #endif /* CONFIG_VIRT_CPU_ACCOUNTING_NATIVE */
 
 #ifdef CONFIG_IA64_BRL_EMU
diff --git a/arch/ia64/kernel/time.c b/arch/ia64/kernel/time.c
index f15bca4..faa1168 100644
--- a/arch/ia64/kernel/time.c
+++ b/arch/ia64/kernel/time.c
@@ -60,7 +60,7 @@ static struct clocksource *itc_clocksource;
 
 #include <linux/kernel_stat.h>
 
-extern cputime_t cycle_to_cputime(u64 cyc);
+extern u64 cycle_to_nsec(u64 cyc);
 
 void vtime_flush(struct task_struct *tsk)
 {
@@ -68,26 +68,26 @@ void vtime_flush(struct task_struct *tsk)
 	u64 delta;
 
 	if (ti->utime)
-		account_user_time(tsk, cputime_to_nsecs(cycle_to_cputime(ti->utime)));
+		account_user_time(tsk, cycle_to_nsec(ti->utime));
 
 	if (ti->gtime)
-		account_guest_time(tsk, cputime_to_nsecs(cycle_to_cputime(ti->gtime)));
+		account_guest_time(tsk, cycle_to_nsec(ti->gtime));
 
 	if (ti->idle_time)
-		account_idle_time(cputime_to_nsecs(cycle_to_cputime(ti->idle_time)));
+		account_idle_time(cycle_to_nsec(ti->idle_time));
 
 	if (ti->stime) {
-		delta = cputime_to_nsecs(cycle_to_cputime(ti->stime));
+		delta = cycle_to_nsec(ti->stime);
 		account_system_index_time(tsk, delta, CPUTIME_SYSTEM);
 	}
 
 	if (ti->hardirq_time) {
-		delta = cputime_to_nsecs(cycle_to_cputime(ti->hardirq_time));
+		delta = cycle_to_nsec(ti->hardirq_time);
 		account_system_index_time(tsk, delta, CPUTIME_IRQ);
 	}
 
 	if (ti->softirq_time) {
-		delta = cputime_to_nsecs(cycle_to_cputime(ti->softirq_time));
+		delta = cycle_to_nsec(ti->softirq_time));
 		account_system_index_time(tsk, delta, CPUTIME_SOFTIRQ);
 	}
 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ