[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [Patch] fix compilation on Fedora9
Hi, I met a compilation error, and the attache patch fixes it. gcc -O2 -fomit-frame-pointer -m32 -march=i686 -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes -Wno-unused-value -Wdeclaration-after-statement -DNDEBUG -nostdinc -fno-builtin -fno-common -iwithprefix include -Werror -Wno-pointer-arith -pipe -I/root/tmp/xen-unstable.hg.17860/xen/include -I/root/tmp/xen-unstable.hg.17860/xen/include/asm-x86/mach-generic -I/root/tmp/xen-unstable.hg.17860/xen/include/asm-x86/mach-default -msoft-float -fno-stack-protector -g -D__XEN__ -c platform_hypercall.c -o platform_hypercall.o cc1: warnings being treated as errors /root/tmp/xen-unstable.hg/xen/include/acpi/cpufreq/processor_perf.h:23: error: inline function 'get_cpu_idle_time' declared but never defined make[4]: *** [platform_hypercall.o] Error 1 make[4]: Leaving directory `/root/tmp/xen-unstable.hg.17860/xen/arch/x86' make[3]: *** [/root/tmp/xen-unstable.hg.17860/xen/arch/x86/built_in.o] Error 2 make[3]: Leaving directory `/root/tmp/xen-unstable.hg.17860/xen/arch/x86' make[2]: *** [/root/tmp/xen-unstable.hg.17860/xen/xen] Error 2 make[2]: Leaving directory `/root/tmp/xen-unstable.hg.17860/xen' make[1]: *** [install] Error 2 make[1]: Leaving directory `/root/tmp/xen-unstable.hg.17860/xen' make: *** [install-xen] Error 2 Best Regards, Akio Takebe 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 <public/platform.h> #include <public/sysctl.h> +#include <xen/sched.h> 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; _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |