aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-10-23 15:38:39 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-10-23 15:38:39 -0400
commitc3c9897c63ebb0b93b7f78724e38d6ee1da04041 (patch)
treef1ed40f2ac6108b23251dd4e41adeac403396fea /arch
parentd2441183dc222d12961ff2201f5086c846505d93 (diff)
parent3cfba0892585d4c8e7b4122b5dc0d206a76936de (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: fix section mismatch warning - apic_x2apic_phys x86: fix section mismatch warning - apic_x2apic_cluster x86: fix section mismatch warning - apic_x2apic_uv_x x86: fix section mismatch warning - apic_physflat x86: fix section mismatch warning - apic_flat x86: memtest fix use of reserve_early() x86 syscall.h: fix argument order x86/tlb_uv: remove strange mc146818rtc include x86: remove redundant KERN_DEBUG on pr_debug x86: do_boot_cpu - check if we have ESR register x86: MAINTAINERS change for AMD microcode patch loader x86/proc: fix /proc/cpuinfo cpu offline bug x86: call dmi-quirks for HP Laptops after early-quirks are executed x86, kexec: fix hang on i386 when panic occurs while console_sem is held MCE: Don't run 32bit machine checks with interrupts on x86: SB600: skip IRQ0 override if it is not routed to INT2 of IOAPIC x86: make variables static
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/boot/video-bios.c4
-rw-r--r--arch/x86/boot/video-vesa.c4
-rw-r--r--arch/x86/include/asm/syscall.h106
-rw-r--r--arch/x86/kernel/acpi/boot.c10
-rw-r--r--arch/x86/kernel/cpu/proc.c6
-rw-r--r--arch/x86/kernel/dumpstack_32.c2
-rw-r--r--arch/x86/kernel/entry_32.S2
-rw-r--r--arch/x86/kernel/genapic_flat_64.c4
-rw-r--r--arch/x86/kernel/genx2apic_cluster.c2
-rw-r--r--arch/x86/kernel/genx2apic_phys.c2
-rw-r--r--arch/x86/kernel/genx2apic_uv_x.c2
-rw-r--r--arch/x86/kernel/setup_percpu.c2
-rw-r--r--arch/x86/kernel/smpboot.c8
-rw-r--r--arch/x86/kernel/tlb_uv.c2
-rw-r--r--arch/x86/kernel/traps.c8
-rw-r--r--arch/x86/kernel/xsave.c2
-rw-r--r--arch/x86/mm/memtest.c7
17 files changed, 89 insertions, 84 deletions
diff --git a/arch/x86/boot/video-bios.c b/arch/x86/boot/video-bios.c
index 49f26aaaebc8..3fa979c9c363 100644
--- a/arch/x86/boot/video-bios.c
+++ b/arch/x86/boot/video-bios.c
@@ -17,7 +17,7 @@
17#include "boot.h" 17#include "boot.h"
18#include "video.h" 18#include "video.h"
19 19
20__videocard video_bios; 20static __videocard video_bios;
21 21
22/* Set a conventional BIOS mode */ 22/* Set a conventional BIOS mode */
23static int set_bios_mode(u8 mode); 23static int set_bios_mode(u8 mode);
@@ -119,7 +119,7 @@ static int bios_probe(void)
119 return nmodes; 119 return nmodes;
120} 120}
121 121
122__videocard video_bios = 122static __videocard video_bios =
123{ 123{
124 .card_name = "BIOS", 124 .card_name = "BIOS",
125 .probe = bios_probe, 125 .probe = bios_probe,
diff --git a/arch/x86/boot/video-vesa.c b/arch/x86/boot/video-vesa.c
index 99b3079dc6ab..75115849af33 100644
--- a/arch/x86/boot/video-vesa.c
+++ b/arch/x86/boot/video-vesa.c
@@ -20,7 +20,7 @@
20static struct vesa_general_info vginfo; 20static struct vesa_general_info vginfo;
21static struct vesa_mode_info vminfo; 21static struct vesa_mode_info vminfo;
22 22
23__videocard video_vesa; 23static __videocard video_vesa;
24 24
25#ifndef _WAKEUP 25#ifndef _WAKEUP
26static void vesa_store_mode_params_graphics(void); 26static void vesa_store_mode_params_graphics(void);
@@ -293,7 +293,7 @@ void vesa_store_edid(void)
293 293
294#endif /* not _WAKEUP */ 294#endif /* not _WAKEUP */
295 295
296__videocard video_vesa = 296static __videocard video_vesa =
297{ 297{
298 .card_name = "VESA", 298 .card_name = "VESA",
299 .probe = vesa_probe, 299 .probe = vesa_probe,
diff --git a/arch/x86/include/asm/syscall.h b/arch/x86/include/asm/syscall.h
index 1d88f6957d39..d82f39bb7905 100644
--- a/arch/x86/include/asm/syscall.h
+++ b/arch/x86/include/asm/syscall.h
@@ -93,26 +93,26 @@ static inline void syscall_get_arguments(struct task_struct *task,
93{ 93{
94# ifdef CONFIG_IA32_EMULATION 94# ifdef CONFIG_IA32_EMULATION
95 if (task_thread_info(task)->status & TS_COMPAT) 95 if (task_thread_info(task)->status & TS_COMPAT)
96 switch (i + n) { 96 switch (i) {
97 case 6: 97 case 0:
98 if (!n--) break; 98 if (!n--) break;
99 *args++ = regs->bp; 99 *args++ = regs->bx;
100 case 5: 100 case 1:
101 if (!n--) break; 101 if (!n--) break;
102 *args++ = regs->di; 102 *args++ = regs->cx;
103 case 4: 103 case 2:
104 if (!n--) break; 104 if (!n--) break;
105 *args++ = regs->si; 105 *args++ = regs->dx;
106 case 3: 106 case 3:
107 if (!n--) break; 107 if (!n--) break;
108 *args++ = regs->dx; 108 *args++ = regs->si;
109 case 2: 109 case 4:
110 if (!n--) break; 110 if (!n--) break;
111 *args++ = regs->cx; 111 *args++ = regs->di;
112 case 1: 112 case 5:
113 if (!n--) break; 113 if (!n--) break;
114 *args++ = regs->bx; 114 *args++ = regs->bp;
115 case 0: 115 case 6:
116 if (!n--) break; 116 if (!n--) break;
117 default: 117 default:
118 BUG(); 118 BUG();
@@ -120,26 +120,26 @@ static inline void syscall_get_arguments(struct task_struct *task,
120 } 120 }
121 else 121 else
122# endif 122# endif
123 switch (i + n) { 123 switch (i) {
124 case 6: 124 case 0:
125 if (!n--) break; 125 if (!n--) break;
126 *args++ = regs->r9; 126 *args++ = regs->di;
127 case 5: 127 case 1:
128 if (!n--) break; 128 if (!n--) break;
129 *args++ = regs->r8; 129 *args++ = regs->si;
130 case 4: 130 case 2:
131 if (!n--) break; 131 if (!n--) break;
132 *args++ = regs->r10; 132 *args++ = regs->dx;
133 case 3: 133 case 3:
134 if (!n--) break; 134 if (!n--) break;
135 *args++ = regs->dx; 135 *args++ = regs->r10;
136 case 2: 136 case 4:
137 if (!n--) break; 137 if (!n--) break;
138 *args++ = regs->si; 138 *args++ = regs->r8;
139 case 1: 139 case 5:
140 if (!n--) break; 140 if (!n--) break;
141 *args++ = regs->di; 141 *args++ = regs->r9;
142 case 0: 142 case 6:
143 if (!n--) break; 143 if (!n--) break;
144 default: 144 default:
145 BUG(); 145 BUG();
@@ -154,55 +154,57 @@ static inline void syscall_set_arguments(struct task_struct *task,
154{ 154{
155# ifdef CONFIG_IA32_EMULATION 155# ifdef CONFIG_IA32_EMULATION
156 if (task_thread_info(task)->status & TS_COMPAT) 156 if (task_thread_info(task)->status & TS_COMPAT)
157 switch (i + n) { 157 switch (i) {
158 case 6: 158 case 0:
159 if (!n--) break; 159 if (!n--) break;
160 regs->bp = *args++; 160 regs->bx = *args++;
161 case 5: 161 case 1:
162 if (!n--) break; 162 if (!n--) break;
163 regs->di = *args++; 163 regs->cx = *args++;
164 case 4: 164 case 2:
165 if (!n--) break; 165 if (!n--) break;
166 regs->si = *args++; 166 regs->dx = *args++;
167 case 3: 167 case 3:
168 if (!n--) break; 168 if (!n--) break;
169 regs->dx = *args++; 169 regs->si = *args++;
170 case 2: 170 case 4:
171 if (!n--) break; 171 if (!n--) break;
172 regs->cx = *args++; 172 regs->di = *args++;
173 case 1: 173 case 5:
174 if (!n--) break; 174 if (!n--) break;
175 regs->bx = *args++; 175 regs->bp = *args++;
176 case 0: 176 case 6:
177 if (!n--) break; 177 if (!n--) break;
178 default: 178 default:
179 BUG(); 179 BUG();
180 break;
180 } 181 }
181 else 182 else
182# endif 183# endif
183 switch (i + n) { 184 switch (i) {
184 case 6: 185 case 0:
185 if (!n--) break; 186 if (!n--) break;
186 regs->r9 = *args++; 187 regs->di = *args++;
187 case 5: 188 case 1:
188 if (!n--) break; 189 if (!n--) break;
189 regs->r8 = *args++; 190 regs->si = *args++;
190 case 4: 191 case 2:
191 if (!n--) break; 192 if (!n--) break;
192 regs->r10 = *args++; 193 regs->dx = *args++;
193 case 3: 194 case 3:
194 if (!n--) break; 195 if (!n--) break;
195 regs->dx = *args++; 196 regs->r10 = *args++;
196 case 2: 197 case 4:
197 if (!n--) break; 198 if (!n--) break;
198 regs->si = *args++; 199 regs->r8 = *args++;
199 case 1: 200 case 5:
200 if (!n--) break; 201 if (!n--) break;
201 regs->di = *args++; 202 regs->r9 = *args++;
202 case 0: 203 case 6:
203 if (!n--) break; 204 if (!n--) break;
204 default: 205 default:
205 BUG(); 206 BUG();
207 break;
206 } 208 }
207} 209}
208 210
diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c
index 53b01a1ae10c..8c1f76abae9e 100644
--- a/arch/x86/kernel/acpi/boot.c
+++ b/arch/x86/kernel/acpi/boot.c
@@ -1137,7 +1137,7 @@ int mp_register_gsi(u32 gsi, int triggering, int polarity)
1137 return gsi; 1137 return gsi;
1138 } 1138 }
1139 if (test_bit(ioapic_pin, mp_ioapic_routing[ioapic].pin_programmed)) { 1139 if (test_bit(ioapic_pin, mp_ioapic_routing[ioapic].pin_programmed)) {
1140 pr_debug(KERN_DEBUG "Pin %d-%d already programmed\n", 1140 pr_debug("Pin %d-%d already programmed\n",
1141 mp_ioapic_routing[ioapic].apic_id, ioapic_pin); 1141 mp_ioapic_routing[ioapic].apic_id, ioapic_pin);
1142#ifdef CONFIG_X86_32 1142#ifdef CONFIG_X86_32
1143 return (gsi < IRQ_COMPRESSION_START ? gsi : gsi_to_irq[gsi]); 1143 return (gsi < IRQ_COMPRESSION_START ? gsi : gsi_to_irq[gsi]);
@@ -1599,6 +1599,11 @@ static struct dmi_system_id __initdata acpi_dmi_table[] = {
1599 DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 360"), 1599 DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 360"),
1600 }, 1600 },
1601 }, 1601 },
1602 {}
1603};
1604
1605/* second table for DMI checks that should run after early-quirks */
1606static struct dmi_system_id __initdata acpi_dmi_table_late[] = {
1602 /* 1607 /*
1603 * HP laptops which use a DSDT reporting as HP/SB400/10000, 1608 * HP laptops which use a DSDT reporting as HP/SB400/10000,
1604 * which includes some code which overrides all temperature 1609 * which includes some code which overrides all temperature
@@ -1727,6 +1732,9 @@ int __init early_acpi_boot_init(void)
1727 1732
1728int __init acpi_boot_init(void) 1733int __init acpi_boot_init(void)
1729{ 1734{
1735 /* those are executed after early-quirks are executed */
1736 dmi_check_system(acpi_dmi_table_late);
1737
1730 /* 1738 /*
1731 * If acpi_disabled, bail out 1739 * If acpi_disabled, bail out
1732 * One exception: acpi=ht continues far enough to enumerate LAPICs 1740 * One exception: acpi=ht continues far enough to enumerate LAPICs
diff --git a/arch/x86/kernel/cpu/proc.c b/arch/x86/kernel/cpu/proc.c
index a26c480b9491..01b1244ef1c0 100644
--- a/arch/x86/kernel/cpu/proc.c
+++ b/arch/x86/kernel/cpu/proc.c
@@ -160,14 +160,16 @@ static void *c_start(struct seq_file *m, loff_t *pos)
160{ 160{
161 if (*pos == 0) /* just in case, cpu 0 is not the first */ 161 if (*pos == 0) /* just in case, cpu 0 is not the first */
162 *pos = first_cpu(cpu_online_map); 162 *pos = first_cpu(cpu_online_map);
163 if ((*pos) < nr_cpu_ids && cpu_online(*pos)) 163 else
164 *pos = next_cpu_nr(*pos - 1, cpu_online_map);
165 if ((*pos) < nr_cpu_ids)
164 return &cpu_data(*pos); 166 return &cpu_data(*pos);
165 return NULL; 167 return NULL;
166} 168}
167 169
168static void *c_next(struct seq_file *m, void *v, loff_t *pos) 170static void *c_next(struct seq_file *m, void *v, loff_t *pos)
169{ 171{
170 *pos = next_cpu(*pos, cpu_online_map); 172 (*pos)++;
171 return c_start(m, pos); 173 return c_start(m, pos);
172} 174}
173 175
diff --git a/arch/x86/kernel/dumpstack_32.c b/arch/x86/kernel/dumpstack_32.c
index 1a78180f08d3..b3614752197b 100644
--- a/arch/x86/kernel/dumpstack_32.c
+++ b/arch/x86/kernel/dumpstack_32.c
@@ -405,7 +405,6 @@ die_nmi(char *str, struct pt_regs *regs, int do_panic)
405 panic("Non maskable interrupt"); 405 panic("Non maskable interrupt");
406 console_silent(); 406 console_silent();
407 spin_unlock(&nmi_print_lock); 407 spin_unlock(&nmi_print_lock);
408 bust_spinlocks(0);
409 408
410 /* 409 /*
411 * If we are in kernel we are probably nested up pretty bad 410 * If we are in kernel we are probably nested up pretty bad
@@ -416,6 +415,7 @@ die_nmi(char *str, struct pt_regs *regs, int do_panic)
416 crash_kexec(regs); 415 crash_kexec(regs);
417 } 416 }
418 417
418 bust_spinlocks(0);
419 do_exit(SIGSEGV); 419 do_exit(SIGSEGV);
420} 420}
421 421
diff --git a/arch/x86/kernel/entry_32.S b/arch/x86/kernel/entry_32.S
index c356423a6026..dd65143941a8 100644
--- a/arch/x86/kernel/entry_32.S
+++ b/arch/x86/kernel/entry_32.S
@@ -1024,7 +1024,7 @@ ENTRY(machine_check)
1024 RING0_INT_FRAME 1024 RING0_INT_FRAME
1025 pushl $0 1025 pushl $0
1026 CFI_ADJUST_CFA_OFFSET 4 1026 CFI_ADJUST_CFA_OFFSET 4
1027 pushl $do_machine_check 1027 pushl machine_check_vector
1028 CFI_ADJUST_CFA_OFFSET 4 1028 CFI_ADJUST_CFA_OFFSET 4
1029 jmp error_code 1029 jmp error_code
1030 CFI_ENDPROC 1030 CFI_ENDPROC
diff --git a/arch/x86/kernel/genapic_flat_64.c b/arch/x86/kernel/genapic_flat_64.c
index 2ec2de8d8c46..c0262791bda4 100644
--- a/arch/x86/kernel/genapic_flat_64.c
+++ b/arch/x86/kernel/genapic_flat_64.c
@@ -25,7 +25,7 @@
25#include <acpi/acpi_bus.h> 25#include <acpi/acpi_bus.h>
26#endif 26#endif
27 27
28static int __init flat_acpi_madt_oem_check(char *oem_id, char *oem_table_id) 28static int flat_acpi_madt_oem_check(char *oem_id, char *oem_table_id)
29{ 29{
30 return 1; 30 return 1;
31} 31}
@@ -170,7 +170,7 @@ struct genapic apic_flat = {
170 * We cannot use logical delivery in this case because the mask 170 * We cannot use logical delivery in this case because the mask
171 * overflows, so use physical mode. 171 * overflows, so use physical mode.
172 */ 172 */
173static int __init physflat_acpi_madt_oem_check(char *oem_id, char *oem_table_id) 173static int physflat_acpi_madt_oem_check(char *oem_id, char *oem_table_id)
174{ 174{
175#ifdef CONFIG_ACPI 175#ifdef CONFIG_ACPI
176 /* 176 /*
diff --git a/arch/x86/kernel/genx2apic_cluster.c b/arch/x86/kernel/genx2apic_cluster.c
index e4bf2cc0d743..f6a2c8eb48a6 100644
--- a/arch/x86/kernel/genx2apic_cluster.c
+++ b/arch/x86/kernel/genx2apic_cluster.c
@@ -12,7 +12,7 @@
12 12
13DEFINE_PER_CPU(u32, x86_cpu_to_logical_apicid); 13DEFINE_PER_CPU(u32, x86_cpu_to_logical_apicid);
14 14
15static int __init x2apic_acpi_madt_oem_check(char *oem_id, char *oem_table_id) 15static int x2apic_acpi_madt_oem_check(char *oem_id, char *oem_table_id)
16{ 16{
17 if (cpu_has_x2apic) 17 if (cpu_has_x2apic)
18 return 1; 18 return 1;
diff --git a/arch/x86/kernel/genx2apic_phys.c b/arch/x86/kernel/genx2apic_phys.c
index 8f1343df2627..d042211768b7 100644
--- a/arch/x86/kernel/genx2apic_phys.c
+++ b/arch/x86/kernel/genx2apic_phys.c
@@ -19,7 +19,7 @@ static int set_x2apic_phys_mode(char *arg)
19} 19}
20early_param("x2apic_phys", set_x2apic_phys_mode); 20early_param("x2apic_phys", set_x2apic_phys_mode);
21 21
22static int __init x2apic_acpi_madt_oem_check(char *oem_id, char *oem_table_id) 22static int x2apic_acpi_madt_oem_check(char *oem_id, char *oem_table_id)
23{ 23{
24 if (cpu_has_x2apic && x2apic_phys) 24 if (cpu_has_x2apic && x2apic_phys)
25 return 1; 25 return 1;
diff --git a/arch/x86/kernel/genx2apic_uv_x.c b/arch/x86/kernel/genx2apic_uv_x.c
index bfd532843df6..680a06557c5e 100644
--- a/arch/x86/kernel/genx2apic_uv_x.c
+++ b/arch/x86/kernel/genx2apic_uv_x.c
@@ -30,7 +30,7 @@ DEFINE_PER_CPU(int, x2apic_extra_bits);
30 30
31static enum uv_system_type uv_system_type; 31static enum uv_system_type uv_system_type;
32 32
33static int __init uv_acpi_madt_oem_check(char *oem_id, char *oem_table_id) 33static int uv_acpi_madt_oem_check(char *oem_id, char *oem_table_id)
34{ 34{
35 if (!strcmp(oem_id, "SGI")) { 35 if (!strcmp(oem_id, "SGI")) {
36 if (!strcmp(oem_table_id, "UVL")) 36 if (!strcmp(oem_table_id, "UVL"))
diff --git a/arch/x86/kernel/setup_percpu.c b/arch/x86/kernel/setup_percpu.c
index 410c88f0bfeb..ae0c0d3bb770 100644
--- a/arch/x86/kernel/setup_percpu.c
+++ b/arch/x86/kernel/setup_percpu.c
@@ -218,7 +218,7 @@ static void __init setup_node_to_cpumask_map(void)
218 /* allocate the map */ 218 /* allocate the map */
219 map = alloc_bootmem_low(nr_node_ids * sizeof(cpumask_t)); 219 map = alloc_bootmem_low(nr_node_ids * sizeof(cpumask_t));
220 220
221 pr_debug(KERN_DEBUG "Node to cpumask map at %p for %d nodes\n", 221 pr_debug("Node to cpumask map at %p for %d nodes\n",
222 map, nr_node_ids); 222 map, nr_node_ids);
223 223
224 /* node_to_cpumask() will now work */ 224 /* node_to_cpumask() will now work */
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index 7ece815ea637..7b1093397319 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -893,9 +893,11 @@ do_rest:
893 smpboot_setup_warm_reset_vector(start_ip); 893 smpboot_setup_warm_reset_vector(start_ip);
894 /* 894 /*
895 * Be paranoid about clearing APIC errors. 895 * Be paranoid about clearing APIC errors.
896 */ 896 */
897 apic_write(APIC_ESR, 0); 897 if (APIC_INTEGRATED(apic_version[boot_cpu_physical_apicid])) {
898 apic_read(APIC_ESR); 898 apic_write(APIC_ESR, 0);
899 apic_read(APIC_ESR);
900 }
899 } 901 }
900 902
901 /* 903 /*
diff --git a/arch/x86/kernel/tlb_uv.c b/arch/x86/kernel/tlb_uv.c
index 8b8c0d6640fa..04431f34fd16 100644
--- a/arch/x86/kernel/tlb_uv.c
+++ b/arch/x86/kernel/tlb_uv.c
@@ -6,7 +6,7 @@
6 * This code is released under the GNU General Public License version 2 or 6 * This code is released under the GNU General Public License version 2 or
7 * later. 7 * later.
8 */ 8 */
9#include <linux/mc146818rtc.h> 9#include <linux/seq_file.h>
10#include <linux/proc_fs.h> 10#include <linux/proc_fs.h>
11#include <linux/kernel.h> 11#include <linux/kernel.h>
12 12
diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c
index e062974cce34..04d242ab0161 100644
--- a/arch/x86/kernel/traps.c
+++ b/arch/x86/kernel/traps.c
@@ -931,14 +931,6 @@ do_device_not_available(struct pt_regs *regs, long error)
931} 931}
932 932
933#ifdef CONFIG_X86_32 933#ifdef CONFIG_X86_32
934#ifdef CONFIG_X86_MCE
935dotraplinkage void __kprobes do_machine_check(struct pt_regs *regs, long error)
936{
937 conditional_sti(regs);
938 machine_check_vector(regs, error);
939}
940#endif
941
942dotraplinkage void do_iret_error(struct pt_regs *regs, long error_code) 934dotraplinkage void do_iret_error(struct pt_regs *regs, long error_code)
943{ 935{
944 siginfo_t info; 936 siginfo_t info;
diff --git a/arch/x86/kernel/xsave.c b/arch/x86/kernel/xsave.c
index 9abac8a9d823..b13acb75e822 100644
--- a/arch/x86/kernel/xsave.c
+++ b/arch/x86/kernel/xsave.c
@@ -248,7 +248,7 @@ clear:
248 * This will be saved when ever the FP and extended state context is 248 * This will be saved when ever the FP and extended state context is
249 * saved on the user stack during the signal handler delivery to the user. 249 * saved on the user stack during the signal handler delivery to the user.
250 */ 250 */
251void prepare_fx_sw_frame(void) 251static void prepare_fx_sw_frame(void)
252{ 252{
253 int size_extended = (xstate_size - sizeof(struct i387_fxsave_struct)) + 253 int size_extended = (xstate_size - sizeof(struct i387_fxsave_struct)) +
254 FP_XSTATE_MAGIC2_SIZE; 254 FP_XSTATE_MAGIC2_SIZE;
diff --git a/arch/x86/mm/memtest.c b/arch/x86/mm/memtest.c
index 672e17f8262a..9cab18b0b857 100644
--- a/arch/x86/mm/memtest.c
+++ b/arch/x86/mm/memtest.c
@@ -61,9 +61,9 @@ static void __init memtest(unsigned long start_phys, unsigned long size,
61 last_bad += incr; 61 last_bad += incr;
62 } else { 62 } else {
63 if (start_bad) { 63 if (start_bad) {
64 printk(KERN_CONT "\n %010lx bad mem addr %010lx - %010lx reserved", 64 printk(KERN_CONT "\n %016lx bad mem addr %010lx - %010lx reserved",
65 val, start_bad, last_bad + incr); 65 val, start_bad, last_bad + incr);
66 reserve_early(start_bad, last_bad - start_bad, "BAD RAM"); 66 reserve_early(start_bad, last_bad + incr, "BAD RAM");
67 } 67 }
68 start_bad = last_bad = start_phys_aligned; 68 start_bad = last_bad = start_phys_aligned;
69 } 69 }
@@ -72,9 +72,8 @@ static void __init memtest(unsigned long start_phys, unsigned long size,
72 if (start_bad) { 72 if (start_bad) {
73 printk(KERN_CONT "\n %016lx bad mem addr %010lx - %010lx reserved", 73 printk(KERN_CONT "\n %016lx bad mem addr %010lx - %010lx reserved",
74 val, start_bad, last_bad + incr); 74 val, start_bad, last_bad + incr);
75 reserve_early(start_bad, last_bad - start_bad, "BAD RAM"); 75 reserve_early(start_bad, last_bad + incr, "BAD RAM");
76 } 76 }
77
78} 77}
79 78
80/* default is disabled */ 79/* default is disabled */