@@ -171,7 +171,7 @@ long do_sysctl(XEN_GUEST_HANDLE_PARAM(xen_sysctl_t) u_sysctl)
op->u.availheap.avail_bytes <<= PAGE_SHIFT;
break;
-#ifdef CONFIG_HAS_ACPI
+#if defined (CONFIG_HAS_ACPI) && defined (CONFIG_HAS_CPUFREQ)
case XEN_SYSCTL_get_pmstat:
ret = do_get_pm_info(&op->u.get_pmstat);
break;
@@ -5,7 +5,7 @@ subdir-$(x86) += apei
obj-bin-y += tables.init.o
obj-$(HAS_NUMA) += numa.o
obj-y += osl.o
-obj-y += pmstat.o
+obj-$(CONFIG_HAS_CPUFREQ) += pmstat.o
obj-$(x86) += hwregs.o
obj-$(x86) += reboot.o