diff options
| -rw-r--r-- | arch/x86/kernel/cpu/common.c | 24 | ||||
| -rw-r--r-- | arch/x86/kernel/kdebugfs.c | 1 | ||||
| -rw-r--r-- | arch/x86/kernel/setup.c | 5 | ||||
| -rw-r--r-- | arch/x86/mm/init_32.c | 4 | ||||
| -rw-r--r-- | arch/x86/xen/setup.c | 2 |
5 files changed, 10 insertions, 26 deletions
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c index 8aab8517642e..4e456bd955bb 100644 --- a/arch/x86/kernel/cpu/common.c +++ b/arch/x86/kernel/cpu/common.c | |||
| @@ -344,31 +344,15 @@ static void __init early_cpu_detect(void) | |||
| 344 | 344 | ||
| 345 | /* | 345 | /* |
| 346 | * The NOPL instruction is supposed to exist on all CPUs with | 346 | * The NOPL instruction is supposed to exist on all CPUs with |
| 347 | * family >= 6, unfortunately, that's not true in practice because | 347 | * family >= 6; unfortunately, that's not true in practice because |
| 348 | * of early VIA chips and (more importantly) broken virtualizers that | 348 | * of early VIA chips and (more importantly) broken virtualizers that |
| 349 | * are not easy to detect. Hence, probe for it based on first | 349 | * are not easy to detect. In the latter case it doesn't even *fail* |
| 350 | * principles. | 350 | * reliably, so probing for it doesn't even work. Disable it completely |
| 351 | * unless we can find a reliable way to detect all the broken cases. | ||
| 351 | */ | 352 | */ |
| 352 | static void __cpuinit detect_nopl(struct cpuinfo_x86 *c) | 353 | static void __cpuinit detect_nopl(struct cpuinfo_x86 *c) |
| 353 | { | 354 | { |
| 354 | const u32 nopl_signature = 0x888c53b1; /* Random number */ | ||
| 355 | u32 has_nopl = nopl_signature; | ||
| 356 | |||
| 357 | clear_cpu_cap(c, X86_FEATURE_NOPL); | 355 | clear_cpu_cap(c, X86_FEATURE_NOPL); |
| 358 | if (c->x86 >= 6) { | ||
| 359 | asm volatile("\n" | ||
| 360 | "1: .byte 0x0f,0x1f,0xc0\n" /* nopl %eax */ | ||
| 361 | "2:\n" | ||
| 362 | " .section .fixup,\"ax\"\n" | ||
| 363 | "3: xor %0,%0\n" | ||
| 364 | " jmp 2b\n" | ||
| 365 | " .previous\n" | ||
| 366 | _ASM_EXTABLE(1b,3b) | ||
| 367 | : "+a" (has_nopl)); | ||
| 368 | |||
| 369 | if (has_nopl == nopl_signature) | ||
| 370 | set_cpu_cap(c, X86_FEATURE_NOPL); | ||
| 371 | } | ||
| 372 | } | 356 | } |
| 373 | 357 | ||
| 374 | static void __cpuinit generic_identify(struct cpuinfo_x86 *c) | 358 | static void __cpuinit generic_identify(struct cpuinfo_x86 *c) |
diff --git a/arch/x86/kernel/kdebugfs.c b/arch/x86/kernel/kdebugfs.c index f2d43bc75514..ff7d3b0124f1 100644 --- a/arch/x86/kernel/kdebugfs.c +++ b/arch/x86/kernel/kdebugfs.c | |||
| @@ -139,6 +139,7 @@ static int __init create_setup_data_nodes(struct dentry *parent) | |||
| 139 | if (PageHighMem(pg)) { | 139 | if (PageHighMem(pg)) { |
| 140 | data = ioremap_cache(pa_data, sizeof(*data)); | 140 | data = ioremap_cache(pa_data, sizeof(*data)); |
| 141 | if (!data) { | 141 | if (!data) { |
| 142 | kfree(node); | ||
| 142 | error = -ENXIO; | 143 | error = -ENXIO; |
| 143 | goto err_dir; | 144 | goto err_dir; |
| 144 | } | 145 | } |
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c index 362d4e7f2d38..9838f2539dfc 100644 --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c | |||
| @@ -670,6 +670,10 @@ void __init setup_arch(char **cmdline_p) | |||
| 670 | 670 | ||
| 671 | parse_early_param(); | 671 | parse_early_param(); |
| 672 | 672 | ||
| 673 | #ifdef CONFIG_X86_64 | ||
| 674 | check_efer(); | ||
| 675 | #endif | ||
| 676 | |||
| 673 | #if defined(CONFIG_VMI) && defined(CONFIG_X86_32) | 677 | #if defined(CONFIG_VMI) && defined(CONFIG_X86_32) |
| 674 | /* | 678 | /* |
| 675 | * Must be before kernel pagetables are setup | 679 | * Must be before kernel pagetables are setup |
| @@ -738,7 +742,6 @@ void __init setup_arch(char **cmdline_p) | |||
| 738 | #else | 742 | #else |
| 739 | num_physpages = max_pfn; | 743 | num_physpages = max_pfn; |
| 740 | 744 | ||
| 741 | check_efer(); | ||
| 742 | 745 | ||
| 743 | /* How many end-of-memory variables you have, grandma! */ | 746 | /* How many end-of-memory variables you have, grandma! */ |
| 744 | /* need this before calling reserve_initrd */ | 747 | /* need this before calling reserve_initrd */ |
diff --git a/arch/x86/mm/init_32.c b/arch/x86/mm/init_32.c index d37f29376b0c..60ec1d08ff24 100644 --- a/arch/x86/mm/init_32.c +++ b/arch/x86/mm/init_32.c | |||
| @@ -458,11 +458,7 @@ static void __init pagetable_init(void) | |||
| 458 | { | 458 | { |
| 459 | pgd_t *pgd_base = swapper_pg_dir; | 459 | pgd_t *pgd_base = swapper_pg_dir; |
| 460 | 460 | ||
| 461 | paravirt_pagetable_setup_start(pgd_base); | ||
| 462 | |||
| 463 | permanent_kmaps_init(pgd_base); | 461 | permanent_kmaps_init(pgd_base); |
| 464 | |||
| 465 | paravirt_pagetable_setup_done(pgd_base); | ||
| 466 | } | 462 | } |
| 467 | 463 | ||
| 468 | #ifdef CONFIG_ACPI_SLEEP | 464 | #ifdef CONFIG_ACPI_SLEEP |
diff --git a/arch/x86/xen/setup.c b/arch/x86/xen/setup.c index b6acc3a0af46..d67901083888 100644 --- a/arch/x86/xen/setup.c +++ b/arch/x86/xen/setup.c | |||
| @@ -42,7 +42,7 @@ char * __init xen_memory_setup(void) | |||
| 42 | 42 | ||
| 43 | e820.nr_map = 0; | 43 | e820.nr_map = 0; |
| 44 | 44 | ||
| 45 | e820_add_region(0, PFN_PHYS(max_pfn), E820_RAM); | 45 | e820_add_region(0, PFN_PHYS((u64)max_pfn), E820_RAM); |
| 46 | 46 | ||
| 47 | /* | 47 | /* |
| 48 | * Even though this is normal, usable memory under Xen, reserve | 48 | * Even though this is normal, usable memory under Xen, reserve |
