@@ -35,7 +35,6 @@
#include <asm/processor.h>
#include <xen/percpu.h>
#include <xen/domain.h>
-#include <xen/acpi.h>
#include <public/sysctl.h>
#include <xen/cpufreq.h>
@@ -132,6 +131,8 @@ int do_get_pm_info(struct xen_sysctl_get_pmstat *op)
break;
}
+/* For now those operations can be used only when ACPI is enabled */
+#ifdef CONFIG_ACPI
case PMSTAT_get_max_cx:
{
op->u.getcx.nr = pmstat_get_cx_nr(op->cpuid);
@@ -150,6 +151,7 @@ int do_get_pm_info(struct xen_sysctl_get_pmstat *op)
ret = pmstat_reset_cx_stat(op->cpuid);
break;
}
+#endif /* CONFIG_ACPI */
default:
printk("not defined sub-hypercall @ do_get_pm_info\n");
@@ -465,6 +467,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();
@@ -476,6 +479,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_HAS_CPU_TURBO
case XEN_SYSCTL_pm_op_enable_turbo:
@@ -500,6 +504,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];
@@ -530,3 +535,4 @@ int acpi_set_pdc_bits(u32 acpi_id, XEN_GUEST_HANDLE_PARAM(uint32) pdc)
return ret;
}
+#endif /* CONFIG_ACPI */
@@ -6,10 +6,12 @@
#include <public/sysctl.h> /* for struct pm_cx_stat */
int set_px_pminfo(uint32_t cpu, struct xen_processor_performance *perf);
+#ifdef CONFIG_ACPI
long set_cx_pminfo(uint32_t cpu, struct xen_processor_power *power);
uint32_t pmstat_get_cx_nr(uint32_t cpuid);
int pmstat_get_cx_stat(uint32_t cpuid, struct pm_cx_stat *stat);
int pmstat_reset_cx_stat(uint32_t cpuid);
+#endif
int do_get_pm_info(struct xen_sysctl_get_pmstat *op);
int do_pm_op(struct xen_sysctl_pm_op *op);