linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Stanislaw Gruszka <sgruszka@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: Ingo Molnar <mingo@redhat.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Paul Mackerras <paulus@samba.org>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Michael Neuling <mikey@neuling.org>,
	linuxppc-dev@lists.ozlabs.org,
	Martin Schwidefsky <schwidefsky@de.ibm.com>,
	Heiko Carstens <heiko.carstens@de.ibm.com>,
	linux-s390@vger.kernel.org,
	Stanislaw Gruszka <sgruszka@redhat.com>
Subject: [PATCH 1/4] cputime/powerpc: remove cputime_last_delta global variable
Date: Mon, 31 Oct 2016 13:36:26 +0100	[thread overview]
Message-ID: <1477917389-11341-2-git-send-email-sgruszka@redhat.com> (raw)
In-Reply-To: <1477917389-11341-1-git-send-email-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.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
---
 arch/powerpc/include/asm/cputime.h |    7 -------
 arch/powerpc/kernel/time.c         |    2 --
 2 files changed, 0 insertions(+), 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 @@ static inline void setup_cputime_one_jiffy(void) { }
  * 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 @@ struct clock_event_device decrementer_clockevent = {
 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;
 
-- 
1.7.1

  reply	other threads:[~2016-10-31 12:37 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-31 12:36 [PATCH 0/4] cputime: some optimizations and cleanups Stanislaw Gruszka
2016-10-31 12:36 ` Stanislaw Gruszka [this message]
2016-11-03  0:50   ` [PATCH 1/4] cputime/powerpc: remove cputime_last_delta global variable Paul Mackerras
2016-10-31 12:36 ` [PATCH 2/4] cputime/powerpc: remove cputime_to_scaled() Stanislaw Gruszka
2016-11-03  0:51   ` Paul Mackerras
2016-10-31 12:36 ` [PATCH 3/4] cputime/powerpc/s390: make scaled cputime arch specific Stanislaw Gruszka
2016-10-31 13:02   ` kbuild test robot
2016-10-31 13:13   ` [PATCH v2 " Stanislaw Gruszka
2016-10-31 14:13   ` [PATCH " kbuild test robot
2016-10-31 16:21   ` [PATCH v3 " Stanislaw Gruszka
2016-11-02  9:11   ` [PATCH " Christian Borntraeger
2016-11-02  9:38     ` Stanislaw Gruszka
2016-11-02 21:22       ` Martin Schwidefsky
2016-10-31 12:36 ` [PATCH 4/4] cputime: simplify task_cputime() Stanislaw Gruszka
2016-11-09 13:01 ` [PATCH 0/4] cputime: some optimizations and cleanups Frederic Weisbecker

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=1477917389-11341-2-git-send-email-sgruszka@redhat.com \
    --to=sgruszka@redhat.com \
    --cc=benh@kernel.crashing.org \
    --cc=fweisbec@gmail.com \
    --cc=heiko.carstens@de.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mikey@neuling.org \
    --cc=mingo@redhat.com \
    --cc=paulus@samba.org \
    --cc=peterz@infradead.org \
    --cc=schwidefsky@de.ibm.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).