Commit 41cfe2a2 authored by Tianyu Lan's avatar Tianyu Lan Committed by Thomas Gleixner
Browse files

x86/hyperv: Hide pv_ops access for CONFIG_PARAVIRT=n



hv_setup_sched_clock() references pv_ops which is only available when
CONFIG_PARAVIRT=Y.

Wrap it into a #ifdef

Signed-off-by: default avatarTianyu Lan <Tianyu.Lan@microsoft.com>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/20190828080747.204419-1-Tianyu.Lan@microsoft.com
parent 60bda037
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -346,7 +346,9 @@ static void __init ms_hyperv_init_platform(void)


void hv_setup_sched_clock(void *sched_clock)
void hv_setup_sched_clock(void *sched_clock)
{
{
#ifdef CONFIG_PARAVIRT
	pv_ops.time.sched_clock = sched_clock;
	pv_ops.time.sched_clock = sched_clock;
#endif
}
}


const __initconst struct hypervisor_x86 x86_hyper_ms_hyperv = {
const __initconst struct hypervisor_x86 x86_hyper_ms_hyperv = {