projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
60bda03
)
x86/hyperv: Hide pv_ops access for CONFIG_PARAVIRT=n
author
Tianyu Lan
<Tianyu.Lan@microsoft.com>
Wed, 28 Aug 2019 08:07:47 +0000
(16:07 +0800)
committer
Thomas Gleixner
<tglx@linutronix.de>
Wed, 28 Aug 2019 10:25:06 +0000
(12:25 +0200)
hv_setup_sched_clock() references pv_ops which is only available when
CONFIG_PARAVIRT=Y.
Wrap it into a #ifdef
Signed-off-by: Tianyu Lan <Tianyu.Lan@microsoft.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link:
https://lkml.kernel.org/r/20190828080747.204419-1-Tianyu.Lan@microsoft.com
arch/x86/kernel/cpu/mshyperv.c
patch
|
blob
|
history
diff --git
a/arch/x86/kernel/cpu/mshyperv.c
b/arch/x86/kernel/cpu/mshyperv.c
index 53afd33990eb895cb2e4f0d49ad7ea022b18f6bc..267daad8c0360890672e7db5369fde36fb58174e 100644
(file)
--- a/
arch/x86/kernel/cpu/mshyperv.c
+++ b/
arch/x86/kernel/cpu/mshyperv.c
@@
-346,7
+346,9
@@
static void __init ms_hyperv_init_platform(void)
void hv_setup_sched_clock(void *sched_clock)
{
+#ifdef CONFIG_PARAVIRT
pv_ops.time.sched_clock = sched_clock;
+#endif
}
const __initconst struct hypervisor_x86 x86_hyper_ms_hyperv = {