Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mattst88/alpha

Pull alpha updates from Matt Turner:
"Please pull a small collection of patches that I've been neglecting.

Probably most importantly are the patches that wire up the new
syscalls needed by udev and the fix to the bootp{,z}file targets"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mattst88/alpha:
alpha: kernel: osf_sys: Set 'kts.tv_nsec' only when 'tv' has effect
alpha: Wire up all missing implemented syscalls
alpha: Fix bootpfile and bootpzfile make targets
alpha: copy_thread(): rename 'arg' argument to 'kthread_arg'
alpha: delete non-required instances of <linux/init.h>
alpha: don't use module_init for non-modular core code
smp, alpha: kill SMP single function call interrupt
alpha: Remove #include <uapi/asm/types.h> from <asm/types.h>
alpha: clean up unnecessary MSI/MSI-X capability find

+333 -32
+10 -6
arch/alpha/boot/Makefile
··· 14 14 tools/bootpzh bootloader bootpheader bootpzheader 15 15 OBJSTRIP := $(obj)/tools/objstrip 16 16 17 + HOSTCFLAGS := -Wall -I$(objtree)/usr/include 18 + BOOTCFLAGS += -I$(obj) -I$(srctree)/$(obj) 19 + 17 20 # SRM bootable image. Copy to offset 512 of a partition. 18 21 $(obj)/bootimage: $(addprefix $(obj)/tools/,mkbb lxboot bootlx) $(obj)/vmlinux.nh 19 22 ( cat $(obj)/tools/lxboot $(obj)/tools/bootlx $(obj)/vmlinux.nh ) > $@ ··· 99 96 $(obj)/tools/bootpzh: $(obj)/bootpzheader $(OBJSTRIP) FORCE 100 97 $(call if_changed,objstrip) 101 98 102 - LDFLAGS_bootloader := -static -uvsprintf -T #-N -relax 103 - LDFLAGS_bootpheader := -static -uvsprintf -T #-N -relax 104 - LDFLAGS_bootpzheader := -static -uvsprintf -T #-N -relax 99 + LDFLAGS_bootloader := -static -T # -N -relax 100 + LDFLAGS_bootloader := -static -T # -N -relax 101 + LDFLAGS_bootpheader := -static -T # -N -relax 102 + LDFLAGS_bootpzheader := -static -T # -N -relax 105 103 106 - OBJ_bootlx := $(obj)/head.o $(obj)/main.o 107 - OBJ_bootph := $(obj)/head.o $(obj)/bootp.o 108 - OBJ_bootpzh := $(obj)/head.o $(obj)/bootpz.o $(obj)/misc.o 104 + OBJ_bootlx := $(obj)/head.o $(obj)/stdio.o $(obj)/main.o 105 + OBJ_bootph := $(obj)/head.o $(obj)/stdio.o $(obj)/bootp.o 106 + OBJ_bootpzh := $(obj)/head.o $(obj)/stdio.o $(obj)/bootpz.o $(obj)/misc.o 109 107 110 108 $(obj)/bootloader: $(obj)/bootloader.lds $(OBJ_bootlx) $(LIBS_Y) FORCE 111 109 $(call if_changed,ld)
-1
arch/alpha/boot/main.c
··· 19 19 20 20 #include "ksize.h" 21 21 22 - extern int vsprintf(char *, const char *, va_list); 23 22 extern unsigned long switch_to_osf_pal(unsigned long nr, 24 23 struct pcb_struct * pcb_va, struct pcb_struct * pcb_pa, 25 24 unsigned long *vptb);
+306
arch/alpha/boot/stdio.c
··· 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 + 12 + size_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 + 30 + static 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 + 47 + static 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 + 114 + int 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 + 297 + int 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 + }
+3
arch/alpha/boot/tools/objstrip.c
··· 27 27 #include <linux/param.h> 28 28 #ifdef __ELF__ 29 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 33 #endif 31 34 32 35 /* bootfile size must be multiple of BLOCK_SIZE: */
-1
arch/alpha/include/asm/types.h
··· 2 2 #define _ALPHA_TYPES_H 3 3 4 4 #include <asm-generic/int-ll64.h> 5 - #include <uapi/asm/types.h> 6 5 7 6 #endif /* _ALPHA_TYPES_H */
+1 -1
arch/alpha/include/asm/unistd.h
··· 3 3 4 4 #include <uapi/asm/unistd.h> 5 5 6 - #define NR_SYSCALLS 511 6 + #define NR_SYSCALLS 514 7 7 8 8 #define __ARCH_WANT_OLD_READDIR 9 9 #define __ARCH_WANT_STAT64
+3
arch/alpha/include/uapi/asm/unistd.h
··· 472 472 #define __NR_sched_setattr 508 473 473 #define __NR_sched_getattr 509 474 474 #define __NR_renameat2 510 475 + #define __NR_getrandom 511 476 + #define __NR_memfd_create 512 477 + #define __NR_execveat 513 475 478 476 479 #endif /* _UAPI_ALPHA_UNISTD_H */
-1
arch/alpha/kernel/err_ev6.c
··· 6 6 * Error handling code supporting Alpha systems 7 7 */ 8 8 9 - #include <linux/init.h> 10 9 #include <linux/sched.h> 11 10 12 11 #include <asm/io.h>
-1
arch/alpha/kernel/irq.c
··· 19 19 #include <linux/ptrace.h> 20 20 #include <linux/interrupt.h> 21 21 #include <linux/random.h> 22 - #include <linux/init.h> 23 22 #include <linux/irq.h> 24 23 #include <linux/proc_fs.h> 25 24 #include <linux/seq_file.h>
+1 -2
arch/alpha/kernel/osf_sys.c
··· 1019 1019 if (tv) { 1020 1020 if (get_tv32((struct timeval *)&kts, tv)) 1021 1021 return -EFAULT; 1022 + kts.tv_nsec *= 1000; 1022 1023 } 1023 1024 if (tz) { 1024 1025 if (copy_from_user(&ktz, tz, sizeof(*tz))) 1025 1026 return -EFAULT; 1026 1027 } 1027 - 1028 - kts.tv_nsec *= 1000; 1029 1028 1030 1029 return do_sys_settimeofday(tv ? &kts : NULL, tz ? &ktz : NULL); 1031 1030 }
+3 -4
arch/alpha/kernel/process.c
··· 236 236 } 237 237 238 238 /* 239 - * Copy an alpha thread.. 239 + * Copy architecture-specific thread state 240 240 */ 241 - 242 241 int 243 242 copy_thread(unsigned long clone_flags, unsigned long usp, 244 - unsigned long arg, 243 + unsigned long kthread_arg, 245 244 struct task_struct *p) 246 245 { 247 246 extern void ret_from_fork(void); ··· 261 262 sizeof(struct switch_stack) + sizeof(struct pt_regs)); 262 263 childstack->r26 = (unsigned long) ret_from_kernel_thread; 263 264 childstack->r9 = usp; /* function */ 264 - childstack->r10 = arg; 265 + childstack->r10 = kthread_arg; 265 266 childregs->hae = alpha_mv.hae_cache, 266 267 childti->pcb.usp = 0; 267 268 return 0;
+1 -7
arch/alpha/kernel/smp.c
··· 63 63 enum ipi_message_type { 64 64 IPI_RESCHEDULE, 65 65 IPI_CALL_FUNC, 66 - IPI_CALL_FUNC_SINGLE, 67 66 IPI_CPU_STOP, 68 67 }; 69 68 ··· 505 506 return -EINVAL; 506 507 } 507 508 508 - 509 509 static void 510 510 send_ipi_message(const struct cpumask *to_whom, enum ipi_message_type operation) 511 511 { ··· 548 550 549 551 case IPI_CALL_FUNC: 550 552 generic_smp_call_function_interrupt(); 551 - break; 552 - 553 - case IPI_CALL_FUNC_SINGLE: 554 - generic_smp_call_function_single_interrupt(); 555 553 break; 556 554 557 555 case IPI_CPU_STOP: ··· 600 606 601 607 void arch_send_call_function_single_ipi(int cpu) 602 608 { 603 - send_ipi_message(cpumask_of(cpu), IPI_CALL_FUNC_SINGLE); 609 + send_ipi_message(cpumask_of(cpu), IPI_CALL_FUNC); 604 610 } 605 611 606 612 static void
+1 -2
arch/alpha/kernel/srmcons.c
··· 237 237 238 238 return -ENODEV; 239 239 } 240 - 241 - module_init(srmcons_init); 240 + device_initcall(srmcons_init); 242 241 243 242 244 243 /*
+1 -1
arch/alpha/kernel/sys_marvel.c
··· 331 331 pci_read_config_byte(dev, PCI_INTERRUPT_LINE, &intline); 332 332 irq = intline; 333 333 334 - msi_loc = pci_find_capability(dev, PCI_CAP_ID_MSI); 334 + msi_loc = dev->msi_cap; 335 335 msg_ctl = 0; 336 336 if (msi_loc) 337 337 pci_read_config_word(dev, msi_loc + PCI_MSI_FLAGS, &msg_ctl);
+3
arch/alpha/kernel/systbls.S
··· 529 529 .quad sys_sched_setattr 530 530 .quad sys_sched_getattr 531 531 .quad sys_renameat2 /* 510 */ 532 + .quad sys_getrandom 533 + .quad sys_memfd_create 534 + .quad sys_execveat 532 535 533 536 .size sys_call_table, . - sys_call_table 534 537 .type sys_call_table, @object
-1
arch/alpha/kernel/traps.c
··· 14 14 #include <linux/tty.h> 15 15 #include <linux/delay.h> 16 16 #include <linux/module.h> 17 - #include <linux/init.h> 18 17 #include <linux/kallsyms.h> 19 18 #include <linux/ratelimit.h> 20 19
-1
arch/alpha/oprofile/op_model_ev4.c
··· 8 8 */ 9 9 10 10 #include <linux/oprofile.h> 11 - #include <linux/init.h> 12 11 #include <linux/smp.h> 13 12 #include <asm/ptrace.h> 14 13
-1
arch/alpha/oprofile/op_model_ev5.c
··· 8 8 */ 9 9 10 10 #include <linux/oprofile.h> 11 - #include <linux/init.h> 12 11 #include <linux/smp.h> 13 12 #include <asm/ptrace.h> 14 13
-1
arch/alpha/oprofile/op_model_ev6.c
··· 8 8 */ 9 9 10 10 #include <linux/oprofile.h> 11 - #include <linux/init.h> 12 11 #include <linux/smp.h> 13 12 #include <asm/ptrace.h> 14 13
-1
arch/alpha/oprofile/op_model_ev67.c
··· 9 9 */ 10 10 11 11 #include <linux/oprofile.h> 12 - #include <linux/init.h> 13 12 #include <linux/smp.h> 14 13 #include <asm/ptrace.h> 15 14