summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/kernel/cpu/mshyperv.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/kernel/cpu/mshyperv.c b/arch/x86/kernel/cpu/mshyperv.c
index 9f6e9f89d9d..9f7ca266864 100644
--- a/arch/x86/kernel/cpu/mshyperv.c
+++ b/arch/x86/kernel/cpu/mshyperv.c
@@ -70,8 +70,6 @@ static struct clocksource hyperv_cs = {
static void __init ms_hyperv_init_platform(void)
{
- u64 hv_lapic_frequency;
-
/*
* Extract the features and hints
*/
@@ -86,6 +84,8 @@ static void __init ms_hyperv_init_platform(void)
/*
* Get the APIC frequency.
*/
+ u64 hv_lapic_frequency;
+
rdmsrl(HV_X64_MSR_APIC_FREQUENCY, hv_lapic_frequency);
hv_lapic_frequency = div_u64(hv_lapic_frequency, HZ);
lapic_timer_frequency = hv_lapic_frequency;