diff options
| -rw-r--r-- | arch/x86/kernel/acpi/realmode/wakeup.lds.S | 10 | ||||
| -rw-r--r-- | arch/x86/kernel/ptrace.c | 7 | ||||
| -rw-r--r-- | arch/x86/kernel/setup.c | 4 | ||||
| -rw-r--r-- | arch/x86/kernel/setup_64.c | 2 | ||||
| -rw-r--r-- | arch/x86/kernel/smp.c | 3 | ||||
| -rw-r--r-- | arch/x86/kernel/smpboot.c | 24 | ||||
| -rw-r--r-- | arch/x86/kernel/x8664_ksyms_64.c | 3 | ||||
| -rw-r--r-- | arch/x86/lib/csum-partial_64.c | 2 | ||||
| -rw-r--r-- | arch/x86/mm/init_32.c | 12 | ||||
| -rw-r--r-- | arch/x86/mm/pat.c | 4 |
10 files changed, 39 insertions, 32 deletions
diff --git a/arch/x86/kernel/acpi/realmode/wakeup.lds.S b/arch/x86/kernel/acpi/realmode/wakeup.lds.S index 22fab6c4be15..7da00b799cda 100644 --- a/arch/x86/kernel/acpi/realmode/wakeup.lds.S +++ b/arch/x86/kernel/acpi/realmode/wakeup.lds.S | |||
| @@ -12,11 +12,6 @@ ENTRY(_start) | |||
| 12 | 12 | ||
| 13 | SECTIONS | 13 | SECTIONS |
| 14 | { | 14 | { |
| 15 | . = HEADER_OFFSET; | ||
| 16 | .header : { | ||
| 17 | *(.header) | ||
| 18 | } | ||
| 19 | |||
| 20 | . = 0; | 15 | . = 0; |
| 21 | .text : { | 16 | .text : { |
| 22 | *(.text*) | 17 | *(.text*) |
| @@ -50,6 +45,11 @@ SECTIONS | |||
| 50 | __bss_end = .; | 45 | __bss_end = .; |
| 51 | } | 46 | } |
| 52 | 47 | ||
| 48 | . = HEADER_OFFSET; | ||
| 49 | .header : { | ||
| 50 | *(.header) | ||
| 51 | } | ||
| 52 | |||
| 53 | . = ALIGN(16); | 53 | . = ALIGN(16); |
| 54 | _end = .; | 54 | _end = .; |
| 55 | 55 | ||
diff --git a/arch/x86/kernel/ptrace.c b/arch/x86/kernel/ptrace.c index fb03ef380f0e..a7835f282936 100644 --- a/arch/x86/kernel/ptrace.c +++ b/arch/x86/kernel/ptrace.c | |||
| @@ -1303,6 +1303,9 @@ static const struct user_regset_view user_x86_64_view = { | |||
| 1303 | #define genregs32_get genregs_get | 1303 | #define genregs32_get genregs_get |
| 1304 | #define genregs32_set genregs_set | 1304 | #define genregs32_set genregs_set |
| 1305 | 1305 | ||
| 1306 | #define user_i387_ia32_struct user_i387_struct | ||
| 1307 | #define user32_fxsr_struct user_fxsr_struct | ||
| 1308 | |||
| 1306 | #endif /* CONFIG_X86_64 */ | 1309 | #endif /* CONFIG_X86_64 */ |
| 1307 | 1310 | ||
| 1308 | #if defined CONFIG_X86_32 || defined CONFIG_IA32_EMULATION | 1311 | #if defined CONFIG_X86_32 || defined CONFIG_IA32_EMULATION |
| @@ -1315,13 +1318,13 @@ static const struct user_regset x86_32_regsets[] = { | |||
| 1315 | }, | 1318 | }, |
| 1316 | [REGSET_FP] = { | 1319 | [REGSET_FP] = { |
| 1317 | .core_note_type = NT_PRFPREG, | 1320 | .core_note_type = NT_PRFPREG, |
| 1318 | .n = sizeof(struct user_i387_struct) / sizeof(u32), | 1321 | .n = sizeof(struct user_i387_ia32_struct) / sizeof(u32), |
| 1319 | .size = sizeof(u32), .align = sizeof(u32), | 1322 | .size = sizeof(u32), .align = sizeof(u32), |
| 1320 | .active = fpregs_active, .get = fpregs_get, .set = fpregs_set | 1323 | .active = fpregs_active, .get = fpregs_get, .set = fpregs_set |
| 1321 | }, | 1324 | }, |
| 1322 | [REGSET_XFP] = { | 1325 | [REGSET_XFP] = { |
| 1323 | .core_note_type = NT_PRXFPREG, | 1326 | .core_note_type = NT_PRXFPREG, |
| 1324 | .n = sizeof(struct user_i387_struct) / sizeof(u32), | 1327 | .n = sizeof(struct user32_fxsr_struct) / sizeof(u32), |
| 1325 | .size = sizeof(u32), .align = sizeof(u32), | 1328 | .size = sizeof(u32), .align = sizeof(u32), |
| 1326 | .active = xfpregs_active, .get = xfpregs_get, .set = xfpregs_set | 1329 | .active = xfpregs_active, .get = xfpregs_get, .set = xfpregs_set |
| 1327 | }, | 1330 | }, |
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c index c0c68c18a788..6f80b852a196 100644 --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c | |||
| @@ -12,6 +12,7 @@ | |||
| 12 | #include <asm/mpspec.h> | 12 | #include <asm/mpspec.h> |
| 13 | #include <asm/apicdef.h> | 13 | #include <asm/apicdef.h> |
| 14 | 14 | ||
| 15 | #ifdef CONFIG_X86_LOCAL_APIC | ||
| 15 | unsigned int num_processors; | 16 | unsigned int num_processors; |
| 16 | unsigned disabled_cpus __cpuinitdata; | 17 | unsigned disabled_cpus __cpuinitdata; |
| 17 | /* Processor that is doing the boot up */ | 18 | /* Processor that is doing the boot up */ |
| @@ -23,8 +24,9 @@ EXPORT_PER_CPU_SYMBOL(x86_cpu_to_apicid); | |||
| 23 | 24 | ||
| 24 | /* Bitmask of physically existing CPUs */ | 25 | /* Bitmask of physically existing CPUs */ |
| 25 | physid_mask_t phys_cpu_present_map; | 26 | physid_mask_t phys_cpu_present_map; |
| 27 | #endif | ||
| 26 | 28 | ||
| 27 | #if defined(CONFIG_HAVE_SETUP_PER_CPU_AREA) && defined(CONFIG_SMP) | 29 | #if defined(CONFIG_HAVE_SETUP_PER_CPU_AREA) && defined(CONFIG_X86_SMP) |
| 28 | /* | 30 | /* |
| 29 | * Copy data used in early init routines from the initial arrays to the | 31 | * Copy data used in early init routines from the initial arrays to the |
| 30 | * per cpu data areas. These arrays then become expendable and the | 32 | * per cpu data areas. These arrays then become expendable and the |
diff --git a/arch/x86/kernel/setup_64.c b/arch/x86/kernel/setup_64.c index f2fc8feb727d..6dff1286ad8a 100644 --- a/arch/x86/kernel/setup_64.c +++ b/arch/x86/kernel/setup_64.c | |||
| @@ -951,7 +951,7 @@ static void __cpuinit init_intel(struct cpuinfo_x86 *c) | |||
| 951 | static void __cpuinit early_init_centaur(struct cpuinfo_x86 *c) | 951 | static void __cpuinit early_init_centaur(struct cpuinfo_x86 *c) |
| 952 | { | 952 | { |
| 953 | if (c->x86 == 0x6 && c->x86_model >= 0xf) | 953 | if (c->x86 == 0x6 && c->x86_model >= 0xf) |
| 954 | set_bit(X86_FEATURE_CONSTANT_TSC, &c->x86_capability); | 954 | set_cpu_cap(c, X86_FEATURE_CONSTANT_TSC); |
| 955 | } | 955 | } |
| 956 | 956 | ||
| 957 | static void __cpuinit init_centaur(struct cpuinfo_x86 *c) | 957 | static void __cpuinit init_centaur(struct cpuinfo_x86 *c) |
diff --git a/arch/x86/kernel/smp.c b/arch/x86/kernel/smp.c index 8f75893a6467..0cb7aadc87cd 100644 --- a/arch/x86/kernel/smp.c +++ b/arch/x86/kernel/smp.c | |||
| @@ -231,7 +231,8 @@ native_smp_call_function_mask(cpumask_t mask, | |||
| 231 | wmb(); | 231 | wmb(); |
| 232 | 232 | ||
| 233 | /* Send a message to other CPUs */ | 233 | /* Send a message to other CPUs */ |
| 234 | if (cpus_equal(mask, allbutself)) | 234 | if (cpus_equal(mask, allbutself) && |
| 235 | cpus_equal(cpu_online_map, cpu_callout_map)) | ||
| 235 | send_IPI_allbutself(CALL_FUNCTION_VECTOR); | 236 | send_IPI_allbutself(CALL_FUNCTION_VECTOR); |
| 236 | else | 237 | else |
| 237 | send_IPI_mask(mask, CALL_FUNCTION_VECTOR); | 238 | send_IPI_mask(mask, CALL_FUNCTION_VECTOR); |
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c index 6b087ab6cd8f..38988491c622 100644 --- a/arch/x86/kernel/smpboot.c +++ b/arch/x86/kernel/smpboot.c | |||
| @@ -86,6 +86,7 @@ void *x86_bios_cpu_apicid_early_ptr; | |||
| 86 | 86 | ||
| 87 | #ifdef CONFIG_X86_32 | 87 | #ifdef CONFIG_X86_32 |
| 88 | u8 apicid_2_node[MAX_APICID]; | 88 | u8 apicid_2_node[MAX_APICID]; |
| 89 | static int low_mappings; | ||
| 89 | #endif | 90 | #endif |
| 90 | 91 | ||
| 91 | /* State of each CPU */ | 92 | /* State of each CPU */ |
| @@ -326,6 +327,12 @@ static void __cpuinit start_secondary(void *unused) | |||
| 326 | enable_8259A_irq(0); | 327 | enable_8259A_irq(0); |
| 327 | } | 328 | } |
| 328 | 329 | ||
| 330 | #ifdef CONFIG_X86_32 | ||
| 331 | while (low_mappings) | ||
| 332 | cpu_relax(); | ||
| 333 | __flush_tlb_all(); | ||
| 334 | #endif | ||
| 335 | |||
| 329 | /* This must be done before setting cpu_online_map */ | 336 | /* This must be done before setting cpu_online_map */ |
| 330 | set_cpu_sibling_map(raw_smp_processor_id()); | 337 | set_cpu_sibling_map(raw_smp_processor_id()); |
| 331 | wmb(); | 338 | wmb(); |
| @@ -1040,14 +1047,20 @@ int __cpuinit native_cpu_up(unsigned int cpu) | |||
| 1040 | #ifdef CONFIG_X86_32 | 1047 | #ifdef CONFIG_X86_32 |
| 1041 | /* init low mem mapping */ | 1048 | /* init low mem mapping */ |
| 1042 | clone_pgd_range(swapper_pg_dir, swapper_pg_dir + KERNEL_PGD_BOUNDARY, | 1049 | clone_pgd_range(swapper_pg_dir, swapper_pg_dir + KERNEL_PGD_BOUNDARY, |
| 1043 | min_t(unsigned long, KERNEL_PGD_PTRS, KERNEL_PGD_BOUNDARY)); | 1050 | min_t(unsigned long, KERNEL_PGD_PTRS, KERNEL_PGD_BOUNDARY)); |
| 1044 | flush_tlb_all(); | 1051 | flush_tlb_all(); |
| 1045 | #endif | 1052 | low_mappings = 1; |
| 1046 | 1053 | ||
| 1047 | err = do_boot_cpu(apicid, cpu); | 1054 | err = do_boot_cpu(apicid, cpu); |
| 1048 | if (err < 0) { | 1055 | |
| 1056 | zap_low_mappings(); | ||
| 1057 | low_mappings = 0; | ||
| 1058 | #else | ||
| 1059 | err = do_boot_cpu(apicid, cpu); | ||
| 1060 | #endif | ||
| 1061 | if (err) { | ||
| 1049 | Dprintk("do_boot_cpu failed %d\n", err); | 1062 | Dprintk("do_boot_cpu failed %d\n", err); |
| 1050 | return err; | 1063 | return -EIO; |
| 1051 | } | 1064 | } |
| 1052 | 1065 | ||
| 1053 | /* | 1066 | /* |
| @@ -1259,9 +1272,6 @@ void __init native_smp_cpus_done(unsigned int max_cpus) | |||
| 1259 | setup_ioapic_dest(); | 1272 | setup_ioapic_dest(); |
| 1260 | #endif | 1273 | #endif |
| 1261 | check_nmi_watchdog(); | 1274 | check_nmi_watchdog(); |
| 1262 | #ifdef CONFIG_X86_32 | ||
| 1263 | zap_low_mappings(); | ||
| 1264 | #endif | ||
| 1265 | } | 1275 | } |
| 1266 | 1276 | ||
| 1267 | #ifdef CONFIG_HOTPLUG_CPU | 1277 | #ifdef CONFIG_HOTPLUG_CPU |
diff --git a/arch/x86/kernel/x8664_ksyms_64.c b/arch/x86/kernel/x8664_ksyms_64.c index 58882f9f2637..f6c05d0410fb 100644 --- a/arch/x86/kernel/x8664_ksyms_64.c +++ b/arch/x86/kernel/x8664_ksyms_64.c | |||
| @@ -2,6 +2,7 @@ | |||
| 2 | All C exports should go in the respective C files. */ | 2 | All C exports should go in the respective C files. */ |
| 3 | 3 | ||
| 4 | #include <linux/module.h> | 4 | #include <linux/module.h> |
| 5 | #include <net/checksum.h> | ||
| 5 | #include <linux/smp.h> | 6 | #include <linux/smp.h> |
| 6 | 7 | ||
| 7 | #include <asm/processor.h> | 8 | #include <asm/processor.h> |
| @@ -29,6 +30,8 @@ EXPORT_SYMBOL(__copy_from_user_inatomic); | |||
| 29 | EXPORT_SYMBOL(copy_page); | 30 | EXPORT_SYMBOL(copy_page); |
| 30 | EXPORT_SYMBOL(clear_page); | 31 | EXPORT_SYMBOL(clear_page); |
| 31 | 32 | ||
| 33 | EXPORT_SYMBOL(csum_partial); | ||
| 34 | |||
| 32 | /* | 35 | /* |
| 33 | * Export string functions. We normally rely on gcc builtin for most of these, | 36 | * Export string functions. We normally rely on gcc builtin for most of these, |
| 34 | * but gcc sometimes decides not to inline them. | 37 | * but gcc sometimes decides not to inline them. |
diff --git a/arch/x86/lib/csum-partial_64.c b/arch/x86/lib/csum-partial_64.c index bc503f506903..bf51144d97e1 100644 --- a/arch/x86/lib/csum-partial_64.c +++ b/arch/x86/lib/csum-partial_64.c | |||
| @@ -136,8 +136,6 @@ __wsum csum_partial(const void *buff, int len, __wsum sum) | |||
| 136 | (__force u32)sum); | 136 | (__force u32)sum); |
| 137 | } | 137 | } |
| 138 | 138 | ||
| 139 | EXPORT_SYMBOL(csum_partial); | ||
| 140 | |||
| 141 | /* | 139 | /* |
| 142 | * this routine is used for miscellaneous IP-like checksums, mainly | 140 | * this routine is used for miscellaneous IP-like checksums, mainly |
| 143 | * in icmp.c | 141 | * in icmp.c |
diff --git a/arch/x86/mm/init_32.c b/arch/x86/mm/init_32.c index de236e419cb5..ec30d10154b6 100644 --- a/arch/x86/mm/init_32.c +++ b/arch/x86/mm/init_32.c | |||
| @@ -438,8 +438,6 @@ void zap_low_mappings(void) | |||
| 438 | { | 438 | { |
| 439 | int i; | 439 | int i; |
| 440 | 440 | ||
| 441 | save_pg_dir(); | ||
| 442 | |||
| 443 | /* | 441 | /* |
| 444 | * Zap initial low-memory mappings. | 442 | * Zap initial low-memory mappings. |
| 445 | * | 443 | * |
| @@ -663,16 +661,8 @@ void __init mem_init(void) | |||
| 663 | test_wp_bit(); | 661 | test_wp_bit(); |
| 664 | 662 | ||
| 665 | cpa_init(); | 663 | cpa_init(); |
| 666 | 664 | save_pg_dir(); | |
| 667 | /* | ||
| 668 | * Subtle. SMP is doing it's boot stuff late (because it has to | ||
| 669 | * fork idle threads) - but it also needs low mappings for the | ||
| 670 | * protected-mode entry to work. We zap these entries only after | ||
| 671 | * the WP-bit has been tested. | ||
| 672 | */ | ||
| 673 | #ifndef CONFIG_SMP | ||
| 674 | zap_low_mappings(); | 665 | zap_low_mappings(); |
| 675 | #endif | ||
| 676 | } | 666 | } |
| 677 | 667 | ||
| 678 | #ifdef CONFIG_MEMORY_HOTPLUG | 668 | #ifdef CONFIG_MEMORY_HOTPLUG |
diff --git a/arch/x86/mm/pat.c b/arch/x86/mm/pat.c index 60adbe22efa0..bcb1a8e4b2db 100644 --- a/arch/x86/mm/pat.c +++ b/arch/x86/mm/pat.c | |||
| @@ -555,7 +555,7 @@ int phys_mem_access_prot_allowed(struct file *file, unsigned long pfn, | |||
| 555 | "%s:%d /dev/mem ioremap_change_attr failed %s for %Lx-%Lx\n", | 555 | "%s:%d /dev/mem ioremap_change_attr failed %s for %Lx-%Lx\n", |
| 556 | current->comm, current->pid, | 556 | current->comm, current->pid, |
| 557 | cattr_name(flags), | 557 | cattr_name(flags), |
| 558 | offset, offset + size); | 558 | offset, (unsigned long long)(offset + size)); |
| 559 | return 0; | 559 | return 0; |
| 560 | } | 560 | } |
| 561 | 561 | ||
| @@ -576,7 +576,7 @@ void map_devmem(unsigned long pfn, unsigned long size, pgprot_t vma_prot) | |||
| 576 | "%s:%d /dev/mem expected mapping type %s for %Lx-%Lx, got %s\n", | 576 | "%s:%d /dev/mem expected mapping type %s for %Lx-%Lx, got %s\n", |
| 577 | current->comm, current->pid, | 577 | current->comm, current->pid, |
| 578 | cattr_name(want_flags), | 578 | cattr_name(want_flags), |
| 579 | addr, addr + size, | 579 | addr, (unsigned long long)(addr + size), |
| 580 | cattr_name(flags)); | 580 | cattr_name(flags)); |
| 581 | } | 581 | } |
| 582 | } | 582 | } |
