From: lantianyu1986@gmail.com
To: kys@microsoft.com, haiyangz@microsoft.com,
sthemmin@microsoft.com, sashal@kernel.org, tglx@linutronix.de,
mingo@redhat.com, bp@alien8.de, hpa@zytor.com, x86@kernel.org,
michael.h.kelley@microsoft.com
Cc: Tianyu Lan <Tianyu.Lan@microsoft.com>,
linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] x86/Hyper-V: Fix reference of pv_ops with CONFIG_PARAVIRT=N
Date: Wed, 28 Aug 2019 16:07:47 +0800 [thread overview]
Message-ID: <20190828080747.204419-1-Tianyu.Lan@microsoft.com> (raw)
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
next reply other threads:[~2019-08-28 8:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-28 8:07 lantianyu1986 [this message]
2019-09-02 14:27 ` [PATCH] x86/Hyper-V: Fix reference of pv_ops with CONFIG_PARAVIRT=N Wei Liu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190828080747.204419-1-Tianyu.Lan@microsoft.com \
--to=lantianyu1986@gmail.com \
--cc=Tianyu.Lan@microsoft.com \
--cc=bp@alien8.de \
--cc=haiyangz@microsoft.com \
--cc=hpa@zytor.com \
--cc=kys@microsoft.com \
--cc=linux-hyperv@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michael.h.kelley@microsoft.com \
--cc=mingo@redhat.com \
--cc=sashal@kernel.org \
--cc=sthemmin@microsoft.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox