From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751761AbdBAJzT (ORCPT ); Wed, 1 Feb 2017 04:55:19 -0500 Received: from terminus.zytor.com ([65.50.211.136]:54400 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751299AbdBAJzS (ORCPT ); Wed, 1 Feb 2017 04:55:18 -0500 Date: Wed, 1 Feb 2017 01:54:23 -0800 From: tip-bot for Frederic Weisbecker Message-ID: Cc: heiko.carstens@de.ibm.com, riel@redhat.com, tglx@linutronix.de, mpe@ellerman.id.au, mingo@kernel.org, tony.luck@intel.com, benh@kernel.crashing.org, schwidefsky@de.ibm.com, hpa@zytor.com, fenghua.yu@intel.com, paulus@samba.org, wanpeng.li@hotmail.com, linux-kernel@vger.kernel.org, fweisbec@gmail.com, sgruszka@redhat.com, peterz@infradead.org, torvalds@linux-foundation.org Reply-To: heiko.carstens@de.ibm.com, riel@redhat.com, tglx@linutronix.de, mpe@ellerman.id.au, mingo@kernel.org, tony.luck@intel.com, schwidefsky@de.ibm.com, benh@kernel.crashing.org, hpa@zytor.com, fenghua.yu@intel.com, paulus@samba.org, wanpeng.li@hotmail.com, linux-kernel@vger.kernel.org, fweisbec@gmail.com, peterz@infradead.org, sgruszka@redhat.com, torvalds@linux-foundation.org In-Reply-To: <1485832191-26889-10-git-send-email-fweisbec@gmail.com> References: <1485832191-26889-10-git-send-email-fweisbec@gmail.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:sched/core] x86: Convert obsolete cputime type to nsecs Git-Commit-ID: f7dcd63de44219fb5e9a36fc2c0ca23ddd79d01c X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: f7dcd63de44219fb5e9a36fc2c0ca23ddd79d01c Gitweb: http://git.kernel.org/tip/f7dcd63de44219fb5e9a36fc2c0ca23ddd79d01c Author: Frederic Weisbecker AuthorDate: Tue, 31 Jan 2017 04:09:25 +0100 Committer: Ingo Molnar 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 Cc: Benjamin Herrenschmidt Cc: Fenghua Yu Cc: Heiko Carstens Cc: Linus Torvalds Cc: Martin Schwidefsky Cc: Michael Ellerman Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Rik van Riel Cc: Stanislaw Gruszka Cc: Thomas Gleixner Cc: Tony Luck Cc: Wanpeng Li Link: http://lkml.kernel.org/r/1485832191-26889-10-git-send-email-fweisbec@gmail.com Signed-off-by: Ingo Molnar --- 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);