]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
sched/cputime, powerpc: Remove cputime_last_delta global variable
authorStanislaw Gruszka <sgruszka@redhat.com>
Tue, 15 Nov 2016 02:06:49 +0000 (03:06 +0100)
committerIngo Molnar <mingo@kernel.org>
Tue, 15 Nov 2016 08:51:04 +0000 (09:51 +0100)
Since commit:

  cf9efce0ce313 ("powerpc: Account time using timebase rather than PURR")

cputime_last_delta is not initialized to other value than 0, hence it's
not used except zero check and cputime_to_scaled() just returns
the argument.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Acked-by: Paul Mackerras <paulus@ozlabs.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Michael Neuling <mikey@neuling.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/1479175612-14718-2-git-send-email-fweisbec@gmail.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/powerpc/include/asm/cputime.h
arch/powerpc/kernel/time.c

index 4f60db074725c7aed926fb9903b416d725abf51e..9f5dcf73b6086518228c25d0a52aaa2490712eb8 100644 (file)
@@ -46,8 +46,6 @@ extern cputime_t cputime_one_jiffy;
  * Convert cputime <-> jiffies
  */
 extern u64 __cputime_jiffies_factor;
-DECLARE_PER_CPU(unsigned long, cputime_last_delta);
-DECLARE_PER_CPU(unsigned long, cputime_scaled_last_delta);
 
 static inline unsigned long cputime_to_jiffies(const cputime_t ct)
 {
@@ -58,11 +56,6 @@ static inline unsigned long cputime_to_jiffies(const cputime_t ct)
  * the last scaled to real ratio */
 static inline cputime_t cputime_to_scaled(const cputime_t ct)
 {
-       if (cpu_has_feature(CPU_FTR_SPURR) &&
-           __this_cpu_read(cputime_last_delta))
-               return (__force u64) ct *
-                       __this_cpu_read(cputime_scaled_last_delta) /
-                       __this_cpu_read(cputime_last_delta);
        return ct;
 }
 
index bc3f7d0d7b7987dec3a74e4c59c2d133adb1330c..81051986739ccef795cc7489b3311f3231f10cfd 100644 (file)
@@ -164,8 +164,6 @@ u64 __cputime_sec_factor;
 EXPORT_SYMBOL(__cputime_sec_factor);
 u64 __cputime_clockt_factor;
 EXPORT_SYMBOL(__cputime_clockt_factor);
-DEFINE_PER_CPU(unsigned long, cputime_last_delta);
-DEFINE_PER_CPU(unsigned long, cputime_scaled_last_delta);
 
 cputime_t cputime_one_jiffy;