Skip to content

Commit

Permalink
x86/hyperv: Hide pv_ops access for CONFIG_PARAVIRT=n
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Tianyu Lan authored and Thomas Gleixner committed Aug 28, 2019
1 parent 60bda03 commit 41cfe2a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions arch/x86/kernel/cpu/mshyperv.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down

0 comments on commit 41cfe2a

Please sign in to comment.