diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-31 18:52:46 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-31 18:52:46 -0500 |
commit | e81cfd214f97a26ca2b00564258ebcf099214cbb (patch) | |
tree | a59043fc9aeb41564f36533e7dc0b507f6261a37 | |
parent | 4b8d8ab566932bfe023637025c76c0e90c655faf (diff) | |
parent | 7fc49f19813030f2e15ad2ccec5cb701f7f4a3ec (diff) |
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 setup: fix asm constraints in vesa_store_edid
xen: make sysfs files behave as their names suggest
x86: tone down mtrr_trim_uncached_memory() warning
x86: correct the CPUID pattern for MSR_IA32_MISC_ENABLE availability
-rw-r--r-- | arch/x86/boot/video-vesa.c | 11 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/intel.c | 2 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/mtrr/main.c | 3 | ||||
-rw-r--r-- | drivers/xen/balloon.c | 33 |
4 files changed, 39 insertions, 10 deletions
diff --git a/arch/x86/boot/video-vesa.c b/arch/x86/boot/video-vesa.c index 75115849af33..4a58c8ce3f69 100644 --- a/arch/x86/boot/video-vesa.c +++ b/arch/x86/boot/video-vesa.c | |||
@@ -269,9 +269,8 @@ void vesa_store_edid(void) | |||
269 | we genuinely have to assume all registers are destroyed here. */ | 269 | we genuinely have to assume all registers are destroyed here. */ |
270 | 270 | ||
271 | asm("pushw %%es; movw %2,%%es; "INT10"; popw %%es" | 271 | asm("pushw %%es; movw %2,%%es; "INT10"; popw %%es" |
272 | : "+a" (ax), "+b" (bx) | 272 | : "+a" (ax), "+b" (bx), "+c" (cx), "+D" (di) |
273 | : "c" (cx), "D" (di) | 273 | : : "esi", "edx"); |
274 | : "esi"); | ||
275 | 274 | ||
276 | if (ax != 0x004f) | 275 | if (ax != 0x004f) |
277 | return; /* No EDID */ | 276 | return; /* No EDID */ |
@@ -285,9 +284,9 @@ void vesa_store_edid(void) | |||
285 | dx = 0; /* EDID block number */ | 284 | dx = 0; /* EDID block number */ |
286 | di =(size_t) &boot_params.edid_info; /* (ES:)Pointer to block */ | 285 | di =(size_t) &boot_params.edid_info; /* (ES:)Pointer to block */ |
287 | asm(INT10 | 286 | asm(INT10 |
288 | : "+a" (ax), "+b" (bx), "+d" (dx), "=m" (boot_params.edid_info) | 287 | : "+a" (ax), "+b" (bx), "+d" (dx), "=m" (boot_params.edid_info), |
289 | : "c" (cx), "D" (di) | 288 | "+c" (cx), "+D" (di) |
290 | : "esi"); | 289 | : : "esi"); |
291 | #endif /* CONFIG_FIRMWARE_EDID */ | 290 | #endif /* CONFIG_FIRMWARE_EDID */ |
292 | } | 291 | } |
293 | 292 | ||
diff --git a/arch/x86/kernel/cpu/intel.c b/arch/x86/kernel/cpu/intel.c index 549f2ada55f5..430e5c38a544 100644 --- a/arch/x86/kernel/cpu/intel.c +++ b/arch/x86/kernel/cpu/intel.c | |||
@@ -30,7 +30,7 @@ | |||
30 | static void __cpuinit early_init_intel(struct cpuinfo_x86 *c) | 30 | static void __cpuinit early_init_intel(struct cpuinfo_x86 *c) |
31 | { | 31 | { |
32 | /* Unmask CPUID levels if masked: */ | 32 | /* Unmask CPUID levels if masked: */ |
33 | if (c->x86 == 6 && c->x86_model >= 15) { | 33 | if (c->x86 > 6 || (c->x86 == 6 && c->x86_model >= 0xd)) { |
34 | u64 misc_enable; | 34 | u64 misc_enable; |
35 | 35 | ||
36 | rdmsrl(MSR_IA32_MISC_ENABLE, misc_enable); | 36 | rdmsrl(MSR_IA32_MISC_ENABLE, misc_enable); |
diff --git a/arch/x86/kernel/cpu/mtrr/main.c b/arch/x86/kernel/cpu/mtrr/main.c index d259e5d2e054..236a401b8259 100644 --- a/arch/x86/kernel/cpu/mtrr/main.c +++ b/arch/x86/kernel/cpu/mtrr/main.c | |||
@@ -1594,8 +1594,7 @@ int __init mtrr_trim_uncached_memory(unsigned long end_pfn) | |||
1594 | 1594 | ||
1595 | /* kvm/qemu doesn't have mtrr set right, don't trim them all */ | 1595 | /* kvm/qemu doesn't have mtrr set right, don't trim them all */ |
1596 | if (!highest_pfn) { | 1596 | if (!highest_pfn) { |
1597 | WARN(!kvm_para_available(), KERN_WARNING | 1597 | printk(KERN_INFO "CPU MTRRs all blank - virtualized system.\n"); |
1598 | "WARNING: strange, CPU MTRRs all blank?\n"); | ||
1599 | return 0; | 1598 | return 0; |
1600 | } | 1599 | } |
1601 | 1600 | ||
diff --git a/drivers/xen/balloon.c b/drivers/xen/balloon.c index 2ba8f95516a0..efa4b363ce72 100644 --- a/drivers/xen/balloon.c +++ b/drivers/xen/balloon.c | |||
@@ -498,7 +498,7 @@ static ssize_t store_target_kb(struct sys_device *dev, | |||
498 | if (!capable(CAP_SYS_ADMIN)) | 498 | if (!capable(CAP_SYS_ADMIN)) |
499 | return -EPERM; | 499 | return -EPERM; |
500 | 500 | ||
501 | target_bytes = memparse(buf, &endchar); | 501 | target_bytes = simple_strtoull(buf, &endchar, 0) * 1024; |
502 | 502 | ||
503 | balloon_set_new_target(target_bytes >> PAGE_SHIFT); | 503 | balloon_set_new_target(target_bytes >> PAGE_SHIFT); |
504 | 504 | ||
@@ -508,8 +508,39 @@ static ssize_t store_target_kb(struct sys_device *dev, | |||
508 | static SYSDEV_ATTR(target_kb, S_IRUGO | S_IWUSR, | 508 | static SYSDEV_ATTR(target_kb, S_IRUGO | S_IWUSR, |
509 | show_target_kb, store_target_kb); | 509 | show_target_kb, store_target_kb); |
510 | 510 | ||
511 | |||
512 | static ssize_t show_target(struct sys_device *dev, struct sysdev_attribute *attr, | ||
513 | char *buf) | ||
514 | { | ||
515 | return sprintf(buf, "%llu\n", | ||
516 | (u64)balloon_stats.target_pages << PAGE_SHIFT); | ||
517 | } | ||
518 | |||
519 | static ssize_t store_target(struct sys_device *dev, | ||
520 | struct sysdev_attribute *attr, | ||
521 | const char *buf, | ||
522 | size_t count) | ||
523 | { | ||
524 | char *endchar; | ||
525 | unsigned long long target_bytes; | ||
526 | |||
527 | if (!capable(CAP_SYS_ADMIN)) | ||
528 | return -EPERM; | ||
529 | |||
530 | target_bytes = memparse(buf, &endchar); | ||
531 | |||
532 | balloon_set_new_target(target_bytes >> PAGE_SHIFT); | ||
533 | |||
534 | return count; | ||
535 | } | ||
536 | |||
537 | static SYSDEV_ATTR(target, S_IRUGO | S_IWUSR, | ||
538 | show_target, store_target); | ||
539 | |||
540 | |||
511 | static struct sysdev_attribute *balloon_attrs[] = { | 541 | static struct sysdev_attribute *balloon_attrs[] = { |
512 | &attr_target_kb, | 542 | &attr_target_kb, |
543 | &attr_target, | ||
513 | }; | 544 | }; |
514 | 545 | ||
515 | static struct attribute *balloon_info_attrs[] = { | 546 | static struct attribute *balloon_info_attrs[] = { |