aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-04-07 17:30:28 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2018-04-07 17:30:28 -0400
commit8844a509863d7da41024194e40190ec00c2cd890 (patch)
tree7f8d4d6461a46b0fea6dfbbe3983950bf058b777
parent90fda63fa1156ec1bcfd7f9ca384cec221f70a21 (diff)
parent47db69752b22de2ac315d094fd09fac31b0d3bfc (diff)
Merge branch 'misc.sparc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull sparc syscall cleanups from Al Viro: "sparc syscall stuff - killing pointless wrappers, conversions to {COMPAT_,}SYSCALL_DEFINE" * 'misc.sparc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: sparc: get rid of asm wrapper for nis_syscall() sparc: switch compat {f,}truncate64() to COMPAT_SYSCALL_DEFINE sparc: switch compat pread64 and pwrite64 to COMPAT_SYSCALL_DEFINE convert compat sync_file_range() to COMPAT_SYSCALL_DEFINE switch sparc_remap_file_pages() to SYSCALL_DEFINE sparc: get rid of memory_ordering(2) wrapper sparc: trivial conversions to {COMPAT_,}SYSCALL_DEFINE() sparc: bury a zombie extern that had been that way for twenty years sparc: get rid of remaining SIGN... wrappers sparc: kill useless SIGN... wrappers sparc: get rid of sys_sparc_pipe() wrappers
-rw-r--r--arch/sparc/kernel/entry.S15
-rw-r--r--arch/sparc/kernel/sys32.S38
-rw-r--r--arch/sparc/kernel/sys_sparc32.c89
-rw-r--r--arch/sparc/kernel/sys_sparc_32.c31
-rw-r--r--arch/sparc/kernel/sys_sparc_64.c18
-rw-r--r--arch/sparc/kernel/syscalls.S9
-rw-r--r--arch/sparc/kernel/systbls.h53
-rw-r--r--arch/sparc/kernel/systbls_32.S2
-rw-r--r--arch/sparc/kernel/systbls_64.S24
9 files changed, 98 insertions, 181 deletions
diff --git a/arch/sparc/kernel/entry.S b/arch/sparc/kernel/entry.S
index 358fe4ef08a2..4d3696973325 100644
--- a/arch/sparc/kernel/entry.S
+++ b/arch/sparc/kernel/entry.S
@@ -801,27 +801,12 @@ SUN_PI_(lda [%l4] ASI_M_MMUREGS, %l5) ! read sfsr last
801 RESTORE_ALL 801 RESTORE_ALL
802 802
803 .align 4 803 .align 4
804 .globl sys_nis_syscall
805sys_nis_syscall:
806 mov %o7, %l5
807 add %sp, STACKFRAME_SZ, %o0 ! pt_regs *regs arg
808 call c_sys_nis_syscall
809 mov %l5, %o7
810
811sunos_execv: 804sunos_execv:
812 .globl sunos_execv 805 .globl sunos_execv
813 b sys_execve 806 b sys_execve
814 clr %i2 807 clr %i2
815 808
816 .align 4 809 .align 4
817 .globl sys_sparc_pipe
818sys_sparc_pipe:
819 mov %o7, %l5
820 add %sp, STACKFRAME_SZ, %o0 ! pt_regs *regs arg
821 call sparc_pipe
822 mov %l5, %o7
823
824 .align 4
825 .globl sys_sigstack 810 .globl sys_sigstack
826sys_sigstack: 811sys_sigstack:
827 mov %o7, %l5 812 mov %o7, %l5
diff --git a/arch/sparc/kernel/sys32.S b/arch/sparc/kernel/sys32.S
index 7e7011a1e712..489ffab918a8 100644
--- a/arch/sparc/kernel/sys32.S
+++ b/arch/sparc/kernel/sys32.S
@@ -13,44 +13,6 @@
13 13
14 .text 14 .text
15 15
16#define SIGN1(STUB,SYSCALL,REG1) \
17 .align 32; \
18 .globl STUB; \
19STUB: sethi %hi(SYSCALL), %g1; \
20 jmpl %g1 + %lo(SYSCALL), %g0; \
21 sra REG1, 0, REG1
22
23#define SIGN2(STUB,SYSCALL,REG1,REG2) \
24 .align 32; \
25 .globl STUB; \
26STUB: sethi %hi(SYSCALL), %g1; \
27 sra REG1, 0, REG1; \
28 jmpl %g1 + %lo(SYSCALL), %g0; \
29 sra REG2, 0, REG2
30
31#define SIGN3(STUB,SYSCALL,REG1,REG2,REG3) \
32 .align 32; \
33 .globl STUB; \
34STUB: sra REG1, 0, REG1; \
35 sethi %hi(SYSCALL), %g1; \
36 sra REG2, 0, REG2; \
37 jmpl %g1 + %lo(SYSCALL), %g0; \
38 sra REG3, 0, REG3
39
40SIGN1(sys32_readahead, compat_sys_readahead, %o0)
41SIGN2(sys32_fadvise64, compat_sys_fadvise64, %o0, %o4)
42SIGN2(sys32_fadvise64_64, compat_sys_fadvise64_64, %o0, %o5)
43SIGN1(sys32_clock_nanosleep, compat_sys_clock_nanosleep, %o1)
44SIGN1(sys32_timer_settime, compat_sys_timer_settime, %o1)
45SIGN1(sys32_io_submit, compat_sys_io_submit, %o1)
46SIGN1(sys32_mq_open, compat_sys_mq_open, %o1)
47SIGN1(sys32_select, compat_sys_select, %o0)
48SIGN1(sys32_futex, compat_sys_futex, %o1)
49SIGN1(sys32_recvfrom, compat_sys_recvfrom, %o0)
50SIGN1(sys32_recvmsg, compat_sys_recvmsg, %o0)
51SIGN1(sys32_sendmsg, compat_sys_sendmsg, %o0)
52SIGN2(sys32_renameat2, sys_renameat2, %o0, %o2)
53
54 .globl sys32_mmap2 16 .globl sys32_mmap2
55sys32_mmap2: 17sys32_mmap2:
56 sethi %hi(sys_mmap), %g1 18 sethi %hi(sys_mmap), %g1
diff --git a/arch/sparc/kernel/sys_sparc32.c b/arch/sparc/kernel/sys_sparc32.c
index f166e5bbf506..b5da3bfdc225 100644
--- a/arch/sparc/kernel/sys_sparc32.c
+++ b/arch/sparc/kernel/sys_sparc32.c
@@ -52,20 +52,14 @@
52 52
53#include "systbls.h" 53#include "systbls.h"
54 54
55asmlinkage long sys32_truncate64(const char __user * path, unsigned long high, unsigned long low) 55COMPAT_SYSCALL_DEFINE3(truncate64, const char __user *, path, u32, high, u32, low)
56{ 56{
57 if ((int)high < 0) 57 return ksys_truncate(path, ((u64)high << 32) | low);
58 return -EINVAL;
59 else
60 return ksys_truncate(path, (high << 32) | low);
61} 58}
62 59
63asmlinkage long sys32_ftruncate64(unsigned int fd, unsigned long high, unsigned long low) 60COMPAT_SYSCALL_DEFINE3(ftruncate64, unsigned int, fd, u32, high, u32, low)
64{ 61{
65 if ((int)high < 0) 62 return ksys_ftruncate(fd, ((u64)high << 32) | low);
66 return -EINVAL;
67 else
68 return ksys_ftruncate(fd, (high << 32) | low);
69} 63}
70 64
71static int cp_compat_stat64(struct kstat *stat, 65static int cp_compat_stat64(struct kstat *stat,
@@ -98,8 +92,8 @@ static int cp_compat_stat64(struct kstat *stat,
98 return err; 92 return err;
99} 93}
100 94
101asmlinkage long compat_sys_stat64(const char __user * filename, 95COMPAT_SYSCALL_DEFINE2(stat64, const char __user *, filename,
102 struct compat_stat64 __user *statbuf) 96 struct compat_stat64 __user *, statbuf)
103{ 97{
104 struct kstat stat; 98 struct kstat stat;
105 int error = vfs_stat(filename, &stat); 99 int error = vfs_stat(filename, &stat);
@@ -109,8 +103,8 @@ asmlinkage long compat_sys_stat64(const char __user * filename,
109 return error; 103 return error;
110} 104}
111 105
112asmlinkage long compat_sys_lstat64(const char __user * filename, 106COMPAT_SYSCALL_DEFINE2(lstat64, const char __user *, filename,
113 struct compat_stat64 __user *statbuf) 107 struct compat_stat64 __user *, statbuf)
114{ 108{
115 struct kstat stat; 109 struct kstat stat;
116 int error = vfs_lstat(filename, &stat); 110 int error = vfs_lstat(filename, &stat);
@@ -120,8 +114,8 @@ asmlinkage long compat_sys_lstat64(const char __user * filename,
120 return error; 114 return error;
121} 115}
122 116
123asmlinkage long compat_sys_fstat64(unsigned int fd, 117COMPAT_SYSCALL_DEFINE2(fstat64, unsigned int, fd,
124 struct compat_stat64 __user * statbuf) 118 struct compat_stat64 __user *, statbuf)
125{ 119{
126 struct kstat stat; 120 struct kstat stat;
127 int error = vfs_fstat(fd, &stat); 121 int error = vfs_fstat(fd, &stat);
@@ -131,9 +125,9 @@ asmlinkage long compat_sys_fstat64(unsigned int fd,
131 return error; 125 return error;
132} 126}
133 127
134asmlinkage long compat_sys_fstatat64(unsigned int dfd, 128COMPAT_SYSCALL_DEFINE4(fstatat64, unsigned int, dfd,
135 const char __user *filename, 129 const char __user *, filename,
136 struct compat_stat64 __user * statbuf, int flag) 130 struct compat_stat64 __user *, statbuf, int, flag)
137{ 131{
138 struct kstat stat; 132 struct kstat stat;
139 int error; 133 int error;
@@ -194,61 +188,50 @@ COMPAT_SYSCALL_DEFINE5(rt_sigaction, int, sig,
194 return ret; 188 return ret;
195} 189}
196 190
197asmlinkage compat_ssize_t sys32_pread64(unsigned int fd, 191COMPAT_SYSCALL_DEFINE5(pread64, unsigned int, fd, char __user *, ubuf,
198 char __user *ubuf, 192 compat_size_t, count, u32, poshi, u32, poslo)
199 compat_size_t count,
200 unsigned long poshi,
201 unsigned long poslo)
202{ 193{
203 return ksys_pread64(fd, ubuf, count, (poshi << 32) | poslo); 194 return ksys_pread64(fd, ubuf, count, ((u64)poshi << 32) | poslo);
204} 195}
205 196
206asmlinkage compat_ssize_t sys32_pwrite64(unsigned int fd, 197COMPAT_SYSCALL_DEFINE5(pwrite64, unsigned int, fd, char __user *, ubuf,
207 char __user *ubuf, 198 compat_size_t, count, u32, poshi, u32, poslo)
208 compat_size_t count,
209 unsigned long poshi,
210 unsigned long poslo)
211{ 199{
212 return ksys_pwrite64(fd, ubuf, count, (poshi << 32) | poslo); 200 return ksys_pwrite64(fd, ubuf, count, ((u64)poshi << 32) | poslo);
213} 201}
214 202
215asmlinkage long compat_sys_readahead(int fd, 203COMPAT_SYSCALL_DEFINE4(readahead, int, fd, u32, offhi, u32, offlo,
216 unsigned long offhi, 204 compat_size_t, count)
217 unsigned long offlo,
218 compat_size_t count)
219{ 205{
220 return ksys_readahead(fd, (offhi << 32) | offlo, count); 206 return ksys_readahead(fd, ((u64)offhi << 32) | offlo, count);
221} 207}
222 208
223long compat_sys_fadvise64(int fd, 209COMPAT_SYSCALL_DEFINE5(fadvise64, int, fd, u32, offhi, u32, offlo,
224 unsigned long offhi, 210 compat_size_t, len, int, advice)
225 unsigned long offlo,
226 compat_size_t len, int advice)
227{ 211{
228 return ksys_fadvise64_64(fd, (offhi << 32) | offlo, len, advice); 212 return ksys_fadvise64_64(fd, ((u64)offhi << 32) | offlo, len, advice);
229} 213}
230 214
231long compat_sys_fadvise64_64(int fd, 215COMPAT_SYSCALL_DEFINE6(fadvise64_64, int, fd, u32, offhi, u32, offlo,
232 unsigned long offhi, unsigned long offlo, 216 u32, lenhi, u32, lenlo, int, advice)
233 unsigned long lenhi, unsigned long lenlo,
234 int advice)
235{ 217{
236 return ksys_fadvise64_64(fd, 218 return ksys_fadvise64_64(fd,
237 (offhi << 32) | offlo, 219 ((u64)offhi << 32) | offlo,
238 (lenhi << 32) | lenlo, 220 ((u64)lenhi << 32) | lenlo,
239 advice); 221 advice);
240} 222}
241 223
242long sys32_sync_file_range(unsigned int fd, unsigned long off_high, unsigned long off_low, unsigned long nb_high, unsigned long nb_low, unsigned int flags) 224COMPAT_SYSCALL_DEFINE6(sync_file_range, unsigned int, fd, u32, off_high, u32, off_low,
225 u32, nb_high, u32, nb_low, unsigned int, flags)
243{ 226{
244 return ksys_sync_file_range(fd, 227 return ksys_sync_file_range(fd,
245 (off_high << 32) | off_low, 228 ((u64)off_high << 32) | off_low,
246 (nb_high << 32) | nb_low, 229 ((u64)nb_high << 32) | nb_low,
247 flags); 230 flags);
248} 231}
249 232
250asmlinkage long compat_sys_fallocate(int fd, int mode, u32 offhi, u32 offlo, 233COMPAT_SYSCALL_DEFINE6(fallocate, int, fd, int, mode, u32, offhi, u32, offlo,
251 u32 lenhi, u32 lenlo) 234 u32, lenhi, u32, lenlo)
252{ 235{
253 return ksys_fallocate(fd, mode, ((loff_t)offhi << 32) | offlo, 236 return ksys_fallocate(fd, mode, ((loff_t)offhi << 32) | offlo,
254 ((loff_t)lenhi << 32) | lenlo); 237 ((loff_t)lenhi << 32) | lenlo);
diff --git a/arch/sparc/kernel/sys_sparc_32.c b/arch/sparc/kernel/sys_sparc_32.c
index d980da4ffd7b..e8c3cb6b6d08 100644
--- a/arch/sparc/kernel/sys_sparc_32.c
+++ b/arch/sparc/kernel/sys_sparc_32.c
@@ -34,7 +34,7 @@
34/* XXX Make this per-binary type, this way we can detect the type of 34/* XXX Make this per-binary type, this way we can detect the type of
35 * XXX a binary. Every Sparc executable calls this very early on. 35 * XXX a binary. Every Sparc executable calls this very early on.
36 */ 36 */
37asmlinkage unsigned long sys_getpagesize(void) 37SYSCALL_DEFINE0(getpagesize)
38{ 38{
39 return PAGE_SIZE; /* Possibly older binaries want 8192 on sun4's? */ 39 return PAGE_SIZE; /* Possibly older binaries want 8192 on sun4's? */
40} 40}
@@ -73,7 +73,7 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr, unsi
73 * sys_pipe() is the normal C calling standard for creating 73 * sys_pipe() is the normal C calling standard for creating
74 * a pipe. It's not the way unix traditionally does this, though. 74 * a pipe. It's not the way unix traditionally does this, though.
75 */ 75 */
76asmlinkage long sparc_pipe(struct pt_regs *regs) 76SYSCALL_DEFINE0(sparc_pipe)
77{ 77{
78 int fd[2]; 78 int fd[2];
79 int error; 79 int error;
@@ -81,7 +81,7 @@ asmlinkage long sparc_pipe(struct pt_regs *regs)
81 error = do_pipe_flags(fd, 0); 81 error = do_pipe_flags(fd, 0);
82 if (error) 82 if (error)
83 goto out; 83 goto out;
84 regs->u_regs[UREG_I1] = fd[1]; 84 current_pt_regs()->u_regs[UREG_I1] = fd[1];
85 error = fd[0]; 85 error = fd[0];
86out: 86out:
87 return error; 87 return error;
@@ -98,9 +98,9 @@ int sparc_mmap_check(unsigned long addr, unsigned long len)
98 98
99/* Linux version of mmap */ 99/* Linux version of mmap */
100 100
101asmlinkage long sys_mmap2(unsigned long addr, unsigned long len, 101SYSCALL_DEFINE6(mmap2, unsigned long, addr, unsigned long, len,
102 unsigned long prot, unsigned long flags, unsigned long fd, 102 unsigned long, prot, unsigned long, flags, unsigned long, fd,
103 unsigned long pgoff) 103 unsigned long, pgoff)
104{ 104{
105 /* Make sure the shift for mmap2 is constant (12), no matter what PAGE_SIZE 105 /* Make sure the shift for mmap2 is constant (12), no matter what PAGE_SIZE
106 we have. */ 106 we have. */
@@ -108,17 +108,17 @@ asmlinkage long sys_mmap2(unsigned long addr, unsigned long len,
108 pgoff >> (PAGE_SHIFT - 12)); 108 pgoff >> (PAGE_SHIFT - 12));
109} 109}
110 110
111asmlinkage long sys_mmap(unsigned long addr, unsigned long len, 111SYSCALL_DEFINE6(mmap, unsigned long, addr, unsigned long, len,
112 unsigned long prot, unsigned long flags, unsigned long fd, 112 unsigned long, prot, unsigned long, flags, unsigned long, fd,
113 unsigned long off) 113 unsigned long, off)
114{ 114{
115 /* no alignment check? */ 115 /* no alignment check? */
116 return ksys_mmap_pgoff(addr, len, prot, flags, fd, off >> PAGE_SHIFT); 116 return ksys_mmap_pgoff(addr, len, prot, flags, fd, off >> PAGE_SHIFT);
117} 117}
118 118
119long sparc_remap_file_pages(unsigned long start, unsigned long size, 119SYSCALL_DEFINE5(sparc_remap_file_pages, unsigned long, start, unsigned long, size,
120 unsigned long prot, unsigned long pgoff, 120 unsigned long, prot, unsigned long, pgoff,
121 unsigned long flags) 121 unsigned long, flags)
122{ 122{
123 /* This works on an existing mmap so we don't need to validate 123 /* This works on an existing mmap so we don't need to validate
124 * the range as that was done at the original mmap call. 124 * the range as that was done at the original mmap call.
@@ -127,11 +127,10 @@ long sparc_remap_file_pages(unsigned long start, unsigned long size,
127 (pgoff >> (PAGE_SHIFT - 12)), flags); 127 (pgoff >> (PAGE_SHIFT - 12)), flags);
128} 128}
129 129
130/* we come to here via sys_nis_syscall so it can setup the regs argument */ 130SYSCALL_DEFINE0(nis_syscall)
131asmlinkage unsigned long
132c_sys_nis_syscall (struct pt_regs *regs)
133{ 131{
134 static int count = 0; 132 static int count = 0;
133 struct pt_regs *regs = current_pt_regs();
135 134
136 if (count++ > 5) 135 if (count++ > 5)
137 return -ENOSYS; 136 return -ENOSYS;
@@ -202,7 +201,7 @@ SYSCALL_DEFINE5(rt_sigaction, int, sig,
202 return ret; 201 return ret;
203} 202}
204 203
205asmlinkage long sys_getdomainname(char __user *name, int len) 204SYSCALL_DEFINE2(getdomainname, char __user *, name, int, len)
206{ 205{
207 int nlen, err; 206 int nlen, err;
208 207
diff --git a/arch/sparc/kernel/sys_sparc_64.c b/arch/sparc/kernel/sys_sparc_64.c
index ebb84dc8a5a7..348a17ecdf66 100644
--- a/arch/sparc/kernel/sys_sparc_64.c
+++ b/arch/sparc/kernel/sys_sparc_64.c
@@ -39,7 +39,7 @@
39 39
40/* #define DEBUG_UNIMP_SYSCALL */ 40/* #define DEBUG_UNIMP_SYSCALL */
41 41
42asmlinkage unsigned long sys_getpagesize(void) 42SYSCALL_DEFINE0(getpagesize)
43{ 43{
44 return PAGE_SIZE; 44 return PAGE_SIZE;
45} 45}
@@ -310,7 +310,7 @@ void arch_pick_mmap_layout(struct mm_struct *mm)
310 * sys_pipe() is the normal C calling standard for creating 310 * sys_pipe() is the normal C calling standard for creating
311 * a pipe. It's not the way unix traditionally does this, though. 311 * a pipe. It's not the way unix traditionally does this, though.
312 */ 312 */
313SYSCALL_DEFINE1(sparc_pipe_real, struct pt_regs *, regs) 313SYSCALL_DEFINE0(sparc_pipe)
314{ 314{
315 int fd[2]; 315 int fd[2];
316 int error; 316 int error;
@@ -318,7 +318,7 @@ SYSCALL_DEFINE1(sparc_pipe_real, struct pt_regs *, regs)
318 error = do_pipe_flags(fd, 0); 318 error = do_pipe_flags(fd, 0);
319 if (error) 319 if (error)
320 goto out; 320 goto out;
321 regs->u_regs[UREG_I1] = fd[1]; 321 current_pt_regs()->u_regs[UREG_I1] = fd[1];
322 error = fd[0]; 322 error = fd[0];
323out: 323out:
324 return error; 324 return error;
@@ -480,10 +480,10 @@ SYSCALL_DEFINE5(64_mremap, unsigned long, addr, unsigned long, old_len,
480 return sys_mremap(addr, old_len, new_len, flags, new_addr); 480 return sys_mremap(addr, old_len, new_len, flags, new_addr);
481} 481}
482 482
483/* we come to here via sys_nis_syscall so it can setup the regs argument */ 483SYSCALL_DEFINE0(nis_syscall)
484asmlinkage unsigned long c_sys_nis_syscall(struct pt_regs *regs)
485{ 484{
486 static int count; 485 static int count;
486 struct pt_regs *regs = current_pt_regs();
487 487
488 /* Don't make the system unusable, if someone goes stuck */ 488 /* Don't make the system unusable, if someone goes stuck */
489 if (count++ > 5) 489 if (count++ > 5)
@@ -523,8 +523,6 @@ asmlinkage void sparc_breakpoint(struct pt_regs *regs)
523 exception_exit(prev_state); 523 exception_exit(prev_state);
524} 524}
525 525
526extern void check_pending(int signum);
527
528SYSCALL_DEFINE2(getdomainname, char __user *, name, int, len) 526SYSCALL_DEFINE2(getdomainname, char __user *, name, int, len)
529{ 527{
530 int nlen, err; 528 int nlen, err;
@@ -608,9 +606,9 @@ SYSCALL_DEFINE5(utrap_install, utrap_entry_t, type,
608 return 0; 606 return 0;
609} 607}
610 608
611asmlinkage long sparc_memory_ordering(unsigned long model, 609SYSCALL_DEFINE1(memory_ordering, unsigned long, model)
612 struct pt_regs *regs)
613{ 610{
611 struct pt_regs *regs = current_pt_regs();
614 if (model >= 3) 612 if (model >= 3)
615 return -EINVAL; 613 return -EINVAL;
616 regs->tstate = (regs->tstate & ~TSTATE_MM) | (model << 14); 614 regs->tstate = (regs->tstate & ~TSTATE_MM) | (model << 14);
@@ -644,7 +642,7 @@ SYSCALL_DEFINE5(rt_sigaction, int, sig, const struct sigaction __user *, act,
644 return ret; 642 return ret;
645} 643}
646 644
647asmlinkage long sys_kern_features(void) 645SYSCALL_DEFINE0(kern_features)
648{ 646{
649 return KERN_FEATURE_MIXED_MODE_STACK; 647 return KERN_FEATURE_MIXED_MODE_STACK;
650} 648}
diff --git a/arch/sparc/kernel/syscalls.S b/arch/sparc/kernel/syscalls.S
index c5f9ec8c52eb..db42b4fb3708 100644
--- a/arch/sparc/kernel/syscalls.S
+++ b/arch/sparc/kernel/syscalls.S
@@ -27,15 +27,6 @@ sys32_execveat:
27#endif 27#endif
28 28
29 .align 32 29 .align 32
30sys_sparc_pipe:
31 ba,pt %xcc, sys_sparc_pipe_real
32 add %sp, PTREGS_OFF, %o0
33sys_nis_syscall:
34 ba,pt %xcc, c_sys_nis_syscall
35 add %sp, PTREGS_OFF, %o0
36sys_memory_ordering:
37 ba,pt %xcc, sparc_memory_ordering
38 add %sp, PTREGS_OFF, %o1
39#ifdef CONFIG_COMPAT 30#ifdef CONFIG_COMPAT
40sys32_sigstack: 31sys32_sigstack:
41 ba,pt %xcc, do_sys32_sigstack 32 ba,pt %xcc, do_sys32_sigstack
diff --git a/arch/sparc/kernel/systbls.h b/arch/sparc/kernel/systbls.h
index 5a01cfe19a0e..bf014267d619 100644
--- a/arch/sparc/kernel/systbls.h
+++ b/arch/sparc/kernel/systbls.h
@@ -9,9 +9,9 @@
9 9
10#include <asm/utrap.h> 10#include <asm/utrap.h>
11 11
12asmlinkage unsigned long sys_getpagesize(void); 12asmlinkage long sys_getpagesize(void);
13asmlinkage long sparc_pipe(struct pt_regs *regs); 13asmlinkage long sys_sparc_pipe(void);
14asmlinkage unsigned long c_sys_nis_syscall(struct pt_regs *regs); 14asmlinkage long sys_nis_syscall(void);
15asmlinkage long sys_getdomainname(char __user *name, int len); 15asmlinkage long sys_getdomainname(char __user *name, int len);
16void do_rt_sigreturn(struct pt_regs *regs); 16void do_rt_sigreturn(struct pt_regs *regs);
17asmlinkage long sys_mmap(unsigned long addr, unsigned long len, 17asmlinkage long sys_mmap(unsigned long addr, unsigned long len,
@@ -23,7 +23,7 @@ asmlinkage void sparc_breakpoint(struct pt_regs *regs);
23asmlinkage long sys_mmap2(unsigned long addr, unsigned long len, 23asmlinkage long sys_mmap2(unsigned long addr, unsigned long len,
24 unsigned long prot, unsigned long flags, 24 unsigned long prot, unsigned long flags,
25 unsigned long fd, unsigned long pgoff); 25 unsigned long fd, unsigned long pgoff);
26long sparc_remap_file_pages(unsigned long start, unsigned long size, 26long sys_sparc_remap_file_pages(unsigned long start, unsigned long size,
27 unsigned long prot, unsigned long pgoff, 27 unsigned long prot, unsigned long pgoff,
28 unsigned long flags); 28 unsigned long flags);
29 29
@@ -46,16 +46,15 @@ asmlinkage long sys_utrap_install(utrap_entry_t type,
46 utrap_handler_t new_d, 46 utrap_handler_t new_d,
47 utrap_handler_t __user *old_p, 47 utrap_handler_t __user *old_p,
48 utrap_handler_t __user *old_d); 48 utrap_handler_t __user *old_d);
49asmlinkage long sparc_memory_ordering(unsigned long model, 49asmlinkage long sys_memory_ordering(unsigned long model);
50 struct pt_regs *regs);
51asmlinkage void sparc64_set_context(struct pt_regs *regs); 50asmlinkage void sparc64_set_context(struct pt_regs *regs);
52asmlinkage void sparc64_get_context(struct pt_regs *regs); 51asmlinkage void sparc64_get_context(struct pt_regs *regs);
53asmlinkage long sys32_truncate64(const char __user * path, 52asmlinkage long compat_sys_truncate64(const char __user * path,
54 unsigned long high, 53 u32 high,
55 unsigned long low); 54 u32 low);
56asmlinkage long sys32_ftruncate64(unsigned int fd, 55asmlinkage long compat_sys_ftruncate64(unsigned int fd,
57 unsigned long high, 56 u32 high,
58 unsigned long low); 57 u32 low);
59struct compat_stat64; 58struct compat_stat64;
60asmlinkage long compat_sys_stat64(const char __user * filename, 59asmlinkage long compat_sys_stat64(const char __user * filename,
61 struct compat_stat64 __user *statbuf); 60 struct compat_stat64 __user *statbuf);
@@ -66,31 +65,31 @@ asmlinkage long compat_sys_fstat64(unsigned int fd,
66asmlinkage long compat_sys_fstatat64(unsigned int dfd, 65asmlinkage long compat_sys_fstatat64(unsigned int dfd,
67 const char __user *filename, 66 const char __user *filename,
68 struct compat_stat64 __user * statbuf, int flag); 67 struct compat_stat64 __user * statbuf, int flag);
69asmlinkage compat_ssize_t sys32_pread64(unsigned int fd, 68asmlinkage long compat_sys_pread64(unsigned int fd,
70 char __user *ubuf, 69 char __user *ubuf,
71 compat_size_t count, 70 compat_size_t count,
72 unsigned long poshi, 71 u32 poshi,
73 unsigned long poslo); 72 u32 poslo);
74asmlinkage compat_ssize_t sys32_pwrite64(unsigned int fd, 73asmlinkage long compat_sys_pwrite64(unsigned int fd,
75 char __user *ubuf, 74 char __user *ubuf,
76 compat_size_t count, 75 compat_size_t count,
77 unsigned long poshi, 76 u32 poshi,
78 unsigned long poslo); 77 u32 poslo);
79asmlinkage long compat_sys_readahead(int fd, 78asmlinkage long compat_sys_readahead(int fd,
80 unsigned long offhi, 79 unsigned offhi,
81 unsigned long offlo, 80 unsigned offlo,
82 compat_size_t count); 81 compat_size_t count);
83long compat_sys_fadvise64(int fd, 82long compat_sys_fadvise64(int fd,
84 unsigned long offhi, 83 unsigned offhi,
85 unsigned long offlo, 84 unsigned offlo,
86 compat_size_t len, int advice); 85 compat_size_t len, int advice);
87long compat_sys_fadvise64_64(int fd, 86long compat_sys_fadvise64_64(int fd,
88 unsigned long offhi, unsigned long offlo, 87 unsigned offhi, unsigned offlo,
89 unsigned long lenhi, unsigned long lenlo, 88 unsigned lenhi, unsigned lenlo,
90 int advice); 89 int advice);
91long sys32_sync_file_range(unsigned int fd, 90long compat_sys_sync_file_range(unsigned int fd,
92 unsigned long off_high, unsigned long off_low, 91 unsigned off_high, unsigned off_low,
93 unsigned long nb_high, unsigned long nb_low, 92 unsigned nb_high, unsigned nb_low,
94 unsigned int flags); 93 unsigned int flags);
95asmlinkage long compat_sys_fallocate(int fd, int mode, u32 offhi, u32 offlo, 94asmlinkage long compat_sys_fallocate(int fd, int mode, u32 offhi, u32 offlo,
96 u32 lenhi, u32 lenlo); 95 u32 lenhi, u32 lenlo);
diff --git a/arch/sparc/kernel/systbls_32.S b/arch/sparc/kernel/systbls_32.S
index 731b25d572a1..12bee14b552c 100644
--- a/arch/sparc/kernel/systbls_32.S
+++ b/arch/sparc/kernel/systbls_32.S
@@ -55,7 +55,7 @@ sys_call_table:
55/*175*/ .long sys_setsid, sys_fchdir, sys_fgetxattr, sys_listxattr, sys_llistxattr 55/*175*/ .long sys_setsid, sys_fchdir, sys_fgetxattr, sys_listxattr, sys_llistxattr
56/*180*/ .long sys_flistxattr, sys_removexattr, sys_lremovexattr, sys_sigpending, sys_ni_syscall 56/*180*/ .long sys_flistxattr, sys_removexattr, sys_lremovexattr, sys_sigpending, sys_ni_syscall
57/*185*/ .long sys_setpgid, sys_fremovexattr, sys_tkill, sys_exit_group, sys_newuname 57/*185*/ .long sys_setpgid, sys_fremovexattr, sys_tkill, sys_exit_group, sys_newuname
58/*190*/ .long sys_init_module, sys_personality, sparc_remap_file_pages, sys_epoll_create, sys_epoll_ctl 58/*190*/ .long sys_init_module, sys_personality, sys_sparc_remap_file_pages, sys_epoll_create, sys_epoll_ctl
59/*195*/ .long sys_epoll_wait, sys_ioprio_set, sys_getppid, sys_sparc_sigaction, sys_sgetmask 59/*195*/ .long sys_epoll_wait, sys_ioprio_set, sys_getppid, sys_sparc_sigaction, sys_sgetmask
60/*200*/ .long sys_ssetmask, sys_sigsuspend, sys_newlstat, sys_uselib, sys_old_readdir 60/*200*/ .long sys_ssetmask, sys_sigsuspend, sys_newlstat, sys_uselib, sys_old_readdir
61/*205*/ .long sys_readahead, sys_socketcall, sys_syslog, sys_lookup_dcookie, sys_fadvise64 61/*205*/ .long sys_readahead, sys_socketcall, sys_syslog, sys_lookup_dcookie, sys_fadvise64
diff --git a/arch/sparc/kernel/systbls_64.S b/arch/sparc/kernel/systbls_64.S
index 293c1cb31262..387ef993880a 100644
--- a/arch/sparc/kernel/systbls_64.S
+++ b/arch/sparc/kernel/systbls_64.S
@@ -32,12 +32,12 @@ sys_call_table32:
32/*50*/ .word sys_getegid16, sys_acct, sys_nis_syscall, sys_getgid, compat_sys_ioctl 32/*50*/ .word sys_getegid16, sys_acct, sys_nis_syscall, sys_getgid, compat_sys_ioctl
33 .word sys_reboot, sys32_mmap2, sys_symlink, sys_readlink, sys32_execve 33 .word sys_reboot, sys32_mmap2, sys_symlink, sys_readlink, sys32_execve
34/*60*/ .word sys_umask, sys_chroot, compat_sys_newfstat, compat_sys_fstat64, sys_getpagesize 34/*60*/ .word sys_umask, sys_chroot, compat_sys_newfstat, compat_sys_fstat64, sys_getpagesize
35 .word sys_msync, sys_vfork, sys32_pread64, sys32_pwrite64, sys_geteuid 35 .word sys_msync, sys_vfork, compat_sys_pread64, compat_sys_pwrite64, sys_geteuid
36/*70*/ .word sys_getegid, sys_mmap, sys_setreuid, sys_munmap, sys_mprotect 36/*70*/ .word sys_getegid, sys_mmap, sys_setreuid, sys_munmap, sys_mprotect
37 .word sys_madvise, sys_vhangup, sys32_truncate64, sys_mincore, sys_getgroups16 37 .word sys_madvise, sys_vhangup, compat_sys_truncate64, sys_mincore, sys_getgroups16
38/*80*/ .word sys_setgroups16, sys_getpgrp, sys_setgroups, compat_sys_setitimer, sys32_ftruncate64 38/*80*/ .word sys_setgroups16, sys_getpgrp, sys_setgroups, compat_sys_setitimer, compat_sys_ftruncate64
39 .word sys_swapon, compat_sys_getitimer, sys_setuid, sys_sethostname, sys_setgid 39 .word sys_swapon, compat_sys_getitimer, sys_setuid, sys_sethostname, sys_setgid
40/*90*/ .word sys_dup2, sys_setfsuid, compat_sys_fcntl, sys32_select, sys_setfsgid 40/*90*/ .word sys_dup2, sys_setfsuid, compat_sys_fcntl, compat_sys_select, sys_setfsgid
41 .word sys_fsync, sys_setpriority, sys_socket, sys_connect, sys_accept 41 .word sys_fsync, sys_setpriority, sys_socket, sys_connect, sys_accept
42/*100*/ .word sys_getpriority, sys32_rt_sigreturn, compat_sys_rt_sigaction, compat_sys_rt_sigprocmask, compat_sys_rt_sigpending 42/*100*/ .word sys_getpriority, sys32_rt_sigreturn, compat_sys_rt_sigaction, compat_sys_rt_sigprocmask, compat_sys_rt_sigpending
43 .word compat_sys_rt_sigtimedwait, compat_sys_rt_sigqueueinfo, compat_sys_rt_sigsuspend, sys_setresuid, sys_getresuid 43 .word compat_sys_rt_sigtimedwait, compat_sys_rt_sigqueueinfo, compat_sys_rt_sigsuspend, sys_setresuid, sys_getresuid
@@ -47,7 +47,7 @@ sys_call_table32:
47 .word sys_recvfrom, sys_setreuid16, sys_setregid16, sys_rename, compat_sys_truncate 47 .word sys_recvfrom, sys_setreuid16, sys_setregid16, sys_rename, compat_sys_truncate
48/*130*/ .word compat_sys_ftruncate, sys_flock, compat_sys_lstat64, sys_sendto, sys_shutdown 48/*130*/ .word compat_sys_ftruncate, sys_flock, compat_sys_lstat64, sys_sendto, sys_shutdown
49 .word sys_socketpair, sys_mkdir, sys_rmdir, compat_sys_utimes, compat_sys_stat64 49 .word sys_socketpair, sys_mkdir, sys_rmdir, compat_sys_utimes, compat_sys_stat64
50/*140*/ .word sys_sendfile64, sys_nis_syscall, sys32_futex, sys_gettid, compat_sys_getrlimit 50/*140*/ .word sys_sendfile64, sys_nis_syscall, compat_sys_futex, sys_gettid, compat_sys_getrlimit
51 .word compat_sys_setrlimit, sys_pivot_root, sys_prctl, sys_pciconfig_read, sys_pciconfig_write 51 .word compat_sys_setrlimit, sys_pivot_root, sys_prctl, sys_pciconfig_read, sys_pciconfig_write
52/*150*/ .word sys_nis_syscall, sys_inotify_init, sys_inotify_add_watch, sys_poll, sys_getdents64 52/*150*/ .word sys_nis_syscall, sys_inotify_init, sys_inotify_add_watch, sys_poll, sys_getdents64
53 .word compat_sys_fcntl64, sys_inotify_rm_watch, compat_sys_statfs, compat_sys_fstatfs, sys_oldumount 53 .word compat_sys_fcntl64, sys_inotify_rm_watch, compat_sys_statfs, compat_sys_fstatfs, sys_oldumount
@@ -60,20 +60,20 @@ sys_call_table32:
60/*190*/ .word sys_init_module, sys_sparc64_personality, sys_remap_file_pages, sys_epoll_create, sys_epoll_ctl 60/*190*/ .word sys_init_module, sys_sparc64_personality, sys_remap_file_pages, sys_epoll_create, sys_epoll_ctl
61 .word sys_epoll_wait, sys_ioprio_set, sys_getppid, compat_sys_sparc_sigaction, sys_sgetmask 61 .word sys_epoll_wait, sys_ioprio_set, sys_getppid, compat_sys_sparc_sigaction, sys_sgetmask
62/*200*/ .word sys_ssetmask, sys_sigsuspend, compat_sys_newlstat, sys_uselib, compat_sys_old_readdir 62/*200*/ .word sys_ssetmask, sys_sigsuspend, compat_sys_newlstat, sys_uselib, compat_sys_old_readdir
63 .word sys32_readahead, sys32_socketcall, sys_syslog, compat_sys_lookup_dcookie, sys32_fadvise64 63 .word compat_sys_readahead, sys32_socketcall, sys_syslog, compat_sys_lookup_dcookie, compat_sys_fadvise64
64/*210*/ .word sys32_fadvise64_64, sys_tgkill, sys_waitpid, sys_swapoff, compat_sys_sysinfo 64/*210*/ .word compat_sys_fadvise64_64, sys_tgkill, sys_waitpid, sys_swapoff, compat_sys_sysinfo
65 .word compat_sys_ipc, sys32_sigreturn, sys_clone, sys_ioprio_get, compat_sys_adjtimex 65 .word compat_sys_ipc, sys32_sigreturn, sys_clone, sys_ioprio_get, compat_sys_adjtimex
66/*220*/ .word compat_sys_sigprocmask, sys_ni_syscall, sys_delete_module, sys_ni_syscall, sys_getpgid 66/*220*/ .word compat_sys_sigprocmask, sys_ni_syscall, sys_delete_module, sys_ni_syscall, sys_getpgid
67 .word sys_bdflush, sys_sysfs, sys_nis_syscall, sys_setfsuid16, sys_setfsgid16 67 .word sys_bdflush, sys_sysfs, sys_nis_syscall, sys_setfsuid16, sys_setfsgid16
68/*230*/ .word sys32_select, compat_sys_time, sys_splice, compat_sys_stime, compat_sys_statfs64 68/*230*/ .word compat_sys_select, compat_sys_time, sys_splice, compat_sys_stime, compat_sys_statfs64
69 .word compat_sys_fstatfs64, sys_llseek, sys_mlock, sys_munlock, sys_mlockall 69 .word compat_sys_fstatfs64, sys_llseek, sys_mlock, sys_munlock, sys_mlockall
70/*240*/ .word sys_munlockall, sys_sched_setparam, sys_sched_getparam, sys_sched_setscheduler, sys_sched_getscheduler 70/*240*/ .word sys_munlockall, sys_sched_setparam, sys_sched_getparam, sys_sched_setscheduler, sys_sched_getscheduler
71 .word sys_sched_yield, sys_sched_get_priority_max, sys_sched_get_priority_min, compat_sys_sched_rr_get_interval, compat_sys_nanosleep 71 .word sys_sched_yield, sys_sched_get_priority_max, sys_sched_get_priority_min, compat_sys_sched_rr_get_interval, compat_sys_nanosleep
72/*250*/ .word sys_mremap, compat_sys_sysctl, sys_getsid, sys_fdatasync, sys_nis_syscall 72/*250*/ .word sys_mremap, compat_sys_sysctl, sys_getsid, sys_fdatasync, sys_nis_syscall
73 .word sys32_sync_file_range, compat_sys_clock_settime, compat_sys_clock_gettime, compat_sys_clock_getres, sys32_clock_nanosleep 73 .word compat_sys_sync_file_range, compat_sys_clock_settime, compat_sys_clock_gettime, compat_sys_clock_getres, compat_sys_clock_nanosleep
74/*260*/ .word compat_sys_sched_getaffinity, compat_sys_sched_setaffinity, sys32_timer_settime, compat_sys_timer_gettime, sys_timer_getoverrun 74/*260*/ .word compat_sys_sched_getaffinity, compat_sys_sched_setaffinity, compat_sys_timer_settime, compat_sys_timer_gettime, sys_timer_getoverrun
75 .word sys_timer_delete, compat_sys_timer_create, sys_ni_syscall, compat_sys_io_setup, sys_io_destroy 75 .word sys_timer_delete, compat_sys_timer_create, sys_ni_syscall, compat_sys_io_setup, sys_io_destroy
76/*270*/ .word sys32_io_submit, sys_io_cancel, compat_sys_io_getevents, sys32_mq_open, sys_mq_unlink 76/*270*/ .word compat_sys_io_submit, sys_io_cancel, compat_sys_io_getevents, compat_sys_mq_open, sys_mq_unlink
77 .word compat_sys_mq_timedsend, compat_sys_mq_timedreceive, compat_sys_mq_notify, compat_sys_mq_getsetattr, compat_sys_waitid 77 .word compat_sys_mq_timedsend, compat_sys_mq_timedreceive, compat_sys_mq_notify, compat_sys_mq_getsetattr, compat_sys_waitid
78/*280*/ .word sys_tee, sys_add_key, sys_request_key, compat_sys_keyctl, compat_sys_openat 78/*280*/ .word sys_tee, sys_add_key, sys_request_key, compat_sys_keyctl, compat_sys_openat
79 .word sys_mkdirat, sys_mknodat, sys_fchownat, compat_sys_futimesat, compat_sys_fstatat64 79 .word sys_mkdirat, sys_mknodat, sys_fchownat, compat_sys_futimesat, compat_sys_fstatat64
@@ -88,7 +88,7 @@ sys_call_table32:
88/*330*/ .word compat_sys_fanotify_mark, sys_prlimit64, sys_name_to_handle_at, compat_sys_open_by_handle_at, compat_sys_clock_adjtime 88/*330*/ .word compat_sys_fanotify_mark, sys_prlimit64, sys_name_to_handle_at, compat_sys_open_by_handle_at, compat_sys_clock_adjtime
89 .word sys_syncfs, compat_sys_sendmmsg, sys_setns, compat_sys_process_vm_readv, compat_sys_process_vm_writev 89 .word sys_syncfs, compat_sys_sendmmsg, sys_setns, compat_sys_process_vm_readv, compat_sys_process_vm_writev
90/*340*/ .word sys_kern_features, sys_kcmp, sys_finit_module, sys_sched_setattr, sys_sched_getattr 90/*340*/ .word sys_kern_features, sys_kcmp, sys_finit_module, sys_sched_setattr, sys_sched_getattr
91 .word sys32_renameat2, sys_seccomp, sys_getrandom, sys_memfd_create, sys_bpf 91 .word sys_renameat2, sys_seccomp, sys_getrandom, sys_memfd_create, sys_bpf
92/*350*/ .word sys32_execveat, sys_membarrier, sys_userfaultfd, sys_bind, sys_listen 92/*350*/ .word sys32_execveat, sys_membarrier, sys_userfaultfd, sys_bind, sys_listen
93 .word compat_sys_setsockopt, sys_mlock2, sys_copy_file_range, compat_sys_preadv2, compat_sys_pwritev2 93 .word compat_sys_setsockopt, sys_mlock2, sys_copy_file_range, compat_sys_preadv2, compat_sys_pwritev2
94/*360*/ .word sys_statx 94/*360*/ .word sys_statx