summaryrefslogtreecommitdiffstats
path: root/include/linux/cpuidle_haltpoll.h
diff options
context:
space:
mode:
authorMarcelo Tosatti <mtosatti@redhat.com>2019-07-03 20:51:29 -0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2019-07-30 17:27:37 +0200
commita1c4423b02b2121108e3ea9580741e0f26309a48 (patch)
treec2b6c2842065c7ed359f997580078ca00ad02fe3 /include/linux/cpuidle_haltpoll.h
parent2cffe9f6b96fece065ee8522673c90e92ef2085d (diff)
downloadlinux-a1c4423b02b2121108e3ea9580741e0f26309a48.tar.gz
linux-a1c4423b02b2121108e3ea9580741e0f26309a48.tar.bz2
linux-a1c4423b02b2121108e3ea9580741e0f26309a48.zip
cpuidle-haltpoll: disable host side polling when kvm virtualized
When performing guest side polling, it is not necessary to also perform host side polling. So disable host side polling, via the new MSR interface, when loading cpuidle-haltpoll driver. Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'include/linux/cpuidle_haltpoll.h')
-rw-r--r--include/linux/cpuidle_haltpoll.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/linux/cpuidle_haltpoll.h b/include/linux/cpuidle_haltpoll.h
new file mode 100644
index 000000000000..fe5954c2409e
--- /dev/null
+++ b/include/linux/cpuidle_haltpoll.h
@@ -0,0 +1,16 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef _CPUIDLE_HALTPOLL_H
+#define _CPUIDLE_HALTPOLL_H
+
+#ifdef CONFIG_ARCH_CPUIDLE_HALTPOLL
+#include <asm/cpuidle_haltpoll.h>
+#else
+static inline void arch_haltpoll_enable(void)
+{
+}
+
+static inline void arch_haltpoll_disable(void)
+{
+}
+#endif
+#endif