Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 48565
b: refs/heads/master
c: 26a08eb
h: refs/heads/master
i:
  48563: 17e43ba
v: v3
  • Loading branch information
Thomas Gleixner authored and Linus Torvalds committed Feb 16, 2007
1 parent 8f926ce commit 57064c6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 39 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c1d370e167d66b10bca3b602d3740405469383de
refs/heads/master: 26a08eb301a2e3fce5a501e3dd26cf3ec46591d7
40 changes: 2 additions & 38 deletions trunk/arch/i386/kernel/tsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -222,34 +222,6 @@ void __init tsc_init(void)

#ifdef CONFIG_CPU_FREQ

static unsigned int cpufreq_delayed_issched = 0;
static unsigned int cpufreq_init = 0;
static struct work_struct cpufreq_delayed_get_work;

static void handle_cpufreq_delayed_get(struct work_struct *work)
{
unsigned int cpu;

for_each_online_cpu(cpu)
cpufreq_get(cpu);

cpufreq_delayed_issched = 0;
}

/*
* if we notice cpufreq oddness, schedule a call to cpufreq_get() as it tries
* to verify the CPU frequency the timing core thinks the CPU is running
* at is still correct.
*/
static inline void cpufreq_delayed_get(void)
{
if (cpufreq_init && !cpufreq_delayed_issched) {
cpufreq_delayed_issched = 1;
printk(KERN_DEBUG "Checking if CPU frequency changed.\n");
schedule_work(&cpufreq_delayed_get_work);
}
}

/*
* if the CPU frequency is scaled, TSC-based delays will need a different
* loops_per_jiffy value to function properly.
Expand Down Expand Up @@ -313,17 +285,9 @@ static struct notifier_block time_cpufreq_notifier_block = {

static int __init cpufreq_tsc(void)
{
int ret;

INIT_WORK(&cpufreq_delayed_get_work, handle_cpufreq_delayed_get);
ret = cpufreq_register_notifier(&time_cpufreq_notifier_block,
CPUFREQ_TRANSITION_NOTIFIER);
if (!ret)
cpufreq_init = 1;

return ret;
return cpufreq_register_notifier(&time_cpufreq_notifier_block,
CPUFREQ_TRANSITION_NOTIFIER);
}

core_initcall(cpufreq_tsc);

#endif
Expand Down

0 comments on commit 57064c6

Please sign in to comment.