aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-08-30 17:54:24 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2017-08-30 17:54:24 -0400
commitdd689a68bc3551ad7bdff2c881fede5f0bd12cfa (patch)
treea24dc60a677c9815ca5daf3a4ec0a74715e31e97
parent36fde05f3fb51edea879636db590d70e11f16c82 (diff)
parentcec80d82142ab25c71eee24b529cfeaf17c43062 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mattst88/alpha
Pull alpha update from Matt Turner: "A few fixes and wires up some additional syscalls." [ Some of this is technically not really rc7 material, but it's alpha, and it all looks safe anyway. Matt explains: "My alpha has been offline, hence the very late-in-cycle pull request" and hasn't caused problems before, so he gets to slide. - Linus ] * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mattst88/alpha: alpha: uapi: Add support for __SANE_USERSPACE_TYPES__ alpha: Define ioremap_wc alpha: Fix section mismatches alpha: support R_ALPHA_REFLONG relocations for module loading alpha: Fix typo in ev6-copy_user.S alpha: Package string routines together alpha: Update for new syscalls alpha: Fix build error without CONFIG_VGA_HOSE.
-rw-r--r--arch/alpha/include/asm/io.h1
-rw-r--r--arch/alpha/include/asm/types.h2
-rw-r--r--arch/alpha/include/asm/unistd.h2
-rw-r--r--arch/alpha/include/uapi/asm/types.h12
-rw-r--r--arch/alpha/include/uapi/asm/unistd.h14
-rw-r--r--arch/alpha/kernel/core_marvel.c6
-rw-r--r--arch/alpha/kernel/core_titan.c2
-rw-r--r--arch/alpha/kernel/module.c3
-rw-r--r--arch/alpha/kernel/smp.c2
-rw-r--r--arch/alpha/kernel/systbls.S9
-rw-r--r--arch/alpha/lib/Makefile22
-rw-r--r--arch/alpha/lib/copy_user.S2
-rw-r--r--arch/alpha/lib/ev6-copy_user.S7
13 files changed, 68 insertions, 16 deletions
diff --git a/arch/alpha/include/asm/io.h b/arch/alpha/include/asm/io.h
index ff4049155c84..4d61d2a50c52 100644
--- a/arch/alpha/include/asm/io.h
+++ b/arch/alpha/include/asm/io.h
@@ -299,6 +299,7 @@ static inline void __iomem * ioremap_nocache(unsigned long offset,
299 return ioremap(offset, size); 299 return ioremap(offset, size);
300} 300}
301 301
302#define ioremap_wc ioremap_nocache
302#define ioremap_uc ioremap_nocache 303#define ioremap_uc ioremap_nocache
303 304
304static inline void iounmap(volatile void __iomem *addr) 305static inline void iounmap(volatile void __iomem *addr)
diff --git a/arch/alpha/include/asm/types.h b/arch/alpha/include/asm/types.h
index 4cb4b6d3452c..0bc66e1d3a7e 100644
--- a/arch/alpha/include/asm/types.h
+++ b/arch/alpha/include/asm/types.h
@@ -1,6 +1,6 @@
1#ifndef _ALPHA_TYPES_H 1#ifndef _ALPHA_TYPES_H
2#define _ALPHA_TYPES_H 2#define _ALPHA_TYPES_H
3 3
4#include <asm-generic/int-ll64.h> 4#include <uapi/asm/types.h>
5 5
6#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 b37153ecf2ac..db7fc0f511e2 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 514 6#define NR_SYSCALLS 523
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/types.h b/arch/alpha/include/uapi/asm/types.h
index 9fd3cd459777..8d1024d7be05 100644
--- a/arch/alpha/include/uapi/asm/types.h
+++ b/arch/alpha/include/uapi/asm/types.h
@@ -9,8 +9,18 @@
9 * need to be careful to avoid a name clashes. 9 * need to be careful to avoid a name clashes.
10 */ 10 */
11 11
12#ifndef __KERNEL__ 12/*
13 * This is here because we used to use l64 for alpha
14 * and we don't want to impact user mode with our change to ll64
15 * in the kernel.
16 *
17 * However, some user programs are fine with this. They can
18 * flag __SANE_USERSPACE_TYPES__ to get int-ll64.h here.
19 */
20#if !defined(__SANE_USERSPACE_TYPES__) && !defined(__KERNEL__)
13#include <asm-generic/int-l64.h> 21#include <asm-generic/int-l64.h>
22#else
23#include <asm-generic/int-ll64.h>
14#endif 24#endif
15 25
16#endif /* _UAPI_ALPHA_TYPES_H */ 26#endif /* _UAPI_ALPHA_TYPES_H */
diff --git a/arch/alpha/include/uapi/asm/unistd.h b/arch/alpha/include/uapi/asm/unistd.h
index aa33bf5aacb6..a2945fea6c86 100644
--- a/arch/alpha/include/uapi/asm/unistd.h
+++ b/arch/alpha/include/uapi/asm/unistd.h
@@ -475,5 +475,19 @@
475#define __NR_getrandom 511 475#define __NR_getrandom 511
476#define __NR_memfd_create 512 476#define __NR_memfd_create 512
477#define __NR_execveat 513 477#define __NR_execveat 513
478#define __NR_seccomp 514
479#define __NR_bpf 515
480#define __NR_userfaultfd 516
481#define __NR_membarrier 517
482#define __NR_mlock2 518
483#define __NR_copy_file_range 519
484#define __NR_preadv2 520
485#define __NR_pwritev2 521
486#define __NR_statx 522
487
488/* Alpha doesn't have protection keys. */
489#define __IGNORE_pkey_mprotect
490#define __IGNORE_pkey_alloc
491#define __IGNORE_pkey_free
478 492
479#endif /* _UAPI_ALPHA_UNISTD_H */ 493#endif /* _UAPI_ALPHA_UNISTD_H */
diff --git a/arch/alpha/kernel/core_marvel.c b/arch/alpha/kernel/core_marvel.c
index d5f0580746a5..03ff832b1cb4 100644
--- a/arch/alpha/kernel/core_marvel.c
+++ b/arch/alpha/kernel/core_marvel.c
@@ -351,7 +351,7 @@ marvel_init_io7(struct io7 *io7)
351 } 351 }
352} 352}
353 353
354void 354void __init
355marvel_io7_present(gct6_node *node) 355marvel_io7_present(gct6_node *node)
356{ 356{
357 int pe; 357 int pe;
@@ -369,6 +369,7 @@ marvel_io7_present(gct6_node *node)
369static void __init 369static void __init
370marvel_find_console_vga_hose(void) 370marvel_find_console_vga_hose(void)
371{ 371{
372#ifdef CONFIG_VGA_HOSE
372 u64 *pu64 = (u64 *)((u64)hwrpb + hwrpb->ctbt_offset); 373 u64 *pu64 = (u64 *)((u64)hwrpb + hwrpb->ctbt_offset);
373 374
374 if (pu64[7] == 3) { /* TERM_TYPE == graphics */ 375 if (pu64[7] == 3) { /* TERM_TYPE == graphics */
@@ -402,9 +403,10 @@ marvel_find_console_vga_hose(void)
402 pci_vga_hose = hose; 403 pci_vga_hose = hose;
403 } 404 }
404 } 405 }
406#endif
405} 407}
406 408
407gct6_search_struct gct_wanted_node_list[] = { 409gct6_search_struct gct_wanted_node_list[] __initdata = {
408 { GCT_TYPE_HOSE, GCT_SUBTYPE_IO_PORT_MODULE, marvel_io7_present }, 410 { GCT_TYPE_HOSE, GCT_SUBTYPE_IO_PORT_MODULE, marvel_io7_present },
409 { 0, 0, NULL } 411 { 0, 0, NULL }
410}; 412};
diff --git a/arch/alpha/kernel/core_titan.c b/arch/alpha/kernel/core_titan.c
index 219bf271c0ba..b532d925443d 100644
--- a/arch/alpha/kernel/core_titan.c
+++ b/arch/alpha/kernel/core_titan.c
@@ -461,6 +461,7 @@ titan_ioremap(unsigned long addr, unsigned long size)
461 unsigned long *ptes; 461 unsigned long *ptes;
462 unsigned long pfn; 462 unsigned long pfn;
463 463
464#ifdef CONFIG_VGA_HOSE
464 /* 465 /*
465 * Adjust the address and hose, if necessary. 466 * Adjust the address and hose, if necessary.
466 */ 467 */
@@ -468,6 +469,7 @@ titan_ioremap(unsigned long addr, unsigned long size)
468 h = pci_vga_hose->index; 469 h = pci_vga_hose->index;
469 addr += pci_vga_hose->mem_space->start; 470 addr += pci_vga_hose->mem_space->start;
470 } 471 }
472#endif
471 473
472 /* 474 /*
473 * Find the hose. 475 * Find the hose.
diff --git a/arch/alpha/kernel/module.c b/arch/alpha/kernel/module.c
index 936bc8f89a67..47632fa8c24e 100644
--- a/arch/alpha/kernel/module.c
+++ b/arch/alpha/kernel/module.c
@@ -181,6 +181,9 @@ apply_relocate_add(Elf64_Shdr *sechdrs, const char *strtab,
181 switch (r_type) { 181 switch (r_type) {
182 case R_ALPHA_NONE: 182 case R_ALPHA_NONE:
183 break; 183 break;
184 case R_ALPHA_REFLONG:
185 *(u32 *)location = value;
186 break;
184 case R_ALPHA_REFQUAD: 187 case R_ALPHA_REFQUAD:
185 /* BUG() can produce misaligned relocations. */ 188 /* BUG() can produce misaligned relocations. */
186 ((u32 *)location)[0] = value; 189 ((u32 *)location)[0] = value;
diff --git a/arch/alpha/kernel/smp.c b/arch/alpha/kernel/smp.c
index 9fc560459ebd..f6726a746427 100644
--- a/arch/alpha/kernel/smp.c
+++ b/arch/alpha/kernel/smp.c
@@ -115,7 +115,7 @@ wait_boot_cpu_to_stop(int cpuid)
115/* 115/*
116 * Where secondaries begin a life of C. 116 * Where secondaries begin a life of C.
117 */ 117 */
118void 118void __init
119smp_callin(void) 119smp_callin(void)
120{ 120{
121 int cpuid = hard_smp_processor_id(); 121 int cpuid = hard_smp_processor_id();
diff --git a/arch/alpha/kernel/systbls.S b/arch/alpha/kernel/systbls.S
index 9b62e3fd4f03..5b4514abb234 100644
--- a/arch/alpha/kernel/systbls.S
+++ b/arch/alpha/kernel/systbls.S
@@ -532,6 +532,15 @@ sys_call_table:
532 .quad sys_getrandom 532 .quad sys_getrandom
533 .quad sys_memfd_create 533 .quad sys_memfd_create
534 .quad sys_execveat 534 .quad sys_execveat
535 .quad sys_seccomp
536 .quad sys_bpf /* 515 */
537 .quad sys_userfaultfd
538 .quad sys_membarrier
539 .quad sys_mlock2
540 .quad sys_copy_file_range
541 .quad sys_preadv2 /* 520 */
542 .quad sys_pwritev2
543 .quad sys_statx
535 544
536 .size sys_call_table, . - sys_call_table 545 .size sys_call_table, . - sys_call_table
537 .type sys_call_table, @object 546 .type sys_call_table, @object
diff --git a/arch/alpha/lib/Makefile b/arch/alpha/lib/Makefile
index 7083434dd241..a80815960364 100644
--- a/arch/alpha/lib/Makefile
+++ b/arch/alpha/lib/Makefile
@@ -20,12 +20,8 @@ lib-y = __divqu.o __remqu.o __divlu.o __remlu.o \
20 checksum.o \ 20 checksum.o \
21 csum_partial_copy.o \ 21 csum_partial_copy.o \
22 $(ev67-y)strlen.o \ 22 $(ev67-y)strlen.o \
23 $(ev67-y)strcat.o \ 23 stycpy.o \
24 strcpy.o \ 24 styncpy.o \
25 $(ev67-y)strncat.o \
26 strncpy.o \
27 $(ev6-y)stxcpy.o \
28 $(ev6-y)stxncpy.o \
29 $(ev67-y)strchr.o \ 25 $(ev67-y)strchr.o \
30 $(ev67-y)strrchr.o \ 26 $(ev67-y)strrchr.o \
31 $(ev6-y)memchr.o \ 27 $(ev6-y)memchr.o \
@@ -49,3 +45,17 @@ AFLAGS___remlu.o = -DREM -DINTSIZE
49$(addprefix $(obj)/,__divqu.o __remqu.o __divlu.o __remlu.o): \ 45$(addprefix $(obj)/,__divqu.o __remqu.o __divlu.o __remlu.o): \
50 $(src)/$(ev6-y)divide.S FORCE 46 $(src)/$(ev6-y)divide.S FORCE
51 $(call if_changed_rule,as_o_S) 47 $(call if_changed_rule,as_o_S)
48
49# There are direct branches between {str*cpy,str*cat} and stx*cpy.
50# Ensure the branches are within range by merging these objects.
51
52LDFLAGS_stycpy.o := -r
53LDFLAGS_styncpy.o := -r
54
55$(obj)/stycpy.o: $(obj)/strcpy.o $(obj)/$(ev67-y)strcat.o \
56 $(obj)/$(ev6-y)stxcpy.o FORCE
57 $(call if_changed,ld)
58
59$(obj)/styncpy.o: $(obj)/strncpy.o $(obj)/$(ev67-y)strncat.o \
60 $(obj)/$(ev6-y)stxncpy.o FORCE
61 $(call if_changed,ld)
diff --git a/arch/alpha/lib/copy_user.S b/arch/alpha/lib/copy_user.S
index 159f1b7e6e49..c277a1a4383e 100644
--- a/arch/alpha/lib/copy_user.S
+++ b/arch/alpha/lib/copy_user.S
@@ -34,7 +34,7 @@
34 .ent __copy_user 34 .ent __copy_user
35__copy_user: 35__copy_user:
36 .prologue 0 36 .prologue 0
37 and $18,$18,$0 37 mov $18,$0
38 and $16,7,$3 38 and $16,7,$3
39 beq $0,$35 39 beq $0,$35
40 beq $3,$36 40 beq $3,$36
diff --git a/arch/alpha/lib/ev6-copy_user.S b/arch/alpha/lib/ev6-copy_user.S
index 35e6710d0700..954ca03ebebe 100644
--- a/arch/alpha/lib/ev6-copy_user.S
+++ b/arch/alpha/lib/ev6-copy_user.S
@@ -45,9 +45,10 @@
45 # Pipeline info: Slotting & Comments 45 # Pipeline info: Slotting & Comments
46__copy_user: 46__copy_user:
47 .prologue 0 47 .prologue 0
48 andq $18, $18, $0 48 mov $18, $0 # .. .. .. E
49 subq $18, 32, $1 # .. E .. .. : Is this going to be a small copy? 49 subq $18, 32, $1 # .. .. E. .. : Is this going to be a small copy?
50 beq $0, $zerolength # U .. .. .. : U L U L 50 nop # .. E .. ..
51 beq $18, $zerolength # U .. .. .. : U L U L
51 52
52 and $16,7,$3 # .. .. .. E : is leading dest misalignment 53 and $16,7,$3 # .. .. .. E : is leading dest misalignment
53 ble $1, $onebyteloop # .. .. U .. : 1st branch : small amount of data 54 ble $1, $onebyteloop # .. .. U .. : 1st branch : small amount of data