Skip to content

Commit

Permalink
x86: set_cyc2ns_scale() remove prev scale
Browse files Browse the repository at this point in the history
Peter Zijlstra pointed out that it's unused.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Ingo Molnar committed Apr 17, 2008
1 parent b447a46 commit 1725037
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions arch/x86/kernel/tsc_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ DEFINE_PER_CPU(unsigned long, cyc2ns);

static void set_cyc2ns_scale(unsigned long cpu_khz, int cpu)
{
unsigned long flags, prev_scale, *scale;
unsigned long long tsc_now, ns_now;
unsigned long flags, *scale;

local_irq_save(flags);
sched_clock_idle_sleep_event();
Expand All @@ -95,7 +95,6 @@ static void set_cyc2ns_scale(unsigned long cpu_khz, int cpu)
rdtscll(tsc_now);
ns_now = __cycles_2_ns(tsc_now);

prev_scale = *scale;
if (cpu_khz)
*scale = (NSEC_PER_MSEC << CYC2NS_SCALE_FACTOR)/cpu_khz;

Expand Down
3 changes: 1 addition & 2 deletions arch/x86/kernel/tsc_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ DEFINE_PER_CPU(unsigned long, cyc2ns);

static void set_cyc2ns_scale(unsigned long cpu_khz, int cpu)
{
unsigned long flags, prev_scale, *scale;
unsigned long long tsc_now, ns_now;
unsigned long flags, *scale;

local_irq_save(flags);
sched_clock_idle_sleep_event();
Expand All @@ -55,7 +55,6 @@ static void set_cyc2ns_scale(unsigned long cpu_khz, int cpu)
rdtscll(tsc_now);
ns_now = __cycles_2_ns(tsc_now);

prev_scale = *scale;
if (cpu_khz)
*scale = (NSEC_PER_MSEC << CYC2NS_SCALE_FACTOR)/cpu_khz;

Expand Down

0 comments on commit 1725037

Please sign in to comment.