Skip to content

Commit

Permalink
[PATCH] x86-64: fix x86_64-mm-sched-clock-share
Browse files Browse the repository at this point in the history
Fix for the following patch. Provide dummy cpufreq functions when
CPUFREQ is not compiled in.

Cc: Andi Kleen <ak@suse.de>
Cc: Dave Jones <davej@codemonkey.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Andi Kleen <ak@suse.de>
  • Loading branch information
Andrew Morton authored and Andi Kleen committed May 2, 2007
1 parent a4831e0 commit 184c44d
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions include/linux/cpufreq.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,15 @@
* CPUFREQ NOTIFIER INTERFACE *
*********************************************************************/

#ifdef CONFIG_CPU_FREQ
int cpufreq_register_notifier(struct notifier_block *nb, unsigned int list);
#else
static inline int cpufreq_register_notifier(struct notifier_block *nb,
unsigned int list)
{
return 0;
}
#endif
int cpufreq_unregister_notifier(struct notifier_block *nb, unsigned int list);

#define CPUFREQ_TRANSITION_NOTIFIER (0)
Expand Down Expand Up @@ -261,17 +269,22 @@ int cpufreq_set_policy(struct cpufreq_policy *policy);
int cpufreq_get_policy(struct cpufreq_policy *policy, unsigned int cpu);
int cpufreq_update_policy(unsigned int cpu);

/* query the current CPU frequency (in kHz). If zero, cpufreq couldn't detect it */
unsigned int cpufreq_get(unsigned int cpu);

/* query the last known CPU freq (in kHz). If zero, cpufreq couldn't detect it */
/*
* query the last known CPU freq (in kHz). If zero, cpufreq couldn't detect it
*/
#ifdef CONFIG_CPU_FREQ
unsigned int cpufreq_quick_get(unsigned int cpu);
unsigned int cpufreq_get(unsigned int cpu);
#else
static inline unsigned int cpufreq_quick_get(unsigned int cpu)
{
return 0;
}
static inline unsigned int cpufreq_get(unsigned int cpu)
{
return 0;
}
#endif


Expand Down

0 comments on commit 184c44d

Please sign in to comment.