[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [RFC PATCH 05/13] pmstat: make pmstat functions more generalizable
ACPI-specific and x86 specific parts are moved under appropriate ifdefs. Now pmstat functions can be used in ARM platform. Signed-off-by: Oleksandr Dmytryshyn <oleksandr.dmytryshyn@xxxxxxxxxxxxxxx> --- xen/drivers/pm/pmstat.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/xen/drivers/pm/pmstat.c b/xen/drivers/pm/pmstat.c index fff3609..7063d02 100644 --- a/xen/drivers/pm/pmstat.c +++ b/xen/drivers/pm/pmstat.c @@ -37,7 +37,6 @@ #include <asm/processor.h> #include <xen/percpu.h> #include <xen/domain.h> -#include <xen/acpi.h> #include <public/sysctl.h> #include <cpufreq/cpufreq.h> @@ -133,7 +132,8 @@ int do_get_pm_info(struct xen_sysctl_get_pmstat *op) cpufreq_statistic_reset(op->cpuid); break; } - +/* For now those operations are supported only for X86 */ +#ifdef CONFIG_X86 case PMSTAT_get_max_cx: { op->u.getcx.nr = pmstat_get_cx_nr(op->cpuid); @@ -152,6 +152,7 @@ int do_get_pm_info(struct xen_sysctl_get_pmstat *op) ret = pmstat_reset_cx_stat(op->cpuid); break; } +#endif /* CONFIG_X86 */ default: printk("not defined sub-hypercall @ do_get_pm_info\n"); @@ -467,6 +468,7 @@ int do_pm_op(struct xen_sysctl_pm_op *op) break; } +#ifdef CONFIG_ACPI case XEN_SYSCTL_pm_op_get_max_cstate: { op->u.get_max_cstate = acpi_get_cstate_limit(); @@ -478,6 +480,7 @@ int do_pm_op(struct xen_sysctl_pm_op *op) acpi_set_cstate_limit(op->u.set_max_cstate); break; } +#endif /* CONFIG_ACPI */ #ifdef CONFIG_X86 case XEN_SYSCTL_pm_op_enable_turbo: @@ -502,6 +505,7 @@ int do_pm_op(struct xen_sysctl_pm_op *op) return ret; } +#ifdef CONFIG_ACPI int acpi_set_pdc_bits(u32 acpi_id, XEN_GUEST_HANDLE_PARAM(uint32) pdc) { u32 bits[3]; @@ -532,3 +536,4 @@ int acpi_set_pdc_bits(u32 acpi_id, XEN_GUEST_HANDLE_PARAM(uint32) pdc) return ret; } +#endif /* CONFIG_ACPI */ -- 1.9.1 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |