Linux-HyperV Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] x86/Hyper-V: Fix reference of pv_ops with CONFIG_PARAVIRT=N
@ 2019-08-28  8:07 lantianyu1986
  2019-09-02 14:27 ` Wei Liu
  0 siblings, 1 reply; 2+ messages in thread
From: lantianyu1986 @ 2019-08-28  8:07 UTC (permalink / raw)
  To: kys, haiyangz, sthemmin, sashal, tglx, mingo, bp, hpa, x86,
	michael.h.kelley
  Cc: Tianyu Lan, linux-hyperv, linux-kernel

From: Tianyu Lan <Tianyu.Lan@microsoft.com>

hv_setup_sched_clock() references pv_ops and this should
be under CONFIG_PARAVIRT=Y. Fix it.

Signed-off-by: Tianyu Lan <Tianyu.Lan@microsoft.com>
---
This patch is based on git://git.kernel.org/pub/scm/linux/
kernel/git/tip/tip.git timers/core.

 arch/x86/kernel/cpu/mshyperv.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/x86/kernel/cpu/mshyperv.c b/arch/x86/kernel/cpu/mshyperv.c
index 53afd33990eb..267daad8c036 100644
--- 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 = {
-- 
2.14.5


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] x86/Hyper-V: Fix reference of pv_ops with CONFIG_PARAVIRT=N
  2019-08-28  8:07 [PATCH] x86/Hyper-V: Fix reference of pv_ops with CONFIG_PARAVIRT=N lantianyu1986
@ 2019-09-02 14:27 ` Wei Liu
  0 siblings, 0 replies; 2+ messages in thread
From: Wei Liu @ 2019-09-02 14:27 UTC (permalink / raw)
  To: lantianyu1986
  Cc: kys, haiyangz, sthemmin, sashal, tglx, mingo, bp, hpa, x86,
	michael.h.kelley, Tianyu Lan, linux-hyperv, linux-kernel,
	Wei Liu

On Wed, Aug 28, 2019 at 04:07:47PM +0800, lantianyu1986@gmail.com wrote:
> From: Tianyu Lan <Tianyu.Lan@microsoft.com>
> 
> hv_setup_sched_clock() references pv_ops and this should
> be under CONFIG_PARAVIRT=Y. Fix it.
> 
> Signed-off-by: Tianyu Lan <Tianyu.Lan@microsoft.com>

Reviewed-by: Wei Liu <wei.liu@kernel.org>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-28  8:07 [PATCH] x86/Hyper-V: Fix reference of pv_ops with CONFIG_PARAVIRT=N lantianyu1986
2019-09-02 14:27 ` Wei Liu

Linux-HyperV Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-hyperv/0 linux-hyperv/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-hyperv linux-hyperv/ https://lore.kernel.org/linux-hyperv \
		linux-hyperv@vger.kernel.org linux-hyperv@archiver.kernel.org
	public-inbox-index linux-hyperv


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-hyperv


AGPL code for this site: git clone https://public-inbox.org/ public-inbox