summaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/mshyperv.h
diff options
context:
space:
mode:
authorVitaly Kuznetsov <vkuznets@redhat.com>2017-03-03 14:21:40 +0100
committerThomas Gleixner <tglx@linutronix.de>2017-03-11 14:47:28 +0100
commitbd2a9adaadb8defcaf6c284bca7ff41634105f51 (patch)
treeabc0e4ce725a66e7c451b149636e89d14f16c2b0 /arch/x86/include/asm/mshyperv.h
parent434fd6353b4c83938029ca6ea7dfa4fc82d602bd (diff)
downloadlinux-stable-bd2a9adaadb8defcaf6c284bca7ff41634105f51.tar.gz
linux-stable-bd2a9adaadb8defcaf6c284bca7ff41634105f51.tar.bz2
linux-stable-bd2a9adaadb8defcaf6c284bca7ff41634105f51.zip
x86/hyperv: Implement hv_get_tsc_page()
To use Hyper-V TSC page clocksource from vDSO we need to make tsc_pg available. Implement hv_get_tsc_page() and add CONFIG_HYPERV_TSCPAGE to make #ifdef-s simple. Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com> Cc: Stephen Hemminger <sthemmin@microsoft.com> Cc: Haiyang Zhang <haiyangz@microsoft.com> Cc: Dexuan Cui <decui@microsoft.com> Cc: Andy Lutomirski <luto@amacapital.net> Cc: devel@linuxdriverproject.org Cc: "K. Y. Srinivasan" <kys@microsoft.com> Cc: virtualization@lists.linux-foundation.org Link: http://lkml.kernel.org/r/20170303132142.25595-2-vkuznets@redhat.com Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86/include/asm/mshyperv.h')
-rw-r--r--arch/x86/include/asm/mshyperv.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/x86/include/asm/mshyperv.h b/arch/x86/include/asm/mshyperv.h
index 7c9c895432a9..d324dce133a1 100644
--- a/arch/x86/include/asm/mshyperv.h
+++ b/arch/x86/include/asm/mshyperv.h
@@ -176,4 +176,12 @@ void hyperv_report_panic(struct pt_regs *regs);
bool hv_is_hypercall_page_setup(void);
void hyperv_cleanup(void);
#endif
+#ifdef CONFIG_HYPERV_TSCPAGE
+struct ms_hyperv_tsc_page *hv_get_tsc_page(void);
+#else
+static inline struct ms_hyperv_tsc_page *hv_get_tsc_page(void)
+{
+ return NULL;
+}
+#endif
#endif