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-f7dcd63de44219fb5e9a36fc2c0ca23ddd79d01c@git.kernel.org>
Date:   Wed, 1 Feb 2017 01:54:23 -0800
From:   tip-bot for Frederic Weisbecker <tipbot@...or.com>
To:     linux-tip-commits@...r.kernel.org
Cc:     heiko.carstens@...ibm.com, riel@...hat.com, tglx@...utronix.de,
        mpe@...erman.id.au, mingo@...nel.org, tony.luck@...el.com,
        benh@...nel.crashing.org, schwidefsky@...ibm.com, hpa@...or.com,
        fenghua.yu@...el.com, paulus@...ba.org, wanpeng.li@...mail.com,
        linux-kernel@...r.kernel.org, fweisbec@...il.com,
        sgruszka@...hat.com, peterz@...radead.org,
        torvalds@...ux-foundation.org
Subject: [tip:sched/core] x86: Convert obsolete cputime type to nsecs

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

x86: Convert obsolete cputime type to nsecs

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

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-10-git-send-email-fweisbec@gmail.com
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
 arch/x86/kernel/apm_32.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/x86/kernel/apm_32.c b/arch/x86/kernel/apm_32.c
index 89c84fc..4a7080c 100644
--- a/arch/x86/kernel/apm_32.c
+++ b/arch/x86/kernel/apm_32.c
@@ -905,21 +905,21 @@ static int apm_cpu_idle(struct cpuidle_device *dev,
 {
 	static int use_apm_idle; /* = 0 */
 	static unsigned int last_jiffies; /* = 0 */
-	static unsigned int last_stime; /* = 0 */
-	cputime_t stime, utime;
+	static u64 last_stime; /* = 0 */
+	u64 stime, utime;
 
 	int apm_idle_done = 0;
 	unsigned int jiffies_since_last_check = jiffies - last_jiffies;
 	unsigned int bucket;
 
 recalc:
-	task_cputime_t(current, &utime, &stime);
+	task_cputime(current, &utime, &stime);
 	if (jiffies_since_last_check > IDLE_CALC_LIMIT) {
 		use_apm_idle = 0;
 	} else if (jiffies_since_last_check > idle_period) {
 		unsigned int idle_percentage;
 
-		idle_percentage = cputime_to_jiffies(stime - last_stime);
+		idle_percentage = nsecs_to_jiffies(stime - last_stime);
 		idle_percentage *= 100;
 		idle_percentage /= jiffies_since_last_check;
 		use_apm_idle = (idle_percentage > idle_threshold);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ