aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/alpha/boot/Makefile16
-rw-r--r--arch/alpha/boot/main.c1
-rw-r--r--arch/alpha/boot/stdio.c306
-rw-r--r--arch/alpha/boot/tools/objstrip.c3
-rw-r--r--arch/alpha/include/asm/types.h1
-rw-r--r--arch/alpha/include/asm/unistd.h2
-rw-r--r--arch/alpha/include/uapi/asm/unistd.h3
-rw-r--r--arch/alpha/kernel/err_ev6.c1
-rw-r--r--arch/alpha/kernel/irq.c1
-rw-r--r--arch/alpha/kernel/osf_sys.c3
-rw-r--r--arch/alpha/kernel/process.c7
-rw-r--r--arch/alpha/kernel/smp.c8
-rw-r--r--arch/alpha/kernel/srmcons.c3
-rw-r--r--arch/alpha/kernel/sys_marvel.c2
-rw-r--r--arch/alpha/kernel/systbls.S3
-rw-r--r--arch/alpha/kernel/traps.c1
-rw-r--r--arch/alpha/oprofile/op_model_ev4.c1
-rw-r--r--arch/alpha/oprofile/op_model_ev5.c1
-rw-r--r--arch/alpha/oprofile/op_model_ev6.c1
-rw-r--r--arch/alpha/oprofile/op_model_ev67.c1
-rw-r--r--arch/x86/kernel/cpu/mcheck/mce.c7
-rw-r--r--arch/x86/kernel/i387.c15
22 files changed, 353 insertions, 34 deletions
diff --git a/arch/alpha/boot/Makefile b/arch/alpha/boot/Makefile
index cd143887380a..8399bd0e68e8 100644
--- a/arch/alpha/boot/Makefile
+++ b/arch/alpha/boot/Makefile
@@ -14,6 +14,9 @@ targets := vmlinux.gz vmlinux \
14 tools/bootpzh bootloader bootpheader bootpzheader 14 tools/bootpzh bootloader bootpheader bootpzheader
15OBJSTRIP := $(obj)/tools/objstrip 15OBJSTRIP := $(obj)/tools/objstrip
16 16
17HOSTCFLAGS := -Wall -I$(objtree)/usr/include
18BOOTCFLAGS += -I$(obj) -I$(srctree)/$(obj)
19
17# SRM bootable image. Copy to offset 512 of a partition. 20# SRM bootable image. Copy to offset 512 of a partition.
18$(obj)/bootimage: $(addprefix $(obj)/tools/,mkbb lxboot bootlx) $(obj)/vmlinux.nh 21$(obj)/bootimage: $(addprefix $(obj)/tools/,mkbb lxboot bootlx) $(obj)/vmlinux.nh
19 ( cat $(obj)/tools/lxboot $(obj)/tools/bootlx $(obj)/vmlinux.nh ) > $@ 22 ( cat $(obj)/tools/lxboot $(obj)/tools/bootlx $(obj)/vmlinux.nh ) > $@
@@ -96,13 +99,14 @@ $(obj)/tools/bootph: $(obj)/bootpheader $(OBJSTRIP) FORCE
96$(obj)/tools/bootpzh: $(obj)/bootpzheader $(OBJSTRIP) FORCE 99$(obj)/tools/bootpzh: $(obj)/bootpzheader $(OBJSTRIP) FORCE
97 $(call if_changed,objstrip) 100 $(call if_changed,objstrip)
98 101
99LDFLAGS_bootloader := -static -uvsprintf -T #-N -relax 102LDFLAGS_bootloader := -static -T # -N -relax
100LDFLAGS_bootpheader := -static -uvsprintf -T #-N -relax 103LDFLAGS_bootloader := -static -T # -N -relax
101LDFLAGS_bootpzheader := -static -uvsprintf -T #-N -relax 104LDFLAGS_bootpheader := -static -T # -N -relax
105LDFLAGS_bootpzheader := -static -T # -N -relax
102 106
103OBJ_bootlx := $(obj)/head.o $(obj)/main.o 107OBJ_bootlx := $(obj)/head.o $(obj)/stdio.o $(obj)/main.o
104OBJ_bootph := $(obj)/head.o $(obj)/bootp.o 108OBJ_bootph := $(obj)/head.o $(obj)/stdio.o $(obj)/bootp.o
105OBJ_bootpzh := $(obj)/head.o $(obj)/bootpz.o $(obj)/misc.o 109OBJ_bootpzh := $(obj)/head.o $(obj)/stdio.o $(obj)/bootpz.o $(obj)/misc.o
106 110
107$(obj)/bootloader: $(obj)/bootloader.lds $(OBJ_bootlx) $(LIBS_Y) FORCE 111$(obj)/bootloader: $(obj)/bootloader.lds $(OBJ_bootlx) $(LIBS_Y) FORCE
108 $(call if_changed,ld) 112 $(call if_changed,ld)
diff --git a/arch/alpha/boot/main.c b/arch/alpha/boot/main.c
index 3baf2d1e908d..dd6eb4a33582 100644
--- a/arch/alpha/boot/main.c
+++ b/arch/alpha/boot/main.c
@@ -19,7 +19,6 @@
19 19
20#include "ksize.h" 20#include "ksize.h"
21 21
22extern int vsprintf(char *, const char *, va_list);
23extern unsigned long switch_to_osf_pal(unsigned long nr, 22extern unsigned long switch_to_osf_pal(unsigned long nr,
24 struct pcb_struct * pcb_va, struct pcb_struct * pcb_pa, 23 struct pcb_struct * pcb_va, struct pcb_struct * pcb_pa,
25 unsigned long *vptb); 24 unsigned long *vptb);
diff --git a/arch/alpha/boot/stdio.c b/arch/alpha/boot/stdio.c
new file mode 100644
index 000000000000..f844dae8a54a
--- /dev/null
+++ b/arch/alpha/boot/stdio.c
@@ -0,0 +1,306 @@
1/*
2 * Copyright (C) Paul Mackerras 1997.
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version
7 * 2 of the License, or (at your option) any later version.
8 */
9#include <stdarg.h>
10#include <stddef.h>
11
12size_t strnlen(const char * s, size_t count)
13{
14 const char *sc;
15
16 for (sc = s; count-- && *sc != '\0'; ++sc)
17 /* nothing */;
18 return sc - s;
19}
20
21# define do_div(n, base) ({ \
22 unsigned int __base = (base); \
23 unsigned int __rem; \
24 __rem = ((unsigned long long)(n)) % __base; \
25 (n) = ((unsigned long long)(n)) / __base; \
26 __rem; \
27})
28
29
30static int skip_atoi(const char **s)
31{
32 int i, c;
33
34 for (i = 0; '0' <= (c = **s) && c <= '9'; ++*s)
35 i = i*10 + c - '0';
36 return i;
37}
38
39#define ZEROPAD 1 /* pad with zero */
40#define SIGN 2 /* unsigned/signed long */
41#define PLUS 4 /* show plus */
42#define SPACE 8 /* space if plus */
43#define LEFT 16 /* left justified */
44#define SPECIAL 32 /* 0x */
45#define LARGE 64 /* use 'ABCDEF' instead of 'abcdef' */
46
47static char * number(char * str, unsigned long long num, int base, int size, int precision, int type)
48{
49 char c,sign,tmp[66];
50 const char *digits="0123456789abcdefghijklmnopqrstuvwxyz";
51 int i;
52
53 if (type & LARGE)
54 digits = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
55 if (type & LEFT)
56 type &= ~ZEROPAD;
57 if (base < 2 || base > 36)
58 return 0;
59 c = (type & ZEROPAD) ? '0' : ' ';
60 sign = 0;
61 if (type & SIGN) {
62 if ((signed long long)num < 0) {
63 sign = '-';
64 num = - (signed long long)num;
65 size--;
66 } else if (type & PLUS) {
67 sign = '+';
68 size--;
69 } else if (type & SPACE) {
70 sign = ' ';
71 size--;
72 }
73 }
74 if (type & SPECIAL) {
75 if (base == 16)
76 size -= 2;
77 else if (base == 8)
78 size--;
79 }
80 i = 0;
81 if (num == 0)
82 tmp[i++]='0';
83 else while (num != 0) {
84 tmp[i++] = digits[do_div(num, base)];
85 }
86 if (i > precision)
87 precision = i;
88 size -= precision;
89 if (!(type&(ZEROPAD+LEFT)))
90 while(size-->0)
91 *str++ = ' ';
92 if (sign)
93 *str++ = sign;
94 if (type & SPECIAL) {
95 if (base==8)
96 *str++ = '0';
97 else if (base==16) {
98 *str++ = '0';
99 *str++ = digits[33];
100 }
101 }
102 if (!(type & LEFT))
103 while (size-- > 0)
104 *str++ = c;
105 while (i < precision--)
106 *str++ = '0';
107 while (i-- > 0)
108 *str++ = tmp[i];
109 while (size-- > 0)
110 *str++ = ' ';
111 return str;
112}
113
114int vsprintf(char *buf, const char *fmt, va_list args)
115{
116 int len;
117 unsigned long long num;
118 int i, base;
119 char * str;
120 const char *s;
121
122 int flags; /* flags to number() */
123
124 int field_width; /* width of output field */
125 int precision; /* min. # of digits for integers; max
126 number of chars for from string */
127 int qualifier; /* 'h', 'l', or 'L' for integer fields */
128 /* 'z' support added 23/7/1999 S.H. */
129 /* 'z' changed to 'Z' --davidm 1/25/99 */
130
131
132 for (str=buf ; *fmt ; ++fmt) {
133 if (*fmt != '%') {
134 *str++ = *fmt;
135 continue;
136 }
137
138 /* process flags */
139 flags = 0;
140 repeat:
141 ++fmt; /* this also skips first '%' */
142 switch (*fmt) {
143 case '-': flags |= LEFT; goto repeat;
144 case '+': flags |= PLUS; goto repeat;
145 case ' ': flags |= SPACE; goto repeat;
146 case '#': flags |= SPECIAL; goto repeat;
147 case '0': flags |= ZEROPAD; goto repeat;
148 }
149
150 /* get field width */
151 field_width = -1;
152 if ('0' <= *fmt && *fmt <= '9')
153 field_width = skip_atoi(&fmt);
154 else if (*fmt == '*') {
155 ++fmt;
156 /* it's the next argument */
157 field_width = va_arg(args, int);
158 if (field_width < 0) {
159 field_width = -field_width;
160 flags |= LEFT;
161 }
162 }
163
164 /* get the precision */
165 precision = -1;
166 if (*fmt == '.') {
167 ++fmt;
168 if ('0' <= *fmt && *fmt <= '9')
169 precision = skip_atoi(&fmt);
170 else if (*fmt == '*') {
171 ++fmt;
172 /* it's the next argument */
173 precision = va_arg(args, int);
174 }
175 if (precision < 0)
176 precision = 0;
177 }
178
179 /* get the conversion qualifier */
180 qualifier = -1;
181 if (*fmt == 'l' && *(fmt + 1) == 'l') {
182 qualifier = 'q';
183 fmt += 2;
184 } else if (*fmt == 'h' || *fmt == 'l' || *fmt == 'L'
185 || *fmt == 'Z') {
186 qualifier = *fmt;
187 ++fmt;
188 }
189
190 /* default base */
191 base = 10;
192
193 switch (*fmt) {
194 case 'c':
195 if (!(flags & LEFT))
196 while (--field_width > 0)
197 *str++ = ' ';
198 *str++ = (unsigned char) va_arg(args, int);
199 while (--field_width > 0)
200 *str++ = ' ';
201 continue;
202
203 case 's':
204 s = va_arg(args, char *);
205 if (!s)
206 s = "<NULL>";
207
208 len = strnlen(s, precision);
209
210 if (!(flags & LEFT))
211 while (len < field_width--)
212 *str++ = ' ';
213 for (i = 0; i < len; ++i)
214 *str++ = *s++;
215 while (len < field_width--)
216 *str++ = ' ';
217 continue;
218
219 case 'p':
220 if (field_width == -1) {
221 field_width = 2*sizeof(void *);
222 flags |= ZEROPAD;
223 }
224 str = number(str,
225 (unsigned long) va_arg(args, void *), 16,
226 field_width, precision, flags);
227 continue;
228
229
230 case 'n':
231 if (qualifier == 'l') {
232 long * ip = va_arg(args, long *);
233 *ip = (str - buf);
234 } else if (qualifier == 'Z') {
235 size_t * ip = va_arg(args, size_t *);
236 *ip = (str - buf);
237 } else {
238 int * ip = va_arg(args, int *);
239 *ip = (str - buf);
240 }
241 continue;
242
243 case '%':
244 *str++ = '%';
245 continue;
246
247 /* integer number formats - set up the flags and "break" */
248 case 'o':
249 base = 8;
250 break;
251
252 case 'X':
253 flags |= LARGE;
254 case 'x':
255 base = 16;
256 break;
257
258 case 'd':
259 case 'i':
260 flags |= SIGN;
261 case 'u':
262 break;
263
264 default:
265 *str++ = '%';
266 if (*fmt)
267 *str++ = *fmt;
268 else
269 --fmt;
270 continue;
271 }
272 if (qualifier == 'l') {
273 num = va_arg(args, unsigned long);
274 if (flags & SIGN)
275 num = (signed long) num;
276 } else if (qualifier == 'q') {
277 num = va_arg(args, unsigned long long);
278 if (flags & SIGN)
279 num = (signed long long) num;
280 } else if (qualifier == 'Z') {
281 num = va_arg(args, size_t);
282 } else if (qualifier == 'h') {
283 num = (unsigned short) va_arg(args, int);
284 if (flags & SIGN)
285 num = (signed short) num;
286 } else {
287 num = va_arg(args, unsigned int);
288 if (flags & SIGN)
289 num = (signed int) num;
290 }
291 str = number(str, num, base, field_width, precision, flags);
292 }
293 *str = '\0';
294 return str-buf;
295}
296
297int sprintf(char * buf, const char *fmt, ...)
298{
299 va_list args;
300 int i;
301
302 va_start(args, fmt);
303 i=vsprintf(buf,fmt,args);
304 va_end(args);
305 return i;
306}
diff --git a/arch/alpha/boot/tools/objstrip.c b/arch/alpha/boot/tools/objstrip.c
index 367d53d031fc..dee82695f48b 100644
--- a/arch/alpha/boot/tools/objstrip.c
+++ b/arch/alpha/boot/tools/objstrip.c
@@ -27,6 +27,9 @@
27#include <linux/param.h> 27#include <linux/param.h>
28#ifdef __ELF__ 28#ifdef __ELF__
29# include <linux/elf.h> 29# include <linux/elf.h>
30# define elfhdr elf64_hdr
31# define elf_phdr elf64_phdr
32# define elf_check_arch(x) ((x)->e_machine == EM_ALPHA)
30#endif 33#endif
31 34
32/* bootfile size must be multiple of BLOCK_SIZE: */ 35/* bootfile size must be multiple of BLOCK_SIZE: */
diff --git a/arch/alpha/include/asm/types.h b/arch/alpha/include/asm/types.h
index f61e1a56c378..4cb4b6d3452c 100644
--- a/arch/alpha/include/asm/types.h
+++ b/arch/alpha/include/asm/types.h
@@ -2,6 +2,5 @@
2#define _ALPHA_TYPES_H 2#define _ALPHA_TYPES_H
3 3
4#include <asm-generic/int-ll64.h> 4#include <asm-generic/int-ll64.h>
5#include <uapi/asm/types.h>
6 5
7#endif /* _ALPHA_TYPES_H */ 6#endif /* _ALPHA_TYPES_H */
diff --git a/arch/alpha/include/asm/unistd.h b/arch/alpha/include/asm/unistd.h
index c509d306db45..a56e608db2f9 100644
--- a/arch/alpha/include/asm/unistd.h
+++ b/arch/alpha/include/asm/unistd.h
@@ -3,7 +3,7 @@
3 3
4#include <uapi/asm/unistd.h> 4#include <uapi/asm/unistd.h>
5 5
6#define NR_SYSCALLS 511 6#define NR_SYSCALLS 514
7 7
8#define __ARCH_WANT_OLD_READDIR 8#define __ARCH_WANT_OLD_READDIR
9#define __ARCH_WANT_STAT64 9#define __ARCH_WANT_STAT64
diff --git a/arch/alpha/include/uapi/asm/unistd.h b/arch/alpha/include/uapi/asm/unistd.h
index d214a0358100..aa33bf5aacb6 100644
--- a/arch/alpha/include/uapi/asm/unistd.h
+++ b/arch/alpha/include/uapi/asm/unistd.h
@@ -472,5 +472,8 @@
472#define __NR_sched_setattr 508 472#define __NR_sched_setattr 508
473#define __NR_sched_getattr 509 473#define __NR_sched_getattr 509
474#define __NR_renameat2 510 474#define __NR_renameat2 510
475#define __NR_getrandom 511
476#define __NR_memfd_create 512
477#define __NR_execveat 513
475 478
476#endif /* _UAPI_ALPHA_UNISTD_H */ 479#endif /* _UAPI_ALPHA_UNISTD_H */
diff --git a/arch/alpha/kernel/err_ev6.c b/arch/alpha/kernel/err_ev6.c
index 253cf1a87481..51267ac5729b 100644
--- a/arch/alpha/kernel/err_ev6.c
+++ b/arch/alpha/kernel/err_ev6.c
@@ -6,7 +6,6 @@
6 * Error handling code supporting Alpha systems 6 * Error handling code supporting Alpha systems
7 */ 7 */
8 8
9#include <linux/init.h>
10#include <linux/sched.h> 9#include <linux/sched.h>
11 10
12#include <asm/io.h> 11#include <asm/io.h>
diff --git a/arch/alpha/kernel/irq.c b/arch/alpha/kernel/irq.c
index 7b2be251c30f..51f2c8654253 100644
--- a/arch/alpha/kernel/irq.c
+++ b/arch/alpha/kernel/irq.c
@@ -19,7 +19,6 @@
19#include <linux/ptrace.h> 19#include <linux/ptrace.h>
20#include <linux/interrupt.h> 20#include <linux/interrupt.h>
21#include <linux/random.h> 21#include <linux/random.h>
22#include <linux/init.h>
23#include <linux/irq.h> 22#include <linux/irq.h>
24#include <linux/proc_fs.h> 23#include <linux/proc_fs.h>
25#include <linux/seq_file.h> 24#include <linux/seq_file.h>
diff --git a/arch/alpha/kernel/osf_sys.c b/arch/alpha/kernel/osf_sys.c
index e51f578636a5..36dc91ace83a 100644
--- a/arch/alpha/kernel/osf_sys.c
+++ b/arch/alpha/kernel/osf_sys.c
@@ -1019,14 +1019,13 @@ SYSCALL_DEFINE2(osf_settimeofday, struct timeval32 __user *, tv,
1019 if (tv) { 1019 if (tv) {
1020 if (get_tv32((struct timeval *)&kts, tv)) 1020 if (get_tv32((struct timeval *)&kts, tv))
1021 return -EFAULT; 1021 return -EFAULT;
1022 kts.tv_nsec *= 1000;
1022 } 1023 }
1023 if (tz) { 1024 if (tz) {
1024 if (copy_from_user(&ktz, tz, sizeof(*tz))) 1025 if (copy_from_user(&ktz, tz, sizeof(*tz)))
1025 return -EFAULT; 1026 return -EFAULT;
1026 } 1027 }
1027 1028
1028 kts.tv_nsec *= 1000;
1029
1030 return do_sys_settimeofday(tv ? &kts : NULL, tz ? &ktz : NULL); 1029 return do_sys_settimeofday(tv ? &kts : NULL, tz ? &ktz : NULL);
1031} 1030}
1032 1031
diff --git a/arch/alpha/kernel/process.c b/arch/alpha/kernel/process.c
index 1941a07b5811..84d13263ce46 100644
--- a/arch/alpha/kernel/process.c
+++ b/arch/alpha/kernel/process.c
@@ -236,12 +236,11 @@ release_thread(struct task_struct *dead_task)
236} 236}
237 237
238/* 238/*
239 * Copy an alpha thread.. 239 * Copy architecture-specific thread state
240 */ 240 */
241
242int 241int
243copy_thread(unsigned long clone_flags, unsigned long usp, 242copy_thread(unsigned long clone_flags, unsigned long usp,
244 unsigned long arg, 243 unsigned long kthread_arg,
245 struct task_struct *p) 244 struct task_struct *p)
246{ 245{
247 extern void ret_from_fork(void); 246 extern void ret_from_fork(void);
@@ -262,7 +261,7 @@ copy_thread(unsigned long clone_flags, unsigned long usp,
262 sizeof(struct switch_stack) + sizeof(struct pt_regs)); 261 sizeof(struct switch_stack) + sizeof(struct pt_regs));
263 childstack->r26 = (unsigned long) ret_from_kernel_thread; 262 childstack->r26 = (unsigned long) ret_from_kernel_thread;
264 childstack->r9 = usp; /* function */ 263 childstack->r9 = usp; /* function */
265 childstack->r10 = arg; 264 childstack->r10 = kthread_arg;
266 childregs->hae = alpha_mv.hae_cache, 265 childregs->hae = alpha_mv.hae_cache,
267 childti->pcb.usp = 0; 266 childti->pcb.usp = 0;
268 return 0; 267 return 0;
diff --git a/arch/alpha/kernel/smp.c b/arch/alpha/kernel/smp.c
index 99ac36d5de4e..2f24447fef92 100644
--- a/arch/alpha/kernel/smp.c
+++ b/arch/alpha/kernel/smp.c
@@ -63,7 +63,6 @@ static struct {
63enum ipi_message_type { 63enum ipi_message_type {
64 IPI_RESCHEDULE, 64 IPI_RESCHEDULE,
65 IPI_CALL_FUNC, 65 IPI_CALL_FUNC,
66 IPI_CALL_FUNC_SINGLE,
67 IPI_CPU_STOP, 66 IPI_CPU_STOP,
68}; 67};
69 68
@@ -506,7 +505,6 @@ setup_profiling_timer(unsigned int multiplier)
506 return -EINVAL; 505 return -EINVAL;
507} 506}
508 507
509
510static void 508static void
511send_ipi_message(const struct cpumask *to_whom, enum ipi_message_type operation) 509send_ipi_message(const struct cpumask *to_whom, enum ipi_message_type operation)
512{ 510{
@@ -552,10 +550,6 @@ handle_ipi(struct pt_regs *regs)
552 generic_smp_call_function_interrupt(); 550 generic_smp_call_function_interrupt();
553 break; 551 break;
554 552
555 case IPI_CALL_FUNC_SINGLE:
556 generic_smp_call_function_single_interrupt();
557 break;
558
559 case IPI_CPU_STOP: 553 case IPI_CPU_STOP:
560 halt(); 554 halt();
561 555
@@ -606,7 +600,7 @@ void arch_send_call_function_ipi_mask(const struct cpumask *mask)
606 600
607void arch_send_call_function_single_ipi(int cpu) 601void arch_send_call_function_single_ipi(int cpu)
608{ 602{
609 send_ipi_message(cpumask_of(cpu), IPI_CALL_FUNC_SINGLE); 603 send_ipi_message(cpumask_of(cpu), IPI_CALL_FUNC);
610} 604}
611 605
612static void 606static void
diff --git a/arch/alpha/kernel/srmcons.c b/arch/alpha/kernel/srmcons.c
index 6f01d9ad7b81..72b59511e59a 100644
--- a/arch/alpha/kernel/srmcons.c
+++ b/arch/alpha/kernel/srmcons.c
@@ -237,8 +237,7 @@ srmcons_init(void)
237 237
238 return -ENODEV; 238 return -ENODEV;
239} 239}
240 240device_initcall(srmcons_init);
241module_init(srmcons_init);
242 241
243 242
244/* 243/*
diff --git a/arch/alpha/kernel/sys_marvel.c b/arch/alpha/kernel/sys_marvel.c
index f21d61fab678..24e41bd7d3c9 100644
--- a/arch/alpha/kernel/sys_marvel.c
+++ b/arch/alpha/kernel/sys_marvel.c
@@ -331,7 +331,7 @@ marvel_map_irq(const struct pci_dev *cdev, u8 slot, u8 pin)
331 pci_read_config_byte(dev, PCI_INTERRUPT_LINE, &intline); 331 pci_read_config_byte(dev, PCI_INTERRUPT_LINE, &intline);
332 irq = intline; 332 irq = intline;
333 333
334 msi_loc = pci_find_capability(dev, PCI_CAP_ID_MSI); 334 msi_loc = dev->msi_cap;
335 msg_ctl = 0; 335 msg_ctl = 0;
336 if (msi_loc) 336 if (msi_loc)
337 pci_read_config_word(dev, msi_loc + PCI_MSI_FLAGS, &msg_ctl); 337 pci_read_config_word(dev, msi_loc + PCI_MSI_FLAGS, &msg_ctl);
diff --git a/arch/alpha/kernel/systbls.S b/arch/alpha/kernel/systbls.S
index 24789713f1ea..9b62e3fd4f03 100644
--- a/arch/alpha/kernel/systbls.S
+++ b/arch/alpha/kernel/systbls.S
@@ -529,6 +529,9 @@ sys_call_table:
529 .quad sys_sched_setattr 529 .quad sys_sched_setattr
530 .quad sys_sched_getattr 530 .quad sys_sched_getattr
531 .quad sys_renameat2 /* 510 */ 531 .quad sys_renameat2 /* 510 */
532 .quad sys_getrandom
533 .quad sys_memfd_create
534 .quad sys_execveat
532 535
533 .size sys_call_table, . - sys_call_table 536 .size sys_call_table, . - sys_call_table
534 .type sys_call_table, @object 537 .type sys_call_table, @object
diff --git a/arch/alpha/kernel/traps.c b/arch/alpha/kernel/traps.c
index 9c4c189eb22f..74aceead06e9 100644
--- a/arch/alpha/kernel/traps.c
+++ b/arch/alpha/kernel/traps.c
@@ -14,7 +14,6 @@
14#include <linux/tty.h> 14#include <linux/tty.h>
15#include <linux/delay.h> 15#include <linux/delay.h>
16#include <linux/module.h> 16#include <linux/module.h>
17#include <linux/init.h>
18#include <linux/kallsyms.h> 17#include <linux/kallsyms.h>
19#include <linux/ratelimit.h> 18#include <linux/ratelimit.h>
20 19
diff --git a/arch/alpha/oprofile/op_model_ev4.c b/arch/alpha/oprofile/op_model_ev4.c
index 18aa9b4f94f1..086a0d5445c5 100644
--- a/arch/alpha/oprofile/op_model_ev4.c
+++ b/arch/alpha/oprofile/op_model_ev4.c
@@ -8,7 +8,6 @@
8 */ 8 */
9 9
10#include <linux/oprofile.h> 10#include <linux/oprofile.h>
11#include <linux/init.h>
12#include <linux/smp.h> 11#include <linux/smp.h>
13#include <asm/ptrace.h> 12#include <asm/ptrace.h>
14 13
diff --git a/arch/alpha/oprofile/op_model_ev5.c b/arch/alpha/oprofile/op_model_ev5.c
index c32f8a0ad925..c300f5ef3482 100644
--- a/arch/alpha/oprofile/op_model_ev5.c
+++ b/arch/alpha/oprofile/op_model_ev5.c
@@ -8,7 +8,6 @@
8 */ 8 */
9 9
10#include <linux/oprofile.h> 10#include <linux/oprofile.h>
11#include <linux/init.h>
12#include <linux/smp.h> 11#include <linux/smp.h>
13#include <asm/ptrace.h> 12#include <asm/ptrace.h>
14 13
diff --git a/arch/alpha/oprofile/op_model_ev6.c b/arch/alpha/oprofile/op_model_ev6.c
index 1c84cc257fc7..02edf5971614 100644
--- a/arch/alpha/oprofile/op_model_ev6.c
+++ b/arch/alpha/oprofile/op_model_ev6.c
@@ -8,7 +8,6 @@
8 */ 8 */
9 9
10#include <linux/oprofile.h> 10#include <linux/oprofile.h>
11#include <linux/init.h>
12#include <linux/smp.h> 11#include <linux/smp.h>
13#include <asm/ptrace.h> 12#include <asm/ptrace.h>
14 13
diff --git a/arch/alpha/oprofile/op_model_ev67.c b/arch/alpha/oprofile/op_model_ev67.c
index 34a57a126553..adb1744d20f3 100644
--- a/arch/alpha/oprofile/op_model_ev67.c
+++ b/arch/alpha/oprofile/op_model_ev67.c
@@ -9,7 +9,6 @@
9 */ 9 */
10 10
11#include <linux/oprofile.h> 11#include <linux/oprofile.h>
12#include <linux/init.h>
13#include <linux/smp.h> 12#include <linux/smp.h>
14#include <asm/ptrace.h> 13#include <asm/ptrace.h>
15 14
diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c
index e535533d5ab8..20190bdac9d5 100644
--- a/arch/x86/kernel/cpu/mcheck/mce.c
+++ b/arch/x86/kernel/cpu/mcheck/mce.c
@@ -708,6 +708,7 @@ static int mce_no_way_out(struct mce *m, char **msg, unsigned long *validp,
708 struct pt_regs *regs) 708 struct pt_regs *regs)
709{ 709{
710 int i, ret = 0; 710 int i, ret = 0;
711 char *tmp;
711 712
712 for (i = 0; i < mca_cfg.banks; i++) { 713 for (i = 0; i < mca_cfg.banks; i++) {
713 m->status = mce_rdmsrl(MSR_IA32_MCx_STATUS(i)); 714 m->status = mce_rdmsrl(MSR_IA32_MCx_STATUS(i));
@@ -716,9 +717,11 @@ static int mce_no_way_out(struct mce *m, char **msg, unsigned long *validp,
716 if (quirk_no_way_out) 717 if (quirk_no_way_out)
717 quirk_no_way_out(i, m, regs); 718 quirk_no_way_out(i, m, regs);
718 } 719 }
719 if (mce_severity(m, mca_cfg.tolerant, msg, true) >= 720
720 MCE_PANIC_SEVERITY) 721 if (mce_severity(m, mca_cfg.tolerant, &tmp, true) >= MCE_PANIC_SEVERITY) {
722 *msg = tmp;
721 ret = 1; 723 ret = 1;
724 }
722 } 725 }
723 return ret; 726 return ret;
724} 727}
diff --git a/arch/x86/kernel/i387.c b/arch/x86/kernel/i387.c
index 009183276bb7..6185d3141219 100644
--- a/arch/x86/kernel/i387.c
+++ b/arch/x86/kernel/i387.c
@@ -173,6 +173,21 @@ static void init_thread_xstate(void)
173 xstate_size = sizeof(struct i387_fxsave_struct); 173 xstate_size = sizeof(struct i387_fxsave_struct);
174 else 174 else
175 xstate_size = sizeof(struct i387_fsave_struct); 175 xstate_size = sizeof(struct i387_fsave_struct);
176
177 /*
178 * Quirk: we don't yet handle the XSAVES* instructions
179 * correctly, as we don't correctly convert between
180 * standard and compacted format when interfacing
181 * with user-space - so disable it for now.
182 *
183 * The difference is small: with recent CPUs the
184 * compacted format is only marginally smaller than
185 * the standard FPU state format.
186 *
187 * ( This is easy to backport while we are fixing
188 * XSAVES* support. )
189 */
190 setup_clear_cpu_cap(X86_FEATURE_XSAVES);
176} 191}
177 192
178/* 193/*