diff -r 08f77df14cba xen/arch/x86/acpi/cpufreq/cpufreq_ondemand.c --- a/xen/arch/x86/acpi/cpufreq/cpufreq_ondemand.c Wed Jul 02 11:30:37 2008 +0900 +++ b/xen/arch/x86/acpi/cpufreq/cpufreq_ondemand.c Thu Jul 03 18:00:41 2008 +0900 @@ -51,21 +51,6 @@ }; static struct timer dbs_timer[NR_CPUS]; - -inline uint64_t get_cpu_idle_time(unsigned int cpu) -{ - uint64_t idle_ns; - struct vcpu *v; - - if ((v = idle_vcpu[cpu]) == NULL) - return 0; - - idle_ns = v->runstate.time[RUNSTATE_running]; - if (v->is_running) - idle_ns += NOW() - v->runstate.state_entry_time; - - return idle_ns; -} static void dbs_check_cpu(struct cpu_dbs_info_s *this_dbs_info) { diff -r 08f77df14cba xen/include/acpi/cpufreq/processor_perf.h --- a/xen/include/acpi/cpufreq/processor_perf.h Wed Jul 02 11:30:37 2008 +0900 +++ b/xen/include/acpi/cpufreq/processor_perf.h Thu Jul 03 18:00:41 2008 +0900 @@ -3,6 +3,7 @@ #include #include +#include int get_cpu_id(u8); int acpi_cpufreq_init(void); @@ -20,7 +21,21 @@ void cpufreq_suspend(void); int cpufreq_resume(void); -inline uint64_t get_cpu_idle_time(unsigned int); +always_inline uint64_t get_cpu_idle_time(unsigned int cpu) +{ + uint64_t idle_ns; + struct vcpu *v; + + if ((v = idle_vcpu[cpu]) == NULL) + return 0; + + idle_ns = v->runstate.time[RUNSTATE_running]; + if (v->is_running) + idle_ns += NOW() - v->runstate.state_entry_time; + + return idle_ns; +} + struct processor_performance { uint32_t state;