From: Karsten Wiese <fzu@wemgehoertderstaat.de>
To: linux-kernel@vger.kernel.org
Cc: Ingo Molnar <mingo@elte.hu>
Subject: [PATCH] x86: set_cyc2ns_scale() remove tsc_now and ns_now
Date: Thu, 10 Apr 2008 23:31:11 +0200 [thread overview]
Message-ID: <200804102331.11815.fzu@wemgehoertderstaat.de> (raw)
Both are unused and the functions rdtscll() and __cycles_2_ns() don't have
side-effects.
Signed-off-by: Karsten Wiese <fzu@wemgehoertderstaat.de>
---
arch/x86/kernel/tsc_32.c | 4 ----
arch/x86/kernel/tsc_64.c | 4 ----
2 files changed, 0 insertions(+), 8 deletions(-)
diff --git a/arch/x86/kernel/tsc_32.c b/arch/x86/kernel/tsc_32.c
index 82602d7..0406b80 100644
--- a/arch/x86/kernel/tsc_32.c
+++ b/arch/x86/kernel/tsc_32.c
@@ -84,7 +84,6 @@ DEFINE_PER_CPU(unsigned long, cyc2ns);
static void set_cyc2ns_scale(unsigned long cpu_khz, int cpu)
{
- unsigned long long tsc_now, ns_now;
unsigned long flags, *scale;
local_irq_save(flags);
@@ -92,9 +91,6 @@ static void set_cyc2ns_scale(unsigned long cpu_khz, int cpu)
scale = &per_cpu(cyc2ns, cpu);
- rdtscll(tsc_now);
- ns_now = __cycles_2_ns(tsc_now);
-
if (cpu_khz)
*scale = (NSEC_PER_MSEC << CYC2NS_SCALE_FACTOR)/cpu_khz;
diff --git a/arch/x86/kernel/tsc_64.c b/arch/x86/kernel/tsc_64.c
index f08e1ea..5246036 100644
--- a/arch/x86/kernel/tsc_64.c
+++ b/arch/x86/kernel/tsc_64.c
@@ -44,7 +44,6 @@ DEFINE_PER_CPU(unsigned long, cyc2ns);
static void set_cyc2ns_scale(unsigned long cpu_khz, int cpu)
{
- unsigned long long tsc_now, ns_now;
unsigned long flags, *scale;
local_irq_save(flags);
@@ -52,9 +51,6 @@ static void set_cyc2ns_scale(unsigned long cpu_khz, int cpu)
scale = &per_cpu(cyc2ns, cpu);
- rdtscll(tsc_now);
- ns_now = __cycles_2_ns(tsc_now);
-
if (cpu_khz)
*scale = (NSEC_PER_MSEC << CYC2NS_SCALE_FACTOR)/cpu_khz;
--
1.5.3.3
next reply other threads:[~2008-04-10 21:31 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-10 21:31 Karsten Wiese [this message]
2008-04-11 7:42 ` Andi Kleen
2008-04-11 7:55 ` Ingo Molnar
2008-04-11 8:06 ` Andi Kleen
2008-04-11 8:25 ` Guillaume Chazarain
2008-04-11 8:40 ` Andi Kleen
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=200804102331.11815.fzu@wemgehoertderstaat.de \
--to=fzu@wemgehoertderstaat.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/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
all inboxes | Powered by JetHome®