linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] x86/Hyper-V: Fix reference of pv_ops with CONFIG_PARAVIRT=N
@ 2019-08-28  8:07 lantianyu1986
  2019-08-28 10:30 ` [tip: timers/core] x86/hyperv: Hide pv_ops access for CONFIG_PARAVIRT=n tip-bot2 for Tianyu Lan
  2019-09-02 14:27 ` [PATCH] x86/Hyper-V: Fix reference of pv_ops with CONFIG_PARAVIRT=N Wei Liu
  0 siblings, 2 replies; 3+ 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 related	[flat|nested] 3+ messages in thread

* [tip: timers/core] x86/hyperv: Hide pv_ops access for CONFIG_PARAVIRT=n
  2019-08-28  8:07 [PATCH] x86/Hyper-V: Fix reference of pv_ops with CONFIG_PARAVIRT=N lantianyu1986
@ 2019-08-28 10:30 ` tip-bot2 for Tianyu Lan
  2019-09-02 14:27 ` [PATCH] x86/Hyper-V: Fix reference of pv_ops with CONFIG_PARAVIRT=N Wei Liu
  1 sibling, 0 replies; 3+ messages in thread
From: tip-bot2 for Tianyu Lan @ 2019-08-28 10:30 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: Tianyu Lan, Thomas Gleixner, Ingo Molnar, Borislav Petkov, linux-kernel

The following commit has been merged into the timers/core branch of tip:

Commit-ID:     41cfe2a2a7f4fad5647031ad3a1da166452b5437
Gitweb:        https://git.kernel.org/tip/41cfe2a2a7f4fad5647031ad3a1da166452b5437
Author:        Tianyu Lan <Tianyu.Lan@microsoft.com>
AuthorDate:    Wed, 28 Aug 2019 16:07:47 +08:00
Committer:     Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Wed, 28 Aug 2019 12:25:06 +02:00

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: 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 | 2 ++
 1 file changed, 2 insertions(+)

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

^ permalink raw reply related	[flat|nested] 3+ 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-08-28 10:30 ` [tip: timers/core] x86/hyperv: Hide pv_ops access for CONFIG_PARAVIRT=n tip-bot2 for Tianyu Lan
@ 2019-09-02 14:27 ` Wei Liu
  1 sibling, 0 replies; 3+ 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] 3+ messages in thread

end of thread, other threads:[~2019-09-02 14:27 UTC | newest]

Thread overview: 3+ 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-08-28 10:30 ` [tip: timers/core] x86/hyperv: Hide pv_ops access for CONFIG_PARAVIRT=n tip-bot2 for Tianyu Lan
2019-09-02 14:27 ` [PATCH] x86/Hyper-V: Fix reference of pv_ops with CONFIG_PARAVIRT=N Wei Liu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).