linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Frederic Weisbecker <fweisbec@gmail.com>
To: Ingo Molnar <mingo@kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Stanislaw Gruszka <sgruszka@redhat.com>,
	Paul Mackerras <paulus@ozlabs.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Heiko Carstens <heiko.carstens@de.ibm.com>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Michael Neuling <mikey@neuling.org>,
	Paul Mackerras <paulus@samba.org>, Ingo Molnar <mingo@redhat.com>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Martin Schwidefsky <schwidefsky@de.ibm.com>
Subject: [PATCH 1/4] cputime/powerpc: Remove cputime_last_delta global variable
Date: Tue, 15 Nov 2016 03:06:49 +0100	[thread overview]
Message-ID: <1479175612-14718-2-git-send-email-fweisbec@gmail.com> (raw)
In-Reply-To: <1479175612-14718-1-git-send-email-fweisbec@gmail.com>

From: Stanislaw Gruszka <sgruszka@redhat.com>

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.

Acked-by: Paul Mackerras <paulus@ozlabs.org>
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Michael Neuling <mikey@neuling.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Link: http://lkml.kernel.org/r/1477917389-11341-2-git-send-email-sgruszka@redhat.com
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
---
 arch/powerpc/include/asm/cputime.h | 7 -------
 arch/powerpc/kernel/time.c         | 2 --
 2 files changed, 9 deletions(-)

diff --git a/arch/powerpc/include/asm/cputime.h b/arch/powerpc/include/asm/cputime.h
index 4f60db0..9f5dcf7 100644
--- a/arch/powerpc/include/asm/cputime.h
+++ b/arch/powerpc/include/asm/cputime.h
@@ -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;
 }
 
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c
index bc3f7d0..8105198 100644
--- a/arch/powerpc/kernel/time.c
+++ b/arch/powerpc/kernel/time.c
@@ -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;
 
-- 
2.7.4

  reply	other threads:[~2016-11-15  2:07 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-15  2:06 [GIT PULL] cputime: Scaled cputime optimizations and cleanups Frederic Weisbecker
2016-11-15  2:06 ` Frederic Weisbecker [this message]
2016-11-15 10:50   ` [tip:sched/core] sched/cputime, powerpc: Remove cputime_last_delta global variable tip-bot for Stanislaw Gruszka
2016-11-15  2:06 ` [PATCH 2/4] cputime/powerpc: Remove cputime_to_scaled() Frederic Weisbecker
2016-11-15 10:51   ` [tip:sched/core] sched/cputime, powerpc: " tip-bot for Stanislaw Gruszka
2016-11-15  2:06 ` [PATCH 3/4] cputime/powerpc/s390: Make scaled cputime arch specific Frederic Weisbecker
2016-11-15  2:06 ` [PATCH 4/4] cputime: Simplify task_cputime() Frederic Weisbecker
2016-11-15 10:52   ` [tip:sched/core] sched/cputime: " tip-bot for Stanislaw Gruszka
  -- strict thread matches above, loose matches on Subject: below --
2016-10-31 12:36 [PATCH 0/4] cputime: some optimizations and cleanups Stanislaw Gruszka
2016-10-31 12:36 ` [PATCH 1/4] cputime/powerpc: remove cputime_last_delta global variable Stanislaw Gruszka
2016-11-03  0:50   ` Paul Mackerras

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1479175612-14718-2-git-send-email-fweisbec@gmail.com \
    --to=fweisbec@gmail.com \
    --cc=benh@kernel.crashing.org \
    --cc=heiko.carstens@de.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mikey@neuling.org \
    --cc=mingo@kernel.org \
    --cc=mingo@redhat.com \
    --cc=paulus@ozlabs.org \
    --cc=paulus@samba.org \
    --cc=peterz@infradead.org \
    --cc=schwidefsky@de.ibm.com \
    --cc=sgruszka@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).