summaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/cpu
diff options
context:
space:
mode:
authorLinus Torvalds2009-09-21 18:05:19 +0200
committerLinus Torvalds2009-09-21 18:05:19 +0200
commitb3727c24da69971503a4ca98b3b877753c6a4393 (patch)
treec57015b202fec5a388010c3899ac6f99ed942996 /arch/x86/kernel/cpu
parentMerge branch 'writeback' of git://git.kernel.dk/linux-2.6-block (diff)
parentx86: Print the hypervisor returned tsc_khz during boot (diff)
downloadkernel-qcow2-linux-b3727c24da69971503a4ca98b3b877753c6a4393.tar.gz
kernel-qcow2-linux-b3727c24da69971503a4ca98b3b877753c6a4393.tar.xz
kernel-qcow2-linux-b3727c24da69971503a4ca98b3b877753c6a4393.zip
Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: x86: Print the hypervisor returned tsc_khz during boot x86: Correct segment permission flags in 64-bit linker script x86: cpuinit-annotate SMP boot trampolines properly x86: Increase timeout for EHCI debug port reset completion in early printk x86: Fix uaccess_32.h typo x86: Trivial whitespace cleanups x86, apic: Fix missed handling of discrete apics x86/i386: Remove duplicated #include x86, mtrr: Convert loop to a while based construct, avoid naked semicolon Revert 'x86: Fix system crash when loading with "reservetop" parameter' x86, mce: Fix compile warning in case of CONFIG_SMP=n x86, apic: Use logical flat on intel with <= 8 logical cpus x86: SGI UV: Map MMIO-High memory range x86: SGI UV: Add volatile semantics to macros that access chipset registers x86: SGI UV: Fix IPI macros x86: apic: Convert BUG() to BUG_ON() x86: Remove final bits of CONFIG_X86_OLD_MCE
Diffstat (limited to 'arch/x86/kernel/cpu')
-rw-r--r--arch/x86/kernel/cpu/mcheck/mce_amd.c3
-rw-r--r--arch/x86/kernel/cpu/mtrr/if.c12
-rw-r--r--arch/x86/kernel/cpu/vmware.c6
3 files changed, 14 insertions, 7 deletions
diff --git a/arch/x86/kernel/cpu/mcheck/mce_amd.c b/arch/x86/kernel/cpu/mcheck/mce_amd.c
index 8cd5224943b5..83a3d1f4efca 100644
--- a/arch/x86/kernel/cpu/mcheck/mce_amd.c
+++ b/arch/x86/kernel/cpu/mcheck/mce_amd.c
@@ -489,8 +489,9 @@ static __cpuinit int threshold_create_bank(unsigned int cpu, unsigned int bank)
int i, err = 0;
struct threshold_bank *b = NULL;
char name[32];
+#ifdef CONFIG_SMP
struct cpuinfo_x86 *c = &cpu_data(cpu);
-
+#endif
sprintf(name, "threshold_bank%i", bank);
diff --git a/arch/x86/kernel/cpu/mtrr/if.c b/arch/x86/kernel/cpu/mtrr/if.c
index 08b6ea4c62b4..f04e72527604 100644
--- a/arch/x86/kernel/cpu/mtrr/if.c
+++ b/arch/x86/kernel/cpu/mtrr/if.c
@@ -126,8 +126,8 @@ mtrr_write(struct file *file, const char __user *buf, size_t len, loff_t * ppos)
return -EINVAL;
base = simple_strtoull(line + 5, &ptr, 0);
- for (; isspace(*ptr); ++ptr)
- ;
+ while (isspace(*ptr))
+ ptr++;
if (strncmp(ptr, "size=", 5))
return -EINVAL;
@@ -135,14 +135,14 @@ mtrr_write(struct file *file, const char __user *buf, size_t len, loff_t * ppos)
size = simple_strtoull(ptr + 5, &ptr, 0);
if ((base & 0xfff) || (size & 0xfff))
return -EINVAL;
- for (; isspace(*ptr); ++ptr)
- ;
+ while (isspace(*ptr))
+ ptr++;
if (strncmp(ptr, "type=", 5))
return -EINVAL;
ptr += 5;
- for (; isspace(*ptr); ++ptr)
- ;
+ while (isspace(*ptr))
+ ptr++;
for (i = 0; i < MTRR_NUM_TYPES; ++i) {
if (strcmp(ptr, mtrr_strings[i]))
diff --git a/arch/x86/kernel/cpu/vmware.c b/arch/x86/kernel/cpu/vmware.c
index 0a46b4df5d80..1cbed97b59cf 100644
--- a/arch/x86/kernel/cpu/vmware.c
+++ b/arch/x86/kernel/cpu/vmware.c
@@ -58,6 +58,9 @@ static unsigned long vmware_get_tsc_khz(void)
tsc_hz = eax | (((uint64_t)ebx) << 32);
do_div(tsc_hz, 1000);
BUG_ON(tsc_hz >> 32);
+ printk(KERN_INFO "TSC freq read from hypervisor : %lu.%03lu MHz\n",
+ (unsigned long) tsc_hz / 1000,
+ (unsigned long) tsc_hz % 1000);
return tsc_hz;
}
@@ -69,6 +72,9 @@ void __init vmware_platform_setup(void)
if (ebx != UINT_MAX)
x86_platform.calibrate_tsc = vmware_get_tsc_khz;
+ else
+ printk(KERN_WARNING
+ "Failed to get TSC freq from the hypervisor\n");
}
/*