aboutsummaryrefslogtreecommitdiffstats
path: root/xen/include/asm-x86/cpuidle.h
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2012-09-21 13:47:18 +0200
committerJan Beulich <jbeulich@suse.com>2012-09-21 13:47:18 +0200
commit724b55f48a6c9fca00ddeeca5a130657680caf0b (patch)
treea526488f0b9c8cd95d8e4f9aee6d26d3c5de2fa0 /xen/include/asm-x86/cpuidle.h
parent288078b499281a2ef1bca5244c3fb1786f7efcc7 (diff)
downloadxen-724b55f48a6c9fca00ddeeca5a130657680caf0b.tar.gz
xen-724b55f48a6c9fca00ddeeca5a130657680caf0b.tar.bz2
xen-724b55f48a6c9fca00ddeeca5a130657680caf0b.zip
x86: introduce MWAIT-based, ACPI-less CPU idle driver
This is a port of Linux'es intel-idle driver serving the same purpose. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
Diffstat (limited to 'xen/include/asm-x86/cpuidle.h')
-rw-r--r--xen/include/asm-x86/cpuidle.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/xen/include/asm-x86/cpuidle.h b/xen/include/asm-x86/cpuidle.h
new file mode 100644
index 0000000000..73edf90efd
--- /dev/null
+++ b/xen/include/asm-x86/cpuidle.h
@@ -0,0 +1,35 @@
+#ifndef __ASM_X86_CPUIDLE_H__
+#define __ASM_X86_CPUIDLE_H__
+
+#include <xen/cpuidle.h>
+#include <xen/notifier.h>
+#include <xen/sched.h>
+#include <xen/sched-if.h>
+
+extern struct acpi_processor_power *processor_powers[];
+
+extern void (*pm_idle_save)(void);
+
+extern void (*lapic_timer_off)(void);
+extern void (*lapic_timer_on)(void);
+
+extern uint64_t (*cpuidle_get_tick)(void);
+
+int mwait_idle_init(struct notifier_block *);
+int cpuidle_init_cpu(unsigned int cpu);
+void acpi_dead_idle(void);
+void trace_exit_reason(u32 *irq_traced);
+void update_idle_stats(struct acpi_processor_power *,
+ struct acpi_processor_cx *, uint64_t, uint64_t);
+
+/*
+ * vcpu is urgent if vcpu is polling event channel
+ *
+ * if urgent vcpu exists, CPU should not enter deep C state
+ */
+static inline int sched_has_urgent_vcpu(void)
+{
+ return atomic_read(&this_cpu(schedule_data).urgent_count);
+}
+
+#endif /* __X86_ASM_CPUIDLE_H__ */