diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/kernel/cpu/common.c | 2 | ||||
-rw-r--r-- | arch/x86/kernel/fpu/init.c | 7 | ||||
-rw-r--r-- | arch/x86/kernel/setup.c | 7 |
3 files changed, 8 insertions, 8 deletions
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c index 9fc5e3d9d9c8..922c5e0cea4c 100644 --- a/arch/x86/kernel/cpu/common.c +++ b/arch/x86/kernel/cpu/common.c | |||
@@ -742,7 +742,6 @@ static void __init early_identify_cpu(struct cpuinfo_x86 *c) | |||
742 | cpu_detect(c); | 742 | cpu_detect(c); |
743 | get_cpu_vendor(c); | 743 | get_cpu_vendor(c); |
744 | get_cpu_cap(c); | 744 | get_cpu_cap(c); |
745 | fpu__init_system(c); | ||
746 | 745 | ||
747 | if (this_cpu->c_early_init) | 746 | if (this_cpu->c_early_init) |
748 | this_cpu->c_early_init(c); | 747 | this_cpu->c_early_init(c); |
@@ -754,6 +753,7 @@ static void __init early_identify_cpu(struct cpuinfo_x86 *c) | |||
754 | this_cpu->c_bsp_init(c); | 753 | this_cpu->c_bsp_init(c); |
755 | 754 | ||
756 | setup_force_cpu_cap(X86_FEATURE_ALWAYS); | 755 | setup_force_cpu_cap(X86_FEATURE_ALWAYS); |
756 | fpu__init_system(c); | ||
757 | } | 757 | } |
758 | 758 | ||
759 | void __init early_cpu_init(void) | 759 | void __init early_cpu_init(void) |
diff --git a/arch/x86/kernel/fpu/init.c b/arch/x86/kernel/fpu/init.c index fc878fee6a51..32826791e675 100644 --- a/arch/x86/kernel/fpu/init.c +++ b/arch/x86/kernel/fpu/init.c | |||
@@ -95,11 +95,12 @@ static void __init fpu__init_system_mxcsr(void) | |||
95 | unsigned int mask = 0; | 95 | unsigned int mask = 0; |
96 | 96 | ||
97 | if (cpu_has_fxsr) { | 97 | if (cpu_has_fxsr) { |
98 | struct fxregs_state fx_tmp __aligned(32) = { }; | 98 | /* Static because GCC does not get 16-byte stack alignment right: */ |
99 | static struct fxregs_state fxregs __initdata; | ||
99 | 100 | ||
100 | asm volatile("fxsave %0" : "+m" (fx_tmp)); | 101 | asm volatile("fxsave %0" : "+m" (fxregs)); |
101 | 102 | ||
102 | mask = fx_tmp.mxcsr_mask; | 103 | mask = fxregs.mxcsr_mask; |
103 | 104 | ||
104 | /* | 105 | /* |
105 | * If zero then use the default features mask, | 106 | * If zero then use the default features mask, |
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c index d3b95b89e9b2..80f874bf999e 100644 --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c | |||
@@ -461,19 +461,18 @@ static void __init e820_reserve_setup_data(void) | |||
461 | { | 461 | { |
462 | struct setup_data *data; | 462 | struct setup_data *data; |
463 | u64 pa_data; | 463 | u64 pa_data; |
464 | int found = 0; | ||
465 | 464 | ||
466 | pa_data = boot_params.hdr.setup_data; | 465 | pa_data = boot_params.hdr.setup_data; |
466 | if (!pa_data) | ||
467 | return; | ||
468 | |||
467 | while (pa_data) { | 469 | while (pa_data) { |
468 | data = early_memremap(pa_data, sizeof(*data)); | 470 | data = early_memremap(pa_data, sizeof(*data)); |
469 | e820_update_range(pa_data, sizeof(*data)+data->len, | 471 | e820_update_range(pa_data, sizeof(*data)+data->len, |
470 | E820_RAM, E820_RESERVED_KERN); | 472 | E820_RAM, E820_RESERVED_KERN); |
471 | found = 1; | ||
472 | pa_data = data->next; | 473 | pa_data = data->next; |
473 | early_memunmap(data, sizeof(*data)); | 474 | early_memunmap(data, sizeof(*data)); |
474 | } | 475 | } |
475 | if (!found) | ||
476 | return; | ||
477 | 476 | ||
478 | sanitize_e820_map(e820.map, ARRAY_SIZE(e820.map), &e820.nr_map); | 477 | sanitize_e820_map(e820.map, ARRAY_SIZE(e820.map), &e820.nr_map); |
479 | memcpy(&e820_saved, &e820, sizeof(struct e820map)); | 478 | memcpy(&e820_saved, &e820, sizeof(struct e820map)); |