* [PATCH 1/1] X86: hypev: Correctly guard the local APIC calibration code.
@ 2013-10-10 22:30 K. Y. Srinivasan
2013-10-10 22:24 ` [tip:x86/hyperv] x86, hyperv: " tip-bot for K. Y. Srinivasan
2013-11-06 18:06 ` [tip:x86/hyperv] x86, hyperv: Move a variable to avoid an unused variable warning tip-bot for H. Peter Anvin
0 siblings, 2 replies; 3+ messages in thread
From: K. Y. Srinivasan @ 2013-10-10 22:30 UTC (permalink / raw)
To: hpa, linux-kernel, mingo, tglx, olaf, x86; +Cc: K. Y. Srinivasan
Correctly guard the code that gets the local APIC timer frequency from the
hypervisor.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
---
arch/x86/kernel/cpu/mshyperv.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/arch/x86/kernel/cpu/mshyperv.c b/arch/x86/kernel/cpu/mshyperv.c
index 0a490ca..628ff50 100644
--- a/arch/x86/kernel/cpu/mshyperv.c
+++ b/arch/x86/kernel/cpu/mshyperv.c
@@ -80,6 +80,7 @@ static void __init ms_hyperv_init_platform(void)
printk(KERN_INFO "HyperV: features 0x%x, hints 0x%x\n",
ms_hyperv.features, ms_hyperv.hints);
+#ifdef CONFIG_X86_LOCAL_APIC
if (ms_hyperv.features & HV_X64_MSR_APIC_FREQUENCY_AVAILABLE) {
/*
* Get the APIC frequency.
@@ -99,6 +100,7 @@ static void __init ms_hyperv_init_platform(void)
legacy_pic = &null_legacy_pic;
}
}
+#endif
if (ms_hyperv.features & HV_X64_MSR_TIME_REF_COUNT_AVAILABLE)
clocksource_register_hz(&hyperv_cs, NSEC_PER_SEC/100);
--
1.7.4.1
^ permalink raw reply [flat|nested] 3+ messages in thread* [tip:x86/hyperv] x86, hyperv: Correctly guard the local APIC calibration code
2013-10-10 22:30 [PATCH 1/1] X86: hypev: Correctly guard the local APIC calibration code K. Y. Srinivasan
@ 2013-10-10 22:24 ` tip-bot for K. Y. Srinivasan
2013-11-06 18:06 ` [tip:x86/hyperv] x86, hyperv: Move a variable to avoid an unused variable warning tip-bot for H. Peter Anvin
1 sibling, 0 replies; 3+ messages in thread
From: tip-bot for K. Y. Srinivasan @ 2013-10-10 22:24 UTC (permalink / raw)
To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, kys, tglx, hpa
Commit-ID: 90ab9d5510932e146a9443bf5a591f95d5b5ada8
Gitweb: http://git.kernel.org/tip/90ab9d5510932e146a9443bf5a591f95d5b5ada8
Author: K. Y. Srinivasan <kys@microsoft.com>
AuthorDate: Thu, 10 Oct 2013 15:30:24 -0700
Committer: H. Peter Anvin <hpa@linux.intel.com>
CommitDate: Thu, 10 Oct 2013 15:21:38 -0700
x86, hyperv: Correctly guard the local APIC calibration code
The code that gets the local APIC timer frequency from the hypervisor
rather depends on there being a local APIC.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Link: http://lkml.kernel.org/r/1381444224-3303-1-git-send-email-kys@microsoft.com
Signed-off-by: H. Peter Anvin <hpa@linux.intel.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 0a490ca..628ff50 100644
--- a/arch/x86/kernel/cpu/mshyperv.c
+++ b/arch/x86/kernel/cpu/mshyperv.c
@@ -80,6 +80,7 @@ static void __init ms_hyperv_init_platform(void)
printk(KERN_INFO "HyperV: features 0x%x, hints 0x%x\n",
ms_hyperv.features, ms_hyperv.hints);
+#ifdef CONFIG_X86_LOCAL_APIC
if (ms_hyperv.features & HV_X64_MSR_APIC_FREQUENCY_AVAILABLE) {
/*
* Get the APIC frequency.
@@ -99,6 +100,7 @@ static void __init ms_hyperv_init_platform(void)
legacy_pic = &null_legacy_pic;
}
}
+#endif
if (ms_hyperv.features & HV_X64_MSR_TIME_REF_COUNT_AVAILABLE)
clocksource_register_hz(&hyperv_cs, NSEC_PER_SEC/100);
^ permalink raw reply [flat|nested] 3+ messages in thread* [tip:x86/hyperv] x86, hyperv: Move a variable to avoid an unused variable warning
2013-10-10 22:30 [PATCH 1/1] X86: hypev: Correctly guard the local APIC calibration code K. Y. Srinivasan
2013-10-10 22:24 ` [tip:x86/hyperv] x86, hyperv: " tip-bot for K. Y. Srinivasan
@ 2013-11-06 18:06 ` tip-bot for H. Peter Anvin
1 sibling, 0 replies; 3+ messages in thread
From: tip-bot for H. Peter Anvin @ 2013-11-06 18:06 UTC (permalink / raw)
To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, kys, tglx, hpa
Commit-ID: 4c08edd305019061bf1ac95ce089497bdbb8b8ac
Gitweb: http://git.kernel.org/tip/4c08edd305019061bf1ac95ce089497bdbb8b8ac
Author: H. Peter Anvin <hpa@zytor.com>
AuthorDate: Wed, 6 Nov 2013 10:00:05 -0800
Committer: H. Peter Anvin <hpa@zytor.com>
CommitDate: Wed, 6 Nov 2013 10:02:05 -0800
x86, hyperv: Move a variable to avoid an unused variable warning
The variable hv_lapic_frequency causes an unused variable warning if
CONFIG_X86_LOCAL_APIC is disabled. Since the variable is only used
inside a small if statement, move the declaration of that variable
into the if statement itself.
Cc: K. Y. Srinivasan <kys@microsoft.com>
Link: http://lkml.kernel.org/r/1381444224-3303-1-git-send-email-kys@microsoft.com
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
---
arch/x86/kernel/cpu/mshyperv.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kernel/cpu/mshyperv.c b/arch/x86/kernel/cpu/mshyperv.c
index 9f6e9f8..9f7ca26 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;
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-11-06 18:06 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-10 22:30 [PATCH 1/1] X86: hypev: Correctly guard the local APIC calibration code K. Y. Srinivasan
2013-10-10 22:24 ` [tip:x86/hyperv] x86, hyperv: " tip-bot for K. Y. Srinivasan
2013-11-06 18:06 ` [tip:x86/hyperv] x86, hyperv: Move a variable to avoid an unused variable warning tip-bot for H. Peter Anvin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome