aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/parisc/Makefile3
-rw-r--r--arch/parisc/include/asm/Kbuild3
-rw-r--r--arch/parisc/include/asm/alternative.h4
-rw-r--r--arch/parisc/include/asm/unistd.h8
-rw-r--r--arch/parisc/include/uapi/asm/Kbuild2
-rw-r--r--arch/parisc/include/uapi/asm/unistd.h379
-rw-r--r--arch/parisc/kernel/Makefile2
-rw-r--r--arch/parisc/kernel/alternative.c98
-rw-r--r--arch/parisc/kernel/module.c14
-rw-r--r--arch/parisc/kernel/setup.c80
-rw-r--r--arch/parisc/kernel/syscall.S11
-rw-r--r--arch/parisc/kernel/syscall_table.S459
-rw-r--r--arch/parisc/kernel/syscalls/Makefile55
-rw-r--r--arch/parisc/kernel/syscalls/syscall.tbl369
-rw-r--r--arch/parisc/kernel/syscalls/syscallhdr.sh36
-rw-r--r--arch/parisc/kernel/syscalls/syscalltbl.sh36
-rw-r--r--drivers/input/serio/gscps2.c4
-rw-r--r--drivers/input/serio/hp_sdc.c4
-rwxr-xr-xscripts/checksyscalls.sh1
19 files changed, 648 insertions, 920 deletions
diff --git a/arch/parisc/Makefile b/arch/parisc/Makefile
index 1085385e1f06..c19af26febe6 100644
--- a/arch/parisc/Makefile
+++ b/arch/parisc/Makefile
@@ -163,3 +163,6 @@ define archhelp
163 @echo ' copy to $$(INSTALL_PATH)' 163 @echo ' copy to $$(INSTALL_PATH)'
164 @echo ' zinstall - Install compressed vmlinuz kernel' 164 @echo ' zinstall - Install compressed vmlinuz kernel'
165endef 165endef
166
167archheaders:
168 $(Q)$(MAKE) $(build)=arch/parisc/kernel/syscalls all
diff --git a/arch/parisc/include/asm/Kbuild b/arch/parisc/include/asm/Kbuild
index 2013d639e735..0b1e354c8c24 100644
--- a/arch/parisc/include/asm/Kbuild
+++ b/arch/parisc/include/asm/Kbuild
@@ -1,3 +1,6 @@
1generated-y += syscall_table_32.h
2generated-y += syscall_table_64.h
3generated-y += syscall_table_c32.h
1generic-y += barrier.h 4generic-y += barrier.h
2generic-y += current.h 5generic-y += current.h
3generic-y += device.h 6generic-y += device.h
diff --git a/arch/parisc/include/asm/alternative.h b/arch/parisc/include/asm/alternative.h
index bf485a94d0b4..793d8baa3a10 100644
--- a/arch/parisc/include/asm/alternative.h
+++ b/arch/parisc/include/asm/alternative.h
@@ -2,6 +2,7 @@
2#ifndef __ASM_PARISC_ALTERNATIVE_H 2#ifndef __ASM_PARISC_ALTERNATIVE_H
3#define __ASM_PARISC_ALTERNATIVE_H 3#define __ASM_PARISC_ALTERNATIVE_H
4 4
5#define ALT_COND_ALWAYS 0x80 /* always replace instruction */
5#define ALT_COND_NO_SMP 0x01 /* when running UP instead of SMP */ 6#define ALT_COND_NO_SMP 0x01 /* when running UP instead of SMP */
6#define ALT_COND_NO_DCACHE 0x02 /* if system has no d-cache */ 7#define ALT_COND_NO_DCACHE 0x02 /* if system has no d-cache */
7#define ALT_COND_NO_ICACHE 0x04 /* if system has no i-cache */ 8#define ALT_COND_NO_ICACHE 0x04 /* if system has no i-cache */
@@ -26,6 +27,9 @@ struct alt_instr {
26}; 27};
27 28
28void set_kernel_text_rw(int enable_read_write); 29void set_kernel_text_rw(int enable_read_write);
30void apply_alternatives_all(void);
31void apply_alternatives(struct alt_instr *start, struct alt_instr *end,
32 const char *module_name);
29 33
30/* Alternative SMP implementation. */ 34/* Alternative SMP implementation. */
31#define ALTERNATIVE(cond, replacement) "!0:" \ 35#define ALTERNATIVE(cond, replacement) "!0:" \
diff --git a/arch/parisc/include/asm/unistd.h b/arch/parisc/include/asm/unistd.h
index bc37a4953eaa..c2c2afb28941 100644
--- a/arch/parisc/include/asm/unistd.h
+++ b/arch/parisc/include/asm/unistd.h
@@ -4,10 +4,18 @@
4 4
5#include <uapi/asm/unistd.h> 5#include <uapi/asm/unistd.h>
6 6
7#define __NR_Linux_syscalls __NR_syscalls
8
7#ifndef __ASSEMBLY__ 9#ifndef __ASSEMBLY__
8 10
9#define SYS_ify(syscall_name) __NR_##syscall_name 11#define SYS_ify(syscall_name) __NR_##syscall_name
10 12
13#define __IGNORE_select /* newselect */
14#define __IGNORE_fadvise64 /* fadvise64_64 */
15#define __IGNORE_pkey_mprotect
16#define __IGNORE_pkey_alloc
17#define __IGNORE_pkey_free
18
11#ifndef ASM_LINE_SEP 19#ifndef ASM_LINE_SEP
12# define ASM_LINE_SEP ; 20# define ASM_LINE_SEP ;
13#endif 21#endif
diff --git a/arch/parisc/include/uapi/asm/Kbuild b/arch/parisc/include/uapi/asm/Kbuild
index adb5c64831c7..d31b4261cafc 100644
--- a/arch/parisc/include/uapi/asm/Kbuild
+++ b/arch/parisc/include/uapi/asm/Kbuild
@@ -1,6 +1,8 @@
1# UAPI Header export list 1# UAPI Header export list
2include include/uapi/asm-generic/Kbuild.asm 2include include/uapi/asm-generic/Kbuild.asm
3 3
4generated-y += unistd_32.h
5generated-y += unistd_64.h
4generic-y += auxvec.h 6generic-y += auxvec.h
5generic-y += bpf_perf_event.h 7generic-y += bpf_perf_event.h
6generic-y += kvm_para.h 8generic-y += kvm_para.h
diff --git a/arch/parisc/include/uapi/asm/unistd.h b/arch/parisc/include/uapi/asm/unistd.h
index dc77c5a51db7..98dc953656af 100644
--- a/arch/parisc/include/uapi/asm/unistd.h
+++ b/arch/parisc/include/uapi/asm/unistd.h
@@ -2,379 +2,12 @@
2#ifndef _UAPI_ASM_PARISC_UNISTD_H_ 2#ifndef _UAPI_ASM_PARISC_UNISTD_H_
3#define _UAPI_ASM_PARISC_UNISTD_H_ 3#define _UAPI_ASM_PARISC_UNISTD_H_
4 4
5/* 5#ifdef __LP64__
6 * Linux system call numbers. 6#include <asm/unistd_64.h>
7 * 7#else
8 * Cary Coutant says that we should just use another syscall gateway 8#include <asm/unistd_32.h>
9 * page to avoid clashing with the HPUX space, and I think he's right: 9#endif
10 * it will would keep a branch out of our syscall entry path, at the
11 * very least. If we decide to change it later, we can ``just'' tweak
12 * the LINUX_GATEWAY_ADDR define at the bottom and make __NR_Linux be
13 * 1024 or something. Oh, and recompile libc. =)
14 */
15 10
16#define __NR_Linux 0 11#define LINUX_GATEWAY_ADDR 0x100
17#define __NR_restart_syscall (__NR_Linux + 0)
18#define __NR_exit (__NR_Linux + 1)
19#define __NR_fork (__NR_Linux + 2)
20#define __NR_read (__NR_Linux + 3)
21#define __NR_write (__NR_Linux + 4)
22#define __NR_open (__NR_Linux + 5)
23#define __NR_close (__NR_Linux + 6)
24#define __NR_waitpid (__NR_Linux + 7)
25#define __NR_creat (__NR_Linux + 8)
26#define __NR_link (__NR_Linux + 9)
27#define __NR_unlink (__NR_Linux + 10)
28#define __NR_execve (__NR_Linux + 11)
29#define __NR_chdir (__NR_Linux + 12)
30#define __NR_time (__NR_Linux + 13)
31#define __NR_mknod (__NR_Linux + 14)
32#define __NR_chmod (__NR_Linux + 15)
33#define __NR_lchown (__NR_Linux + 16)
34#define __NR_socket (__NR_Linux + 17)
35#define __NR_stat (__NR_Linux + 18)
36#define __NR_lseek (__NR_Linux + 19)
37#define __NR_getpid (__NR_Linux + 20)
38#define __NR_mount (__NR_Linux + 21)
39#define __NR_bind (__NR_Linux + 22)
40#define __NR_setuid (__NR_Linux + 23)
41#define __NR_getuid (__NR_Linux + 24)
42#define __NR_stime (__NR_Linux + 25)
43#define __NR_ptrace (__NR_Linux + 26)
44#define __NR_alarm (__NR_Linux + 27)
45#define __NR_fstat (__NR_Linux + 28)
46#define __NR_pause (__NR_Linux + 29)
47#define __NR_utime (__NR_Linux + 30)
48#define __NR_connect (__NR_Linux + 31)
49#define __NR_listen (__NR_Linux + 32)
50#define __NR_access (__NR_Linux + 33)
51#define __NR_nice (__NR_Linux + 34)
52#define __NR_accept (__NR_Linux + 35)
53#define __NR_sync (__NR_Linux + 36)
54#define __NR_kill (__NR_Linux + 37)
55#define __NR_rename (__NR_Linux + 38)
56#define __NR_mkdir (__NR_Linux + 39)
57#define __NR_rmdir (__NR_Linux + 40)
58#define __NR_dup (__NR_Linux + 41)
59#define __NR_pipe (__NR_Linux + 42)
60#define __NR_times (__NR_Linux + 43)
61#define __NR_getsockname (__NR_Linux + 44)
62#define __NR_brk (__NR_Linux + 45)
63#define __NR_setgid (__NR_Linux + 46)
64#define __NR_getgid (__NR_Linux + 47)
65#define __NR_signal (__NR_Linux + 48)
66#define __NR_geteuid (__NR_Linux + 49)
67#define __NR_getegid (__NR_Linux + 50)
68#define __NR_acct (__NR_Linux + 51)
69#define __NR_umount2 (__NR_Linux + 52)
70#define __NR_getpeername (__NR_Linux + 53)
71#define __NR_ioctl (__NR_Linux + 54)
72#define __NR_fcntl (__NR_Linux + 55)
73#define __NR_socketpair (__NR_Linux + 56)
74#define __NR_setpgid (__NR_Linux + 57)
75#define __NR_send (__NR_Linux + 58)
76#define __NR_uname (__NR_Linux + 59)
77#define __NR_umask (__NR_Linux + 60)
78#define __NR_chroot (__NR_Linux + 61)
79#define __NR_ustat (__NR_Linux + 62)
80#define __NR_dup2 (__NR_Linux + 63)
81#define __NR_getppid (__NR_Linux + 64)
82#define __NR_getpgrp (__NR_Linux + 65)
83#define __NR_setsid (__NR_Linux + 66)
84#define __NR_pivot_root (__NR_Linux + 67)
85#define __NR_sgetmask (__NR_Linux + 68)
86#define __NR_ssetmask (__NR_Linux + 69)
87#define __NR_setreuid (__NR_Linux + 70)
88#define __NR_setregid (__NR_Linux + 71)
89#define __NR_mincore (__NR_Linux + 72)
90#define __NR_sigpending (__NR_Linux + 73)
91#define __NR_sethostname (__NR_Linux + 74)
92#define __NR_setrlimit (__NR_Linux + 75)
93#define __NR_getrlimit (__NR_Linux + 76)
94#define __NR_getrusage (__NR_Linux + 77)
95#define __NR_gettimeofday (__NR_Linux + 78)
96#define __NR_settimeofday (__NR_Linux + 79)
97#define __NR_getgroups (__NR_Linux + 80)
98#define __NR_setgroups (__NR_Linux + 81)
99#define __NR_sendto (__NR_Linux + 82)
100#define __NR_symlink (__NR_Linux + 83)
101#define __NR_lstat (__NR_Linux + 84)
102#define __NR_readlink (__NR_Linux + 85)
103#define __NR_uselib (__NR_Linux + 86)
104#define __NR_swapon (__NR_Linux + 87)
105#define __NR_reboot (__NR_Linux + 88)
106#define __NR_mmap2 (__NR_Linux + 89)
107#define __NR_mmap (__NR_Linux + 90)
108#define __NR_munmap (__NR_Linux + 91)
109#define __NR_truncate (__NR_Linux + 92)
110#define __NR_ftruncate (__NR_Linux + 93)
111#define __NR_fchmod (__NR_Linux + 94)
112#define __NR_fchown (__NR_Linux + 95)
113#define __NR_getpriority (__NR_Linux + 96)
114#define __NR_setpriority (__NR_Linux + 97)
115#define __NR_recv (__NR_Linux + 98)
116#define __NR_statfs (__NR_Linux + 99)
117#define __NR_fstatfs (__NR_Linux + 100)
118#define __NR_stat64 (__NR_Linux + 101)
119/* #define __NR_socketcall (__NR_Linux + 102) */
120#define __NR_syslog (__NR_Linux + 103)
121#define __NR_setitimer (__NR_Linux + 104)
122#define __NR_getitimer (__NR_Linux + 105)
123#define __NR_capget (__NR_Linux + 106)
124#define __NR_capset (__NR_Linux + 107)
125#define __NR_pread64 (__NR_Linux + 108)
126#define __NR_pwrite64 (__NR_Linux + 109)
127#define __NR_getcwd (__NR_Linux + 110)
128#define __NR_vhangup (__NR_Linux + 111)
129#define __NR_fstat64 (__NR_Linux + 112)
130#define __NR_vfork (__NR_Linux + 113)
131#define __NR_wait4 (__NR_Linux + 114)
132#define __NR_swapoff (__NR_Linux + 115)
133#define __NR_sysinfo (__NR_Linux + 116)
134#define __NR_shutdown (__NR_Linux + 117)
135#define __NR_fsync (__NR_Linux + 118)
136#define __NR_madvise (__NR_Linux + 119)
137#define __NR_clone (__NR_Linux + 120)
138#define __NR_setdomainname (__NR_Linux + 121)
139#define __NR_sendfile (__NR_Linux + 122)
140#define __NR_recvfrom (__NR_Linux + 123)
141#define __NR_adjtimex (__NR_Linux + 124)
142#define __NR_mprotect (__NR_Linux + 125)
143#define __NR_sigprocmask (__NR_Linux + 126)
144#define __NR_create_module (__NR_Linux + 127) /* not used */
145#define __NR_init_module (__NR_Linux + 128)
146#define __NR_delete_module (__NR_Linux + 129)
147#define __NR_get_kernel_syms (__NR_Linux + 130) /* not used */
148#define __NR_quotactl (__NR_Linux + 131)
149#define __NR_getpgid (__NR_Linux + 132)
150#define __NR_fchdir (__NR_Linux + 133)
151#define __NR_bdflush (__NR_Linux + 134)
152#define __NR_sysfs (__NR_Linux + 135)
153#define __NR_personality (__NR_Linux + 136)
154#define __NR_afs_syscall (__NR_Linux + 137) /* not used */
155#define __NR_setfsuid (__NR_Linux + 138)
156#define __NR_setfsgid (__NR_Linux + 139)
157#define __NR__llseek (__NR_Linux + 140)
158#define __NR_getdents (__NR_Linux + 141)
159#define __NR__newselect (__NR_Linux + 142)
160#define __NR_flock (__NR_Linux + 143)
161#define __NR_msync (__NR_Linux + 144)
162#define __NR_readv (__NR_Linux + 145)
163#define __NR_writev (__NR_Linux + 146)
164#define __NR_getsid (__NR_Linux + 147)
165#define __NR_fdatasync (__NR_Linux + 148)
166#define __NR__sysctl (__NR_Linux + 149)
167#define __NR_mlock (__NR_Linux + 150)
168#define __NR_munlock (__NR_Linux + 151)
169#define __NR_mlockall (__NR_Linux + 152)
170#define __NR_munlockall (__NR_Linux + 153)
171#define __NR_sched_setparam (__NR_Linux + 154)
172#define __NR_sched_getparam (__NR_Linux + 155)
173#define __NR_sched_setscheduler (__NR_Linux + 156)
174#define __NR_sched_getscheduler (__NR_Linux + 157)
175#define __NR_sched_yield (__NR_Linux + 158)
176#define __NR_sched_get_priority_max (__NR_Linux + 159)
177#define __NR_sched_get_priority_min (__NR_Linux + 160)
178#define __NR_sched_rr_get_interval (__NR_Linux + 161)
179#define __NR_nanosleep (__NR_Linux + 162)
180#define __NR_mremap (__NR_Linux + 163)
181#define __NR_setresuid (__NR_Linux + 164)
182#define __NR_getresuid (__NR_Linux + 165)
183#define __NR_sigaltstack (__NR_Linux + 166)
184#define __NR_query_module (__NR_Linux + 167) /* not used */
185#define __NR_poll (__NR_Linux + 168)
186#define __NR_nfsservctl (__NR_Linux + 169) /* not used */
187#define __NR_setresgid (__NR_Linux + 170)
188#define __NR_getresgid (__NR_Linux + 171)
189#define __NR_prctl (__NR_Linux + 172)
190#define __NR_rt_sigreturn (__NR_Linux + 173)
191#define __NR_rt_sigaction (__NR_Linux + 174)
192#define __NR_rt_sigprocmask (__NR_Linux + 175)
193#define __NR_rt_sigpending (__NR_Linux + 176)
194#define __NR_rt_sigtimedwait (__NR_Linux + 177)
195#define __NR_rt_sigqueueinfo (__NR_Linux + 178)
196#define __NR_rt_sigsuspend (__NR_Linux + 179)
197#define __NR_chown (__NR_Linux + 180)
198#define __NR_setsockopt (__NR_Linux + 181)
199#define __NR_getsockopt (__NR_Linux + 182)
200#define __NR_sendmsg (__NR_Linux + 183)
201#define __NR_recvmsg (__NR_Linux + 184)
202#define __NR_semop (__NR_Linux + 185)
203#define __NR_semget (__NR_Linux + 186)
204#define __NR_semctl (__NR_Linux + 187)
205#define __NR_msgsnd (__NR_Linux + 188)
206#define __NR_msgrcv (__NR_Linux + 189)
207#define __NR_msgget (__NR_Linux + 190)
208#define __NR_msgctl (__NR_Linux + 191)
209#define __NR_shmat (__NR_Linux + 192)
210#define __NR_shmdt (__NR_Linux + 193)
211#define __NR_shmget (__NR_Linux + 194)
212#define __NR_shmctl (__NR_Linux + 195)
213#define __NR_getpmsg (__NR_Linux + 196) /* not used */
214#define __NR_putpmsg (__NR_Linux + 197) /* not used */
215#define __NR_lstat64 (__NR_Linux + 198)
216#define __NR_truncate64 (__NR_Linux + 199)
217#define __NR_ftruncate64 (__NR_Linux + 200)
218#define __NR_getdents64 (__NR_Linux + 201)
219#define __NR_fcntl64 (__NR_Linux + 202)
220#define __NR_attrctl (__NR_Linux + 203) /* not used */
221#define __NR_acl_get (__NR_Linux + 204) /* not used */
222#define __NR_acl_set (__NR_Linux + 205) /* not used */
223#define __NR_gettid (__NR_Linux + 206)
224#define __NR_readahead (__NR_Linux + 207)
225#define __NR_tkill (__NR_Linux + 208)
226#define __NR_sendfile64 (__NR_Linux + 209)
227#define __NR_futex (__NR_Linux + 210)
228#define __NR_sched_setaffinity (__NR_Linux + 211)
229#define __NR_sched_getaffinity (__NR_Linux + 212)
230#define __NR_set_thread_area (__NR_Linux + 213) /* not used */
231#define __NR_get_thread_area (__NR_Linux + 214) /* not used */
232#define __NR_io_setup (__NR_Linux + 215)
233#define __NR_io_destroy (__NR_Linux + 216)
234#define __NR_io_getevents (__NR_Linux + 217)
235#define __NR_io_submit (__NR_Linux + 218)
236#define __NR_io_cancel (__NR_Linux + 219)
237#define __NR_alloc_hugepages (__NR_Linux + 220) /* not used */
238#define __NR_free_hugepages (__NR_Linux + 221) /* not used */
239#define __NR_exit_group (__NR_Linux + 222)
240#define __NR_lookup_dcookie (__NR_Linux + 223)
241#define __NR_epoll_create (__NR_Linux + 224)
242#define __NR_epoll_ctl (__NR_Linux + 225)
243#define __NR_epoll_wait (__NR_Linux + 226)
244#define __NR_remap_file_pages (__NR_Linux + 227)
245#define __NR_semtimedop (__NR_Linux + 228)
246#define __NR_mq_open (__NR_Linux + 229)
247#define __NR_mq_unlink (__NR_Linux + 230)
248#define __NR_mq_timedsend (__NR_Linux + 231)
249#define __NR_mq_timedreceive (__NR_Linux + 232)
250#define __NR_mq_notify (__NR_Linux + 233)
251#define __NR_mq_getsetattr (__NR_Linux + 234)
252#define __NR_waitid (__NR_Linux + 235)
253#define __NR_fadvise64_64 (__NR_Linux + 236)
254#define __NR_set_tid_address (__NR_Linux + 237)
255#define __NR_setxattr (__NR_Linux + 238)
256#define __NR_lsetxattr (__NR_Linux + 239)
257#define __NR_fsetxattr (__NR_Linux + 240)
258#define __NR_getxattr (__NR_Linux + 241)
259#define __NR_lgetxattr (__NR_Linux + 242)
260#define __NR_fgetxattr (__NR_Linux + 243)
261#define __NR_listxattr (__NR_Linux + 244)
262#define __NR_llistxattr (__NR_Linux + 245)
263#define __NR_flistxattr (__NR_Linux + 246)
264#define __NR_removexattr (__NR_Linux + 247)
265#define __NR_lremovexattr (__NR_Linux + 248)
266#define __NR_fremovexattr (__NR_Linux + 249)
267#define __NR_timer_create (__NR_Linux + 250)
268#define __NR_timer_settime (__NR_Linux + 251)
269#define __NR_timer_gettime (__NR_Linux + 252)
270#define __NR_timer_getoverrun (__NR_Linux + 253)
271#define __NR_timer_delete (__NR_Linux + 254)
272#define __NR_clock_settime (__NR_Linux + 255)
273#define __NR_clock_gettime (__NR_Linux + 256)
274#define __NR_clock_getres (__NR_Linux + 257)
275#define __NR_clock_nanosleep (__NR_Linux + 258)
276#define __NR_tgkill (__NR_Linux + 259)
277#define __NR_mbind (__NR_Linux + 260)
278#define __NR_get_mempolicy (__NR_Linux + 261)
279#define __NR_set_mempolicy (__NR_Linux + 262)
280#define __NR_vserver (__NR_Linux + 263) /* not used */
281#define __NR_add_key (__NR_Linux + 264)
282#define __NR_request_key (__NR_Linux + 265)
283#define __NR_keyctl (__NR_Linux + 266)
284#define __NR_ioprio_set (__NR_Linux + 267)
285#define __NR_ioprio_get (__NR_Linux + 268)
286#define __NR_inotify_init (__NR_Linux + 269)
287#define __NR_inotify_add_watch (__NR_Linux + 270)
288#define __NR_inotify_rm_watch (__NR_Linux + 271)
289#define __NR_migrate_pages (__NR_Linux + 272)
290#define __NR_pselect6 (__NR_Linux + 273)
291#define __NR_ppoll (__NR_Linux + 274)
292#define __NR_openat (__NR_Linux + 275)
293#define __NR_mkdirat (__NR_Linux + 276)
294#define __NR_mknodat (__NR_Linux + 277)
295#define __NR_fchownat (__NR_Linux + 278)
296#define __NR_futimesat (__NR_Linux + 279)
297#define __NR_fstatat64 (__NR_Linux + 280)
298#define __NR_unlinkat (__NR_Linux + 281)
299#define __NR_renameat (__NR_Linux + 282)
300#define __NR_linkat (__NR_Linux + 283)
301#define __NR_symlinkat (__NR_Linux + 284)
302#define __NR_readlinkat (__NR_Linux + 285)
303#define __NR_fchmodat (__NR_Linux + 286)
304#define __NR_faccessat (__NR_Linux + 287)
305#define __NR_unshare (__NR_Linux + 288)
306#define __NR_set_robust_list (__NR_Linux + 289)
307#define __NR_get_robust_list (__NR_Linux + 290)
308#define __NR_splice (__NR_Linux + 291)
309#define __NR_sync_file_range (__NR_Linux + 292)
310#define __NR_tee (__NR_Linux + 293)
311#define __NR_vmsplice (__NR_Linux + 294)
312#define __NR_move_pages (__NR_Linux + 295)
313#define __NR_getcpu (__NR_Linux + 296)
314#define __NR_epoll_pwait (__NR_Linux + 297)
315#define __NR_statfs64 (__NR_Linux + 298)
316#define __NR_fstatfs64 (__NR_Linux + 299)
317#define __NR_kexec_load (__NR_Linux + 300)
318#define __NR_utimensat (__NR_Linux + 301)
319#define __NR_signalfd (__NR_Linux + 302)
320#define __NR_timerfd (__NR_Linux + 303) /* not used */
321#define __NR_eventfd (__NR_Linux + 304)
322#define __NR_fallocate (__NR_Linux + 305)
323#define __NR_timerfd_create (__NR_Linux + 306)
324#define __NR_timerfd_settime (__NR_Linux + 307)
325#define __NR_timerfd_gettime (__NR_Linux + 308)
326#define __NR_signalfd4 (__NR_Linux + 309)
327#define __NR_eventfd2 (__NR_Linux + 310)
328#define __NR_epoll_create1 (__NR_Linux + 311)
329#define __NR_dup3 (__NR_Linux + 312)
330#define __NR_pipe2 (__NR_Linux + 313)
331#define __NR_inotify_init1 (__NR_Linux + 314)
332#define __NR_preadv (__NR_Linux + 315)
333#define __NR_pwritev (__NR_Linux + 316)
334#define __NR_rt_tgsigqueueinfo (__NR_Linux + 317)
335#define __NR_perf_event_open (__NR_Linux + 318)
336#define __NR_recvmmsg (__NR_Linux + 319)
337#define __NR_accept4 (__NR_Linux + 320)
338#define __NR_prlimit64 (__NR_Linux + 321)
339#define __NR_fanotify_init (__NR_Linux + 322)
340#define __NR_fanotify_mark (__NR_Linux + 323)
341#define __NR_clock_adjtime (__NR_Linux + 324)
342#define __NR_name_to_handle_at (__NR_Linux + 325)
343#define __NR_open_by_handle_at (__NR_Linux + 326)
344#define __NR_syncfs (__NR_Linux + 327)
345#define __NR_setns (__NR_Linux + 328)
346#define __NR_sendmmsg (__NR_Linux + 329)
347#define __NR_process_vm_readv (__NR_Linux + 330)
348#define __NR_process_vm_writev (__NR_Linux + 331)
349#define __NR_kcmp (__NR_Linux + 332)
350#define __NR_finit_module (__NR_Linux + 333)
351#define __NR_sched_setattr (__NR_Linux + 334)
352#define __NR_sched_getattr (__NR_Linux + 335)
353#define __NR_utimes (__NR_Linux + 336)
354#define __NR_renameat2 (__NR_Linux + 337)
355#define __NR_seccomp (__NR_Linux + 338)
356#define __NR_getrandom (__NR_Linux + 339)
357#define __NR_memfd_create (__NR_Linux + 340)
358#define __NR_bpf (__NR_Linux + 341)
359#define __NR_execveat (__NR_Linux + 342)
360#define __NR_membarrier (__NR_Linux + 343)
361#define __NR_userfaultfd (__NR_Linux + 344)
362#define __NR_mlock2 (__NR_Linux + 345)
363#define __NR_copy_file_range (__NR_Linux + 346)
364#define __NR_preadv2 (__NR_Linux + 347)
365#define __NR_pwritev2 (__NR_Linux + 348)
366#define __NR_statx (__NR_Linux + 349)
367#define __NR_io_pgetevents (__NR_Linux + 350)
368
369#define __NR_Linux_syscalls (__NR_io_pgetevents + 1)
370
371
372#define __IGNORE_select /* newselect */
373#define __IGNORE_fadvise64 /* fadvise64_64 */
374#define __IGNORE_pkey_mprotect
375#define __IGNORE_pkey_alloc
376#define __IGNORE_pkey_free
377
378#define LINUX_GATEWAY_ADDR 0x100
379 12
380#endif /* _UAPI_ASM_PARISC_UNISTD_H_ */ 13#endif /* _UAPI_ASM_PARISC_UNISTD_H_ */
diff --git a/arch/parisc/kernel/Makefile b/arch/parisc/kernel/Makefile
index e5de34d00b1a..8e5f1ab65c68 100644
--- a/arch/parisc/kernel/Makefile
+++ b/arch/parisc/kernel/Makefile
@@ -7,7 +7,7 @@ extra-y := head.o vmlinux.lds
7 7
8obj-y := cache.o pacache.o setup.o pdt.o traps.o time.o irq.o \ 8obj-y := cache.o pacache.o setup.o pdt.o traps.o time.o irq.o \
9 pa7300lc.o syscall.o entry.o sys_parisc.o firmware.o \ 9 pa7300lc.o syscall.o entry.o sys_parisc.o firmware.o \
10 ptrace.o hardware.o inventory.o drivers.o \ 10 ptrace.o hardware.o inventory.o drivers.o alternative.o \
11 signal.o hpmc.o real2.o parisc_ksyms.o unaligned.o \ 11 signal.o hpmc.o real2.o parisc_ksyms.o unaligned.o \
12 process.o processor.o pdc_cons.o pdc_chassis.o unwind.o 12 process.o processor.o pdc_cons.o pdc_chassis.o unwind.o
13 13
diff --git a/arch/parisc/kernel/alternative.c b/arch/parisc/kernel/alternative.c
new file mode 100644
index 000000000000..bf2274e01a96
--- /dev/null
+++ b/arch/parisc/kernel/alternative.c
@@ -0,0 +1,98 @@
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Alternative live-patching for parisc.
4 * Copyright (C) 2018 Helge Deller <deller@gmx.de>
5 *
6 */
7
8#include <asm/processor.h>
9#include <asm/sections.h>
10#include <asm/alternative.h>
11
12#include <linux/module.h>
13
14static int no_alternatives;
15static int __init setup_no_alternatives(char *str)
16{
17 no_alternatives = 1;
18 return 1;
19}
20__setup("no-alternatives", setup_no_alternatives);
21
22void __init_or_module apply_alternatives(struct alt_instr *start,
23 struct alt_instr *end, const char *module_name)
24{
25 struct alt_instr *entry;
26 int index = 0, applied = 0;
27 int num_cpus = num_online_cpus();
28
29 for (entry = start; entry < end; entry++, index++) {
30
31 u32 *from, len, cond, replacement;
32
33 from = (u32 *)((ulong)&entry->orig_offset + entry->orig_offset);
34 len = entry->len;
35 cond = entry->cond;
36 replacement = entry->replacement;
37
38 WARN_ON(!cond);
39
40 if (cond != ALT_COND_ALWAYS && no_alternatives)
41 continue;
42
43 pr_debug("Check %d: Cond 0x%x, Replace %02d instructions @ 0x%px with 0x%08x\n",
44 index, cond, len, from, replacement);
45
46 if ((cond & ALT_COND_NO_SMP) && (num_cpus != 1))
47 continue;
48 if ((cond & ALT_COND_NO_DCACHE) && (cache_info.dc_size != 0))
49 continue;
50 if ((cond & ALT_COND_NO_ICACHE) && (cache_info.ic_size != 0))
51 continue;
52
53 /*
54 * If the PDC_MODEL capabilities has Non-coherent IO-PDIR bit
55 * set (bit #61, big endian), we have to flush and sync every
56 * time IO-PDIR is changed in Ike/Astro.
57 */
58 if ((cond & ALT_COND_NO_IOC_FDC) &&
59 (boot_cpu_data.pdc.capabilities & PDC_MODEL_IOPDIR_FDC))
60 continue;
61
62 /* Want to replace pdtlb by a pdtlb,l instruction? */
63 if (replacement == INSN_PxTLB) {
64 replacement = *from;
65 if (boot_cpu_data.cpu_type >= pcxu) /* >= pa2.0 ? */
66 replacement |= (1 << 10); /* set el bit */
67 }
68
69 /*
70 * Replace instruction with NOPs?
71 * For long distance insert a branch instruction instead.
72 */
73 if (replacement == INSN_NOP && len > 1)
74 replacement = 0xe8000002 + (len-2)*8; /* "b,n .+8" */
75
76 pr_debug("Do %d: Cond 0x%x, Replace %02d instructions @ 0x%px with 0x%08x\n",
77 index, cond, len, from, replacement);
78
79 /* Replace instruction */
80 *from = replacement;
81 applied++;
82 }
83
84 pr_info("%s%salternatives: applied %d out of %d patches\n",
85 module_name ? : "", module_name ? " " : "",
86 applied, index);
87}
88
89
90void __init apply_alternatives_all(void)
91{
92 set_kernel_text_rw(1);
93
94 apply_alternatives((struct alt_instr *) &__alt_instructions,
95 (struct alt_instr *) &__alt_instructions_end, NULL);
96
97 set_kernel_text_rw(0);
98}
diff --git a/arch/parisc/kernel/module.c b/arch/parisc/kernel/module.c
index b5b3cb00f1fb..43778420614b 100644
--- a/arch/parisc/kernel/module.c
+++ b/arch/parisc/kernel/module.c
@@ -877,6 +877,8 @@ int module_finalize(const Elf_Ehdr *hdr,
877 int i; 877 int i;
878 unsigned long nsyms; 878 unsigned long nsyms;
879 const char *strtab = NULL; 879 const char *strtab = NULL;
880 const Elf_Shdr *s;
881 char *secstrings;
880 Elf_Sym *newptr, *oldptr; 882 Elf_Sym *newptr, *oldptr;
881 Elf_Shdr *symhdr = NULL; 883 Elf_Shdr *symhdr = NULL;
882#ifdef DEBUG 884#ifdef DEBUG
@@ -948,6 +950,18 @@ int module_finalize(const Elf_Ehdr *hdr,
948 nsyms = newptr - (Elf_Sym *)symhdr->sh_addr; 950 nsyms = newptr - (Elf_Sym *)symhdr->sh_addr;
949 DEBUGP("NEW num_symtab %lu\n", nsyms); 951 DEBUGP("NEW num_symtab %lu\n", nsyms);
950 symhdr->sh_size = nsyms * sizeof(Elf_Sym); 952 symhdr->sh_size = nsyms * sizeof(Elf_Sym);
953
954 /* find .altinstructions section */
955 secstrings = (void *)hdr + sechdrs[hdr->e_shstrndx].sh_offset;
956 for (s = sechdrs; s < sechdrs + hdr->e_shnum; s++) {
957 void *aseg = (void *) s->sh_addr;
958 char *secname = secstrings + s->sh_name;
959
960 if (!strcmp(".altinstructions", secname))
961 /* patch .altinstructions */
962 apply_alternatives(aseg, aseg + s->sh_size, me->name);
963 }
964
951 return 0; 965 return 0;
952} 966}
953 967
diff --git a/arch/parisc/kernel/setup.c b/arch/parisc/kernel/setup.c
index cd227f1cf629..2b108ee3b217 100644
--- a/arch/parisc/kernel/setup.c
+++ b/arch/parisc/kernel/setup.c
@@ -305,86 +305,6 @@ static int __init parisc_init_resources(void)
305 return 0; 305 return 0;
306} 306}
307 307
308static int no_alternatives __initdata;
309static int __init setup_no_alternatives(char *str)
310{
311 no_alternatives = 1;
312 return 1;
313}
314__setup("no-alternatives", setup_no_alternatives);
315
316static void __init apply_alternatives_all(void)
317{
318 struct alt_instr *entry;
319 int index = 0, applied = 0;
320
321
322 pr_info("alternatives: %spatching kernel code\n",
323 no_alternatives ? "NOT " : "");
324 if (no_alternatives)
325 return;
326
327 set_kernel_text_rw(1);
328
329 for (entry = (struct alt_instr *) &__alt_instructions;
330 entry < (struct alt_instr *) &__alt_instructions_end;
331 entry++, index++) {
332
333 u32 *from, len, cond, replacement;
334
335 from = (u32 *)((ulong)&entry->orig_offset + entry->orig_offset);
336 len = entry->len;
337 cond = entry->cond;
338 replacement = entry->replacement;
339
340 WARN_ON(!cond);
341 pr_debug("Check %d: Cond 0x%x, Replace %02d instructions @ 0x%px with 0x%08x\n",
342 index, cond, len, from, replacement);
343
344 if ((cond & ALT_COND_NO_SMP) && (num_online_cpus() != 1))
345 continue;
346 if ((cond & ALT_COND_NO_DCACHE) && (cache_info.dc_size != 0))
347 continue;
348 if ((cond & ALT_COND_NO_ICACHE) && (cache_info.ic_size != 0))
349 continue;
350
351 /*
352 * If the PDC_MODEL capabilities has Non-coherent IO-PDIR bit
353 * set (bit #61, big endian), we have to flush and sync every
354 * time IO-PDIR is changed in Ike/Astro.
355 */
356 if ((cond & ALT_COND_NO_IOC_FDC) &&
357 (boot_cpu_data.pdc.capabilities & PDC_MODEL_IOPDIR_FDC))
358 continue;
359
360 /* Want to replace pdtlb by a pdtlb,l instruction? */
361 if (replacement == INSN_PxTLB) {
362 replacement = *from;
363 if (boot_cpu_data.cpu_type >= pcxu) /* >= pa2.0 ? */
364 replacement |= (1 << 10); /* set el bit */
365 }
366
367 /*
368 * Replace instruction with NOPs?
369 * For long distance insert a branch instruction instead.
370 */
371 if (replacement == INSN_NOP && len > 1)
372 replacement = 0xe8000002 + (len-2)*8; /* "b,n .+8" */
373
374 pr_debug("Do %d: Cond 0x%x, Replace %02d instructions @ 0x%px with 0x%08x\n",
375 index, cond, len, from, replacement);
376
377 /* Replace instruction */
378 *from = replacement;
379 applied++;
380 }
381
382 pr_info("alternatives: applied %d out of %d patches\n", applied, index);
383
384 set_kernel_text_rw(0);
385}
386
387
388extern void gsc_init(void); 308extern void gsc_init(void);
389extern void processor_init(void); 309extern void processor_init(void);
390extern void ccio_init(void); 310extern void ccio_init(void);
diff --git a/arch/parisc/kernel/syscall.S b/arch/parisc/kernel/syscall.S
index a9bc90dc4ae7..4f77bd9be66b 100644
--- a/arch/parisc/kernel/syscall.S
+++ b/arch/parisc/kernel/syscall.S
@@ -923,19 +923,24 @@ ENTRY(lws_table)
923END(lws_table) 923END(lws_table)
924 /* End of lws table */ 924 /* End of lws table */
925 925
926#define __SYSCALL(nr, entry, nargs) ASM_ULONG_INSN entry
926 .align 8 927 .align 8
927ENTRY(sys_call_table) 928ENTRY(sys_call_table)
928 .export sys_call_table,data 929 .export sys_call_table,data
929#include "syscall_table.S" 930#ifdef CONFIG_64BIT
931#include <asm/syscall_table_c32.h> /* Compat syscalls */
932#else
933#include <asm/syscall_table_32.h> /* 32-bit native syscalls */
934#endif
930END(sys_call_table) 935END(sys_call_table)
931 936
932#ifdef CONFIG_64BIT 937#ifdef CONFIG_64BIT
933 .align 8 938 .align 8
934ENTRY(sys_call_table64) 939ENTRY(sys_call_table64)
935#define SYSCALL_TABLE_64BIT 940#include <asm/syscall_table_64.h> /* 64-bit native syscalls */
936#include "syscall_table.S"
937END(sys_call_table64) 941END(sys_call_table64)
938#endif 942#endif
943#undef __SYSCALL
939 944
940 /* 945 /*
941 All light-weight-syscall atomic operations 946 All light-weight-syscall atomic operations
diff --git a/arch/parisc/kernel/syscall_table.S b/arch/parisc/kernel/syscall_table.S
deleted file mode 100644
index fe3f2a49d2b1..000000000000
--- a/arch/parisc/kernel/syscall_table.S
+++ /dev/null
@@ -1,459 +0,0 @@
1/* System Call Table
2 *
3 * Copyright (C) 1999-2004 Matthew Wilcox <willy at parisc-linux.org>
4 * Copyright (C) 2000-2001 John Marvin <jsm at parisc-linux.org>
5 * Copyright (C) 2000 Alan Modra <amodra at parisc-linux.org>
6 * Copyright (C) 2000-2003 Paul Bame <bame at parisc-linux.org>
7 * Copyright (C) 2000 Philipp Rumpf <prumpf with tux.org>
8 * Copyright (C) 2000 Michael Ang <mang with subcarrier.org>
9 * Copyright (C) 2000 David Huggins-Daines <dhd with pobox.org>
10 * Copyright (C) 2000 Grant Grundler <grundler at parisc-linux.org>
11 * Copyright (C) 2001 Richard Hirst <rhirst with parisc-linux.org>
12 * Copyright (C) 2001-2002 Ryan Bradetich <rbrad at parisc-linux.org>
13 * Copyright (C) 2001-2007 Helge Deller <deller at parisc-linux.org>
14 * Copyright (C) 2000-2001 Thomas Bogendoerfer <tsbogend at parisc-linux.org>
15 * Copyright (C) 2002 Randolph Chung <tausq with parisc-linux.org>
16 * Copyright (C) 2005-2006 Kyle McMartin <kyle at parisc-linux.org>
17 *
18 * This program is free software; you can redistribute it and/or modify
19 * it under the terms of the GNU General Public License as published by
20 * the Free Software Foundation; either version 2 of the License, or
21 * (at your option) any later version.
22 *
23 * This program is distributed in the hope that it will be useful,
24 * but WITHOUT ANY WARRANTY; without even the implied warranty of
25 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26 * GNU General Public License for more details.
27 *
28 * You should have received a copy of the GNU General Public License
29 * along with this program; if not, write to the Free Software
30 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
31 */
32
33#if defined(CONFIG_64BIT) && !defined(SYSCALL_TABLE_64BIT)
34/* Use ENTRY_SAME for 32-bit syscalls which are the same on wide and
35 * narrow palinux. Use ENTRY_DIFF for those where a 32-bit specific
36 * implementation is required on wide palinux. Use ENTRY_COMP where
37 * the compatibility layer has a useful 32-bit implementation.
38 */
39#define ENTRY_SAME(_name_) .dword sys_##_name_
40#define ENTRY_DIFF(_name_) .dword sys32_##_name_
41#define ENTRY_UHOH(_name_) .dword sys32_##unimplemented
42#define ENTRY_OURS(_name_) .dword parisc_##_name_
43#define ENTRY_COMP(_name_) .dword compat_sys_##_name_
44#elif defined(CONFIG_64BIT) && defined(SYSCALL_TABLE_64BIT)
45#define ENTRY_SAME(_name_) .dword sys_##_name_
46#define ENTRY_DIFF(_name_) .dword sys_##_name_
47#define ENTRY_UHOH(_name_) .dword sys_##_name_
48#define ENTRY_OURS(_name_) .dword sys_##_name_
49#define ENTRY_COMP(_name_) .dword sys_##_name_
50#else
51#define ENTRY_SAME(_name_) .word sys_##_name_
52#define ENTRY_DIFF(_name_) .word sys_##_name_
53#define ENTRY_UHOH(_name_) .word sys_##_name_
54#define ENTRY_OURS(_name_) .word parisc_##_name_
55#define ENTRY_COMP(_name_) .word sys_##_name_
56#endif
57
5890: ENTRY_SAME(restart_syscall) /* 0 */
5991: ENTRY_SAME(exit)
60 ENTRY_SAME(fork_wrapper)
61 ENTRY_SAME(read)
62 ENTRY_SAME(write)
63 ENTRY_COMP(open) /* 5 */
64 ENTRY_SAME(close)
65 ENTRY_SAME(waitpid)
66 ENTRY_SAME(creat)
67 ENTRY_SAME(link)
68 ENTRY_SAME(unlink) /* 10 */
69 ENTRY_COMP(execve)
70 ENTRY_SAME(chdir)
71 /* See comments in kernel/time.c!!! Maybe we don't need this? */
72 ENTRY_COMP(time)
73 ENTRY_SAME(mknod)
74 ENTRY_SAME(chmod) /* 15 */
75 ENTRY_SAME(lchown)
76 ENTRY_SAME(socket)
77 /* struct stat is MAYBE identical wide and narrow ?? */
78 ENTRY_COMP(newstat)
79 ENTRY_COMP(lseek)
80 ENTRY_SAME(getpid) /* 20 */
81 /* the 'void * data' parameter may need re-packing in wide */
82 ENTRY_COMP(mount)
83 /* concerned about struct sockaddr in wide/narrow */
84 /* ---> I think sockaddr is OK unless the compiler packs the struct */
85 /* differently to align the char array */
86 ENTRY_SAME(bind)
87 ENTRY_SAME(setuid)
88 ENTRY_SAME(getuid)
89 ENTRY_COMP(stime) /* 25 */
90 ENTRY_COMP(ptrace)
91 ENTRY_SAME(alarm)
92 /* see stat comment */
93 ENTRY_COMP(newfstat)
94 ENTRY_SAME(pause)
95 /* struct utimbuf uses time_t which might vary */
96 ENTRY_COMP(utime) /* 30 */
97 /* struct sockaddr... */
98 ENTRY_SAME(connect)
99 ENTRY_SAME(listen)
100 ENTRY_SAME(access)
101 ENTRY_SAME(nice)
102 /* struct sockaddr... */
103 ENTRY_SAME(accept) /* 35 */
104 ENTRY_SAME(sync)
105 ENTRY_SAME(kill)
106 ENTRY_SAME(rename)
107 ENTRY_SAME(mkdir)
108 ENTRY_SAME(rmdir) /* 40 */
109 ENTRY_SAME(dup)
110 ENTRY_SAME(pipe)
111 ENTRY_COMP(times)
112 /* struct sockaddr... */
113 ENTRY_SAME(getsockname)
114 /* it seems possible brk() could return a >4G pointer... */
115 ENTRY_SAME(brk) /* 45 */
116 ENTRY_SAME(setgid)
117 ENTRY_SAME(getgid)
118 ENTRY_SAME(signal)
119 ENTRY_SAME(geteuid)
120 ENTRY_SAME(getegid) /* 50 */
121 ENTRY_SAME(acct)
122 ENTRY_SAME(umount)
123 /* struct sockaddr... */
124 ENTRY_SAME(getpeername)
125 ENTRY_COMP(ioctl)
126 ENTRY_COMP(fcntl) /* 55 */
127 ENTRY_SAME(socketpair)
128 ENTRY_SAME(setpgid)
129 ENTRY_SAME(send)
130 ENTRY_SAME(newuname)
131 ENTRY_SAME(umask) /* 60 */
132 ENTRY_SAME(chroot)
133 ENTRY_COMP(ustat)
134 ENTRY_SAME(dup2)
135 ENTRY_SAME(getppid)
136 ENTRY_SAME(getpgrp) /* 65 */
137 ENTRY_SAME(setsid)
138 ENTRY_SAME(pivot_root)
139 /* I don't like this */
140 ENTRY_UHOH(sgetmask)
141 ENTRY_UHOH(ssetmask)
142 ENTRY_SAME(setreuid) /* 70 */
143 ENTRY_SAME(setregid)
144 ENTRY_SAME(mincore)
145 ENTRY_COMP(sigpending)
146 ENTRY_SAME(sethostname)
147 /* Following 3 have linux-common-code structs containing longs -( */
148 ENTRY_COMP(setrlimit) /* 75 */
149 ENTRY_COMP(getrlimit)
150 ENTRY_COMP(getrusage)
151 /* struct timeval and timezone are maybe?? consistent wide and narrow */
152 ENTRY_COMP(gettimeofday)
153 ENTRY_COMP(settimeofday)
154 ENTRY_SAME(getgroups) /* 80 */
155 ENTRY_SAME(setgroups)
156 /* struct socketaddr... */
157 ENTRY_SAME(sendto)
158 ENTRY_SAME(symlink)
159 /* see stat comment */
160 ENTRY_COMP(newlstat)
161 ENTRY_SAME(readlink) /* 85 */
162 ENTRY_SAME(ni_syscall) /* was uselib */
163 ENTRY_SAME(swapon)
164 ENTRY_SAME(reboot)
165 ENTRY_SAME(mmap2)
166 ENTRY_SAME(mmap) /* 90 */
167 ENTRY_SAME(munmap)
168 ENTRY_COMP(truncate)
169 ENTRY_COMP(ftruncate)
170 ENTRY_SAME(fchmod)
171 ENTRY_SAME(fchown) /* 95 */
172 ENTRY_SAME(getpriority)
173 ENTRY_SAME(setpriority)
174 ENTRY_SAME(recv)
175 ENTRY_COMP(statfs)
176 ENTRY_COMP(fstatfs) /* 100 */
177 ENTRY_SAME(stat64)
178 ENTRY_SAME(ni_syscall) /* was socketcall */
179 ENTRY_SAME(syslog)
180 /* even though manpage says struct timeval contains longs, ours has
181 * time_t and suseconds_t -- both of which are safe wide/narrow */
182 ENTRY_COMP(setitimer)
183 ENTRY_COMP(getitimer) /* 105 */
184 ENTRY_SAME(capget)
185 ENTRY_SAME(capset)
186 ENTRY_OURS(pread64)
187 ENTRY_OURS(pwrite64)
188 ENTRY_SAME(getcwd) /* 110 */
189 ENTRY_SAME(vhangup)
190 ENTRY_SAME(fstat64)
191 ENTRY_SAME(vfork_wrapper)
192 /* struct rusage contains longs... */
193 ENTRY_COMP(wait4)
194 ENTRY_SAME(swapoff) /* 115 */
195 ENTRY_COMP(sysinfo)
196 ENTRY_SAME(shutdown)
197 ENTRY_SAME(fsync)
198 ENTRY_SAME(madvise)
199 ENTRY_SAME(clone_wrapper) /* 120 */
200 ENTRY_SAME(setdomainname)
201 ENTRY_COMP(sendfile)
202 /* struct sockaddr... */
203 ENTRY_SAME(recvfrom)
204 /* struct timex contains longs */
205 ENTRY_COMP(adjtimex)
206 ENTRY_SAME(mprotect) /* 125 */
207 /* old_sigset_t forced to 32 bits. Beware glibc sigset_t */
208 ENTRY_COMP(sigprocmask)
209 ENTRY_SAME(ni_syscall) /* create_module */
210 ENTRY_SAME(init_module)
211 ENTRY_SAME(delete_module)
212 ENTRY_SAME(ni_syscall) /* 130: get_kernel_syms */
213 /* time_t inside struct dqblk */
214 ENTRY_SAME(quotactl)
215 ENTRY_SAME(getpgid)
216 ENTRY_SAME(fchdir)
217 ENTRY_SAME(bdflush)
218 ENTRY_SAME(sysfs) /* 135 */
219 ENTRY_OURS(personality)
220 ENTRY_SAME(ni_syscall) /* for afs_syscall */
221 ENTRY_SAME(setfsuid)
222 ENTRY_SAME(setfsgid)
223 /* I think this might work */
224 ENTRY_SAME(llseek) /* 140 */
225 ENTRY_COMP(getdents)
226 /* it is POSSIBLE that select will be OK because even though fd_set
227 * contains longs, the macros and sizes are clever. */
228 ENTRY_COMP(select)
229 ENTRY_SAME(flock)
230 ENTRY_SAME(msync)
231 /* struct iovec contains pointers */
232 ENTRY_COMP(readv) /* 145 */
233 ENTRY_COMP(writev)
234 ENTRY_SAME(getsid)
235 ENTRY_SAME(fdatasync)
236 /* struct __sysctl_args is a mess */
237 ENTRY_COMP(sysctl)
238 ENTRY_SAME(mlock) /* 150 */
239 ENTRY_SAME(munlock)
240 ENTRY_SAME(mlockall)
241 ENTRY_SAME(munlockall)
242 /* struct sched_param is ok for now */
243 ENTRY_SAME(sched_setparam)
244 ENTRY_SAME(sched_getparam) /* 155 */
245 ENTRY_SAME(sched_setscheduler)
246 ENTRY_SAME(sched_getscheduler)
247 ENTRY_SAME(sched_yield)
248 ENTRY_SAME(sched_get_priority_max)
249 ENTRY_SAME(sched_get_priority_min) /* 160 */
250 ENTRY_COMP(sched_rr_get_interval)
251 ENTRY_COMP(nanosleep)
252 ENTRY_SAME(mremap)
253 ENTRY_SAME(setresuid)
254 ENTRY_SAME(getresuid) /* 165 */
255 ENTRY_COMP(sigaltstack)
256 ENTRY_SAME(ni_syscall) /* query_module */
257 ENTRY_SAME(poll)
258 /* structs contain pointers and an in_addr... */
259 ENTRY_SAME(ni_syscall) /* was nfsservctl */
260 ENTRY_SAME(setresgid) /* 170 */
261 ENTRY_SAME(getresgid)
262 ENTRY_SAME(prctl)
263 /* signals need a careful review */
264 ENTRY_SAME(rt_sigreturn_wrapper)
265 ENTRY_COMP(rt_sigaction)
266 ENTRY_COMP(rt_sigprocmask) /* 175 */
267 ENTRY_COMP(rt_sigpending)
268 ENTRY_COMP(rt_sigtimedwait)
269 /* even though the struct siginfo_t is different, it appears like
270 * all the paths use values which should be same wide and narrow.
271 * Also the struct is padded to 128 bytes which means we don't have
272 * to worry about faulting trying to copy in a larger 64-bit
273 * struct from a 32-bit user-space app.
274 */
275 ENTRY_COMP(rt_sigqueueinfo)
276 ENTRY_COMP(rt_sigsuspend)
277 ENTRY_SAME(chown) /* 180 */
278 /* setsockopt() used by iptables: SO_SET_REPLACE/SO_SET_ADD_COUNTERS */
279 ENTRY_COMP(setsockopt)
280 ENTRY_COMP(getsockopt)
281 ENTRY_COMP(sendmsg)
282 ENTRY_COMP(recvmsg)
283 ENTRY_SAME(semop) /* 185 */
284 ENTRY_SAME(semget)
285 ENTRY_COMP(semctl)
286 ENTRY_COMP(msgsnd)
287 ENTRY_COMP(msgrcv)
288 ENTRY_SAME(msgget) /* 190 */
289 ENTRY_COMP(msgctl)
290 ENTRY_COMP(shmat)
291 ENTRY_SAME(shmdt)
292 ENTRY_SAME(shmget)
293 ENTRY_COMP(shmctl) /* 195 */
294 ENTRY_SAME(ni_syscall) /* streams1 */
295 ENTRY_SAME(ni_syscall) /* streams2 */
296 ENTRY_SAME(lstat64)
297 ENTRY_OURS(truncate64)
298 ENTRY_OURS(ftruncate64) /* 200 */
299 ENTRY_SAME(getdents64)
300 ENTRY_COMP(fcntl64)
301 ENTRY_SAME(ni_syscall) /* attrctl -- dead */
302 ENTRY_SAME(ni_syscall) /* acl_get -- dead */
303 ENTRY_SAME(ni_syscall) /* 205 (acl_set -- dead) */
304 ENTRY_SAME(gettid)
305 ENTRY_OURS(readahead)
306 ENTRY_SAME(tkill)
307 ENTRY_COMP(sendfile64)
308 ENTRY_COMP(futex) /* 210 */
309 ENTRY_COMP(sched_setaffinity)
310 ENTRY_COMP(sched_getaffinity)
311 ENTRY_SAME(ni_syscall) /* set_thread_area */
312 ENTRY_SAME(ni_syscall) /* get_thread_area */
313 ENTRY_COMP(io_setup) /* 215 */
314 ENTRY_SAME(io_destroy)
315 ENTRY_COMP(io_getevents)
316 ENTRY_COMP(io_submit)
317 ENTRY_SAME(io_cancel)
318 ENTRY_SAME(ni_syscall) /* 220: was alloc_hugepages */
319 ENTRY_SAME(ni_syscall) /* was free_hugepages */
320 ENTRY_SAME(exit_group)
321 ENTRY_COMP(lookup_dcookie)
322 ENTRY_SAME(epoll_create)
323 ENTRY_SAME(epoll_ctl) /* 225 */
324 ENTRY_SAME(epoll_wait)
325 ENTRY_SAME(remap_file_pages)
326 ENTRY_COMP(semtimedop)
327 ENTRY_COMP(mq_open)
328 ENTRY_SAME(mq_unlink) /* 230 */
329 ENTRY_COMP(mq_timedsend)
330 ENTRY_COMP(mq_timedreceive)
331 ENTRY_COMP(mq_notify)
332 ENTRY_COMP(mq_getsetattr)
333 ENTRY_COMP(waitid) /* 235 */
334 ENTRY_OURS(fadvise64_64)
335 ENTRY_SAME(set_tid_address)
336 ENTRY_SAME(setxattr)
337 ENTRY_SAME(lsetxattr)
338 ENTRY_SAME(fsetxattr) /* 240 */
339 ENTRY_SAME(getxattr)
340 ENTRY_SAME(lgetxattr)
341 ENTRY_SAME(fgetxattr)
342 ENTRY_SAME(listxattr)
343 ENTRY_SAME(llistxattr) /* 245 */
344 ENTRY_SAME(flistxattr)
345 ENTRY_SAME(removexattr)
346 ENTRY_SAME(lremovexattr)
347 ENTRY_SAME(fremovexattr)
348 ENTRY_COMP(timer_create) /* 250 */
349 ENTRY_COMP(timer_settime)
350 ENTRY_COMP(timer_gettime)
351 ENTRY_SAME(timer_getoverrun)
352 ENTRY_SAME(timer_delete)
353 ENTRY_COMP(clock_settime) /* 255 */
354 ENTRY_COMP(clock_gettime)
355 ENTRY_COMP(clock_getres)
356 ENTRY_COMP(clock_nanosleep)
357 ENTRY_SAME(tgkill)
358 ENTRY_COMP(mbind) /* 260 */
359 ENTRY_COMP(get_mempolicy)
360 ENTRY_COMP(set_mempolicy)
361 ENTRY_SAME(ni_syscall) /* 263: reserved for vserver */
362 ENTRY_SAME(add_key)
363 ENTRY_SAME(request_key) /* 265 */
364 ENTRY_COMP(keyctl)
365 ENTRY_SAME(ioprio_set)
366 ENTRY_SAME(ioprio_get)
367 ENTRY_SAME(inotify_init)
368 ENTRY_SAME(inotify_add_watch) /* 270 */
369 ENTRY_SAME(inotify_rm_watch)
370 ENTRY_SAME(migrate_pages)
371 ENTRY_COMP(pselect6)
372 ENTRY_COMP(ppoll)
373 ENTRY_COMP(openat) /* 275 */
374 ENTRY_SAME(mkdirat)
375 ENTRY_SAME(mknodat)
376 ENTRY_SAME(fchownat)
377 ENTRY_COMP(futimesat)
378 ENTRY_SAME(fstatat64) /* 280 */
379 ENTRY_SAME(unlinkat)
380 ENTRY_SAME(renameat)
381 ENTRY_SAME(linkat)
382 ENTRY_SAME(symlinkat)
383 ENTRY_SAME(readlinkat) /* 285 */
384 ENTRY_SAME(fchmodat)
385 ENTRY_SAME(faccessat)
386 ENTRY_SAME(unshare)
387 ENTRY_COMP(set_robust_list)
388 ENTRY_COMP(get_robust_list) /* 290 */
389 ENTRY_SAME(splice)
390 ENTRY_OURS(sync_file_range)
391 ENTRY_SAME(tee)
392 ENTRY_COMP(vmsplice)
393 ENTRY_COMP(move_pages) /* 295 */
394 ENTRY_SAME(getcpu)
395 ENTRY_COMP(epoll_pwait)
396 ENTRY_COMP(statfs64)
397 ENTRY_COMP(fstatfs64)
398 ENTRY_COMP(kexec_load) /* 300 */
399 ENTRY_COMP(utimensat)
400 ENTRY_COMP(signalfd)
401 ENTRY_SAME(ni_syscall) /* was timerfd */
402 ENTRY_SAME(eventfd)
403 ENTRY_OURS(fallocate) /* 305 */
404 ENTRY_SAME(timerfd_create)
405 ENTRY_COMP(timerfd_settime)
406 ENTRY_COMP(timerfd_gettime)
407 ENTRY_COMP(signalfd4)
408 ENTRY_SAME(eventfd2) /* 310 */
409 ENTRY_SAME(epoll_create1)
410 ENTRY_SAME(dup3)
411 ENTRY_SAME(pipe2)
412 ENTRY_SAME(inotify_init1)
413 ENTRY_COMP(preadv) /* 315 */
414 ENTRY_COMP(pwritev)
415 ENTRY_COMP(rt_tgsigqueueinfo)
416 ENTRY_SAME(perf_event_open)
417 ENTRY_COMP(recvmmsg)
418 ENTRY_SAME(accept4) /* 320 */
419 ENTRY_SAME(prlimit64)
420 ENTRY_SAME(fanotify_init)
421 ENTRY_DIFF(fanotify_mark)
422 ENTRY_COMP(clock_adjtime)
423 ENTRY_SAME(name_to_handle_at) /* 325 */
424 ENTRY_COMP(open_by_handle_at)
425 ENTRY_SAME(syncfs)
426 ENTRY_SAME(setns)
427 ENTRY_COMP(sendmmsg)
428 ENTRY_COMP(process_vm_readv) /* 330 */
429 ENTRY_COMP(process_vm_writev)
430 ENTRY_SAME(kcmp)
431 ENTRY_SAME(finit_module)
432 ENTRY_SAME(sched_setattr)
433 ENTRY_SAME(sched_getattr) /* 335 */
434 ENTRY_COMP(utimes)
435 ENTRY_SAME(renameat2)
436 ENTRY_SAME(seccomp)
437 ENTRY_SAME(getrandom)
438 ENTRY_SAME(memfd_create) /* 340 */
439 ENTRY_SAME(bpf)
440 ENTRY_COMP(execveat)
441 ENTRY_SAME(membarrier)
442 ENTRY_SAME(userfaultfd)
443 ENTRY_SAME(mlock2) /* 345 */
444 ENTRY_SAME(copy_file_range)
445 ENTRY_COMP(preadv2)
446 ENTRY_COMP(pwritev2)
447 ENTRY_SAME(statx)
448 ENTRY_COMP(io_pgetevents) /* 350 */
449
450
451.ifne (. - 90b) - (__NR_Linux_syscalls * (91b - 90b))
452.error "size of syscall table does not fit value of __NR_Linux_syscalls"
453.endif
454
455#undef ENTRY_SAME
456#undef ENTRY_DIFF
457#undef ENTRY_UHOH
458#undef ENTRY_COMP
459#undef ENTRY_OURS
diff --git a/arch/parisc/kernel/syscalls/Makefile b/arch/parisc/kernel/syscalls/Makefile
new file mode 100644
index 000000000000..c22a21c39f30
--- /dev/null
+++ b/arch/parisc/kernel/syscalls/Makefile
@@ -0,0 +1,55 @@
1# SPDX-License-Identifier: GPL-2.0
2kapi := arch/$(SRCARCH)/include/generated/asm
3uapi := arch/$(SRCARCH)/include/generated/uapi/asm
4
5_dummy := $(shell [ -d '$(uapi)' ] || mkdir -p '$(uapi)') \
6 $(shell [ -d '$(kapi)' ] || mkdir -p '$(kapi)')
7
8syscall := $(srctree)/$(src)/syscall.tbl
9syshdr := $(srctree)/$(src)/syscallhdr.sh
10systbl := $(srctree)/$(src)/syscalltbl.sh
11
12quiet_cmd_syshdr = SYSHDR $@
13 cmd_syshdr = $(CONFIG_SHELL) '$(syshdr)' '$<' '$@' \
14 '$(syshdr_abis_$(basetarget))' \
15 '$(syshdr_pfx_$(basetarget))' \
16 '$(syshdr_offset_$(basetarget))'
17
18quiet_cmd_systbl = SYSTBL $@
19 cmd_systbl = $(CONFIG_SHELL) '$(systbl)' '$<' '$@' \
20 '$(systbl_abis_$(basetarget))' \
21 '$(systbl_abi_$(basetarget))' \
22 '$(systbl_offset_$(basetarget))'
23
24syshdr_abis_unistd_32 := common,32
25$(uapi)/unistd_32.h: $(syscall) $(syshdr)
26 $(call if_changed,syshdr)
27
28syshdr_abis_unistd_64 := common,64
29$(uapi)/unistd_64.h: $(syscall) $(syshdr)
30 $(call if_changed,syshdr)
31
32systbl_abis_syscall_table_32 := common,32
33$(kapi)/syscall_table_32.h: $(syscall) $(systbl)
34 $(call if_changed,systbl)
35
36systbl_abis_syscall_table_64 := common,64
37$(kapi)/syscall_table_64.h: $(syscall) $(systbl)
38 $(call if_changed,systbl)
39
40systbl_abis_syscall_table_c32 := common,32
41systbl_abi_syscall_table_c32 := c32
42$(kapi)/syscall_table_c32.h: $(syscall) $(systbl)
43 $(call if_changed,systbl)
44
45uapisyshdr-y += unistd_32.h unistd_64.h
46kapisyshdr-y += syscall_table_32.h \
47 syscall_table_64.h \
48 syscall_table_c32.h
49
50targets += $(uapisyshdr-y) $(kapisyshdr-y)
51
52PHONY += all
53all: $(addprefix $(uapi)/,$(uapisyshdr-y))
54all: $(addprefix $(kapi)/,$(kapisyshdr-y))
55 @:
diff --git a/arch/parisc/kernel/syscalls/syscall.tbl b/arch/parisc/kernel/syscalls/syscall.tbl
new file mode 100644
index 000000000000..9bbd2f9f56c8
--- /dev/null
+++ b/arch/parisc/kernel/syscalls/syscall.tbl
@@ -0,0 +1,369 @@
1# SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
2#
3# system call numbers and entry vectors for parisc
4#
5# The format is:
6# <number> <abi> <name> <entry point> <compat entry point>
7#
8# The <abi> can be common, 64, or 32 for this file.
9#
100 common restart_syscall sys_restart_syscall
111 common exit sys_exit
122 common fork sys_fork_wrapper
133 common read sys_read
144 common write sys_write
155 common open sys_open compat_sys_open
166 common close sys_close
177 common waitpid sys_waitpid
188 common creat sys_creat
199 common link sys_link
2010 common unlink sys_unlink
2111 common execve sys_execve compat_sys_execve
2212 common chdir sys_chdir
2313 common time sys_time compat_sys_time
2414 common mknod sys_mknod
2515 common chmod sys_chmod
2616 common lchown sys_lchown
2717 common socket sys_socket
2818 common stat sys_newstat compat_sys_newstat
2919 common lseek sys_lseek compat_sys_lseek
3020 common getpid sys_getpid
3121 common mount sys_mount compat_sys_mount
3222 common bind sys_bind
3323 common setuid sys_setuid
3424 common getuid sys_getuid
3525 common stime sys_stime compat_sys_stime
3626 common ptrace sys_ptrace compat_sys_ptrace
3727 common alarm sys_alarm
3828 common fstat sys_newfstat compat_sys_newfstat
3929 common pause sys_pause
4030 common utime sys_utime compat_sys_utime
4131 common connect sys_connect
4232 common listen sys_listen
4333 common access sys_access
4434 common nice sys_nice
4535 common accept sys_accept
4636 common sync sys_sync
4737 common kill sys_kill
4838 common rename sys_rename
4939 common mkdir sys_mkdir
5040 common rmdir sys_rmdir
5141 common dup sys_dup
5242 common pipe sys_pipe
5343 common times sys_times compat_sys_times
5444 common getsockname sys_getsockname
5545 common brk sys_brk
5646 common setgid sys_setgid
5747 common getgid sys_getgid
5848 common signal sys_signal
5949 common geteuid sys_geteuid
6050 common getegid sys_getegid
6151 common acct sys_acct
6252 common umount2 sys_umount
6353 common getpeername sys_getpeername
6454 common ioctl sys_ioctl compat_sys_ioctl
6555 common fcntl sys_fcntl compat_sys_fcntl
6656 common socketpair sys_socketpair
6757 common setpgid sys_setpgid
6858 common send sys_send
6959 common uname sys_newuname
7060 common umask sys_umask
7161 common chroot sys_chroot
7262 common ustat sys_ustat compat_sys_ustat
7363 common dup2 sys_dup2
7464 common getppid sys_getppid
7565 common getpgrp sys_getpgrp
7666 common setsid sys_setsid
7767 common pivot_root sys_pivot_root
7868 common sgetmask sys_sgetmask sys32_unimplemented
7969 common ssetmask sys_ssetmask sys32_unimplemented
8070 common setreuid sys_setreuid
8171 common setregid sys_setregid
8272 common mincore sys_mincore
8373 common sigpending sys_sigpending compat_sys_sigpending
8474 common sethostname sys_sethostname
8575 common setrlimit sys_setrlimit compat_sys_setrlimit
8676 common getrlimit sys_getrlimit compat_sys_getrlimit
8777 common getrusage sys_getrusage compat_sys_getrusage
8878 common gettimeofday sys_gettimeofday compat_sys_gettimeofday
8979 common settimeofday sys_settimeofday compat_sys_settimeofday
9080 common getgroups sys_getgroups
9181 common setgroups sys_setgroups
9282 common sendto sys_sendto
9383 common symlink sys_symlink
9484 common lstat sys_newlstat compat_sys_newlstat
9585 common readlink sys_readlink
9686 common uselib sys_ni_syscall
9787 common swapon sys_swapon
9888 common reboot sys_reboot
9989 common mmap2 sys_mmap2
10090 common mmap sys_mmap
10191 common munmap sys_munmap
10292 common truncate sys_truncate compat_sys_truncate
10393 common ftruncate sys_ftruncate compat_sys_ftruncate
10494 common fchmod sys_fchmod
10595 common fchown sys_fchown
10696 common getpriority sys_getpriority
10797 common setpriority sys_setpriority
10898 common recv sys_recv
10999 common statfs sys_statfs compat_sys_statfs
110100 common fstatfs sys_fstatfs compat_sys_fstatfs
111101 common stat64 sys_stat64
112# 102 was socketcall
113103 common syslog sys_syslog
114104 common setitimer sys_setitimer compat_sys_setitimer
115105 common getitimer sys_getitimer compat_sys_getitimer
116106 common capget sys_capget
117107 common capset sys_capset
118108 32 pread64 parisc_pread64
119108 64 pread64 sys_pread64
120109 32 pwrite64 parisc_pwrite64
121109 64 pwrite64 sys_pwrite64
122110 common getcwd sys_getcwd
123111 common vhangup sys_vhangup
124112 common fstat64 sys_fstat64
125113 common vfork sys_vfork_wrapper
126114 common wait4 sys_wait4 compat_sys_wait4
127115 common swapoff sys_swapoff
128116 common sysinfo sys_sysinfo compat_sys_sysinfo
129117 common shutdown sys_shutdown
130118 common fsync sys_fsync
131119 common madvise sys_madvise
132120 common clone sys_clone_wrapper
133121 common setdomainname sys_setdomainname
134122 common sendfile sys_sendfile compat_sys_sendfile
135123 common recvfrom sys_recvfrom
136124 common adjtimex sys_adjtimex compat_sys_adjtimex
137125 common mprotect sys_mprotect
138126 common sigprocmask sys_sigprocmask compat_sys_sigprocmask
139# 127 was create_module
140128 common init_module sys_init_module
141129 common delete_module sys_delete_module
142# 130 was get_kernel_syms
143131 common quotactl sys_quotactl
144132 common getpgid sys_getpgid
145133 common fchdir sys_fchdir
146134 common bdflush sys_bdflush
147135 common sysfs sys_sysfs
148136 32 personality parisc_personality
149136 64 personality sys_personality
150# 137 was afs_syscall
151138 common setfsuid sys_setfsuid
152139 common setfsgid sys_setfsgid
153140 common _llseek sys_llseek
154141 common getdents sys_getdents compat_sys_getdents
155142 common _newselect sys_select compat_sys_select
156143 common flock sys_flock
157144 common msync sys_msync
158145 common readv sys_readv compat_sys_readv
159146 common writev sys_writev compat_sys_writev
160147 common getsid sys_getsid
161148 common fdatasync sys_fdatasync
162149 common _sysctl sys_sysctl compat_sys_sysctl
163150 common mlock sys_mlock
164151 common munlock sys_munlock
165152 common mlockall sys_mlockall
166153 common munlockall sys_munlockall
167154 common sched_setparam sys_sched_setparam
168155 common sched_getparam sys_sched_getparam
169156 common sched_setscheduler sys_sched_setscheduler
170157 common sched_getscheduler sys_sched_getscheduler
171158 common sched_yield sys_sched_yield
172159 common sched_get_priority_max sys_sched_get_priority_max
173160 common sched_get_priority_min sys_sched_get_priority_min
174161 common sched_rr_get_interval sys_sched_rr_get_interval compat_sys_sched_rr_get_interval
175162 common nanosleep sys_nanosleep compat_sys_nanosleep
176163 common mremap sys_mremap
177164 common setresuid sys_setresuid
178165 common getresuid sys_getresuid
179166 common sigaltstack sys_sigaltstack compat_sys_sigaltstack
180# 167 was query_module
181168 common poll sys_poll
182# 169 was nfsservctl
183170 common setresgid sys_setresgid
184171 common getresgid sys_getresgid
185172 common prctl sys_prctl
186173 common rt_sigreturn sys_rt_sigreturn_wrapper
187174 common rt_sigaction sys_rt_sigaction compat_sys_rt_sigaction
188175 common rt_sigprocmask sys_rt_sigprocmask compat_sys_rt_sigprocmask
189176 common rt_sigpending sys_rt_sigpending compat_sys_rt_sigpending
190177 common rt_sigtimedwait sys_rt_sigtimedwait compat_sys_rt_sigtimedwait
191178 common rt_sigqueueinfo sys_rt_sigqueueinfo compat_sys_rt_sigqueueinfo
192179 common rt_sigsuspend sys_rt_sigsuspend compat_sys_rt_sigsuspend
193180 common chown sys_chown
194181 common setsockopt sys_setsockopt compat_sys_setsockopt
195182 common getsockopt sys_getsockopt compat_sys_getsockopt
196183 common sendmsg sys_sendmsg compat_sys_sendmsg
197184 common recvmsg sys_recvmsg compat_sys_recvmsg
198185 common semop sys_semop
199186 common semget sys_semget
200187 common semctl sys_semctl compat_sys_semctl
201188 common msgsnd sys_msgsnd compat_sys_msgsnd
202189 common msgrcv sys_msgrcv compat_sys_msgrcv
203190 common msgget sys_msgget
204191 common msgctl sys_msgctl compat_sys_msgctl
205192 common shmat sys_shmat compat_sys_shmat
206193 common shmdt sys_shmdt
207194 common shmget sys_shmget
208195 common shmctl sys_shmctl compat_sys_shmctl
209# 196 was getpmsg
210# 197 was putpmsg
211198 common lstat64 sys_lstat64
212199 32 truncate64 parisc_truncate64
213199 64 truncate64 sys_truncate64
214200 32 ftruncate64 parisc_ftruncate64
215200 64 ftruncate64 sys_ftruncate64
216201 common getdents64 sys_getdents64
217202 common fcntl64 sys_fcntl64 compat_sys_fcntl64
218# 203 was attrctl
219# 204 was acl_get
220# 205 was acl_set
221206 common gettid sys_gettid
222207 32 readahead parisc_readahead
223207 64 readahead sys_readahead
224208 common tkill sys_tkill
225209 common sendfile64 sys_sendfile64 compat_sys_sendfile64
226210 common futex sys_futex compat_sys_futex
227211 common sched_setaffinity sys_sched_setaffinity compat_sys_sched_setaffinity
228212 common sched_getaffinity sys_sched_getaffinity compat_sys_sched_getaffinity
229# 213 was set_thread_area
230# 214 was get_thread_area
231215 common io_setup sys_io_setup compat_sys_io_setup
232216 common io_destroy sys_io_destroy
233217 common io_getevents sys_io_getevents compat_sys_io_getevents
234218 common io_submit sys_io_submit compat_sys_io_submit
235219 common io_cancel sys_io_cancel
236# 220 was alloc_hugepages
237# 221 was free_hugepages
238222 common exit_group sys_exit_group
239223 common lookup_dcookie sys_lookup_dcookie compat_sys_lookup_dcookie
240224 common epoll_create sys_epoll_create
241225 common epoll_ctl sys_epoll_ctl
242226 common epoll_wait sys_epoll_wait
243227 common remap_file_pages sys_remap_file_pages
244228 common semtimedop sys_semtimedop compat_sys_semtimedop
245229 common mq_open sys_mq_open compat_sys_mq_open
246230 common mq_unlink sys_mq_unlink
247231 common mq_timedsend sys_mq_timedsend compat_sys_mq_timedsend
248232 common mq_timedreceive sys_mq_timedreceive compat_sys_mq_timedreceive
249233 common mq_notify sys_mq_notify compat_sys_mq_notify
250234 common mq_getsetattr sys_mq_getsetattr compat_sys_mq_getsetattr
251235 common waitid sys_waitid compat_sys_waitid
252236 32 fadvise64_64 parisc_fadvise64_64
253236 64 fadvise64_64 sys_fadvise64_64
254237 common set_tid_address sys_set_tid_address
255238 common setxattr sys_setxattr
256239 common lsetxattr sys_lsetxattr
257240 common fsetxattr sys_fsetxattr
258241 common getxattr sys_getxattr
259242 common lgetxattr sys_lgetxattr
260243 common fgetxattr sys_fgetxattr
261244 common listxattr sys_listxattr
262245 common llistxattr sys_llistxattr
263246 common flistxattr sys_flistxattr
264247 common removexattr sys_removexattr
265248 common lremovexattr sys_lremovexattr
266249 common fremovexattr sys_fremovexattr
267250 common timer_create sys_timer_create compat_sys_timer_create
268251 common timer_settime sys_timer_settime compat_sys_timer_settime
269252 common timer_gettime sys_timer_gettime compat_sys_timer_gettime
270253 common timer_getoverrun sys_timer_getoverrun
271254 common timer_delete sys_timer_delete
272255 common clock_settime sys_clock_settime compat_sys_clock_settime
273256 common clock_gettime sys_clock_gettime compat_sys_clock_gettime
274257 common clock_getres sys_clock_getres compat_sys_clock_getres
275258 common clock_nanosleep sys_clock_nanosleep compat_sys_clock_nanosleep
276259 common tgkill sys_tgkill
277260 common mbind sys_mbind compat_sys_mbind
278261 common get_mempolicy sys_get_mempolicy compat_sys_get_mempolicy
279262 common set_mempolicy sys_set_mempolicy compat_sys_set_mempolicy
280# 263 was vserver
281264 common add_key sys_add_key
282265 common request_key sys_request_key
283266 common keyctl sys_keyctl compat_sys_keyctl
284267 common ioprio_set sys_ioprio_set
285268 common ioprio_get sys_ioprio_get
286269 common inotify_init sys_inotify_init
287270 common inotify_add_watch sys_inotify_add_watch
288271 common inotify_rm_watch sys_inotify_rm_watch
289272 common migrate_pages sys_migrate_pages
290273 common pselect6 sys_pselect6 compat_sys_pselect6
291274 common ppoll sys_ppoll compat_sys_ppoll
292275 common openat sys_openat compat_sys_openat
293276 common mkdirat sys_mkdirat
294277 common mknodat sys_mknodat
295278 common fchownat sys_fchownat
296279 common futimesat sys_futimesat compat_sys_futimesat
297280 common fstatat64 sys_fstatat64
298281 common unlinkat sys_unlinkat
299282 common renameat sys_renameat
300283 common linkat sys_linkat
301284 common symlinkat sys_symlinkat
302285 common readlinkat sys_readlinkat
303286 common fchmodat sys_fchmodat
304287 common faccessat sys_faccessat
305288 common unshare sys_unshare
306289 common set_robust_list sys_set_robust_list compat_sys_set_robust_list
307290 common get_robust_list sys_get_robust_list compat_sys_get_robust_list
308291 common splice sys_splice
309292 32 sync_file_range parisc_sync_file_range
310292 64 sync_file_range sys_sync_file_range
311293 common tee sys_tee
312294 common vmsplice sys_vmsplice compat_sys_vmsplice
313295 common move_pages sys_move_pages compat_sys_move_pages
314296 common getcpu sys_getcpu
315297 common epoll_pwait sys_epoll_pwait compat_sys_epoll_pwait
316298 common statfs64 sys_statfs64 compat_sys_statfs64
317299 common fstatfs64 sys_fstatfs64 compat_sys_fstatfs64
318300 common kexec_load sys_kexec_load compat_sys_kexec_load
319301 common utimensat sys_utimensat compat_sys_utimensat
320302 common signalfd sys_signalfd compat_sys_signalfd
321# 303 was timerfd
322304 common eventfd sys_eventfd
323305 32 fallocate parisc_fallocate
324305 64 fallocate sys_fallocate
325306 common timerfd_create sys_timerfd_create
326307 common timerfd_settime sys_timerfd_settime compat_sys_timerfd_settime
327308 common timerfd_gettime sys_timerfd_gettime compat_sys_timerfd_gettime
328309 common signalfd4 sys_signalfd4 compat_sys_signalfd4
329310 common eventfd2 sys_eventfd2
330311 common epoll_create1 sys_epoll_create1
331312 common dup3 sys_dup3
332313 common pipe2 sys_pipe2
333314 common inotify_init1 sys_inotify_init1
334315 common preadv sys_preadv compat_sys_preadv
335316 common pwritev sys_pwritev compat_sys_pwritev
336317 common rt_tgsigqueueinfo sys_rt_tgsigqueueinfo compat_sys_rt_tgsigqueueinfo
337318 common perf_event_open sys_perf_event_open
338319 common recvmmsg sys_recvmmsg compat_sys_recvmmsg
339320 common accept4 sys_accept4
340321 common prlimit64 sys_prlimit64
341322 common fanotify_init sys_fanotify_init
342323 common fanotify_mark sys_fanotify_mark sys32_fanotify_mark
343324 common clock_adjtime sys_clock_adjtime compat_sys_clock_adjtime
344325 common name_to_handle_at sys_name_to_handle_at
345326 common open_by_handle_at sys_open_by_handle_at compat_sys_open_by_handle_at
346327 common syncfs sys_syncfs
347328 common setns sys_setns
348329 common sendmmsg sys_sendmmsg compat_sys_sendmmsg
349330 common process_vm_readv sys_process_vm_readv compat_sys_process_vm_readv
350331 common process_vm_writev sys_process_vm_writev compat_sys_process_vm_writev
351332 common kcmp sys_kcmp
352333 common finit_module sys_finit_module
353334 common sched_setattr sys_sched_setattr
354335 common sched_getattr sys_sched_getattr
355336 common utimes sys_utimes compat_sys_utimes
356337 common renameat2 sys_renameat2
357338 common seccomp sys_seccomp
358339 common getrandom sys_getrandom
359340 common memfd_create sys_memfd_create
360341 common bpf sys_bpf
361342 common execveat sys_execveat compat_sys_execveat
362343 common membarrier sys_membarrier
363344 common userfaultfd sys_userfaultfd
364345 common mlock2 sys_mlock2
365346 common copy_file_range sys_copy_file_range
366347 common preadv2 sys_preadv2 compat_sys_preadv2
367348 common pwritev2 sys_pwritev2 compat_sys_pwritev2
368349 common statx sys_statx
369350 common io_pgetevents sys_io_pgetevents compat_sys_io_pgetevents
diff --git a/arch/parisc/kernel/syscalls/syscallhdr.sh b/arch/parisc/kernel/syscalls/syscallhdr.sh
new file mode 100644
index 000000000000..50242b747d7c
--- /dev/null
+++ b/arch/parisc/kernel/syscalls/syscallhdr.sh
@@ -0,0 +1,36 @@
1#!/bin/sh
2# SPDX-License-Identifier: GPL-2.0
3
4in="$1"
5out="$2"
6my_abis=`echo "($3)" | tr ',' '|'`
7prefix="$4"
8offset="$5"
9
10fileguard=_UAPI_ASM_PARISC_`basename "$out" | sed \
11 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/' \
12 -e 's/[^A-Z0-9_]/_/g' -e 's/__/_/g'`
13grep -E "^[0-9A-Fa-fXx]+[[:space:]]+${my_abis}" "$in" | sort -n | (
14 printf "#ifndef %s\n" "${fileguard}"
15 printf "#define %s\n" "${fileguard}"
16 printf "\n"
17
18 nxt=0
19 while read nr abi name entry compat ; do
20 if [ -z "$offset" ]; then
21 printf "#define __NR_%s%s\t%s\n" \
22 "${prefix}" "${name}" "${nr}"
23 else
24 printf "#define __NR_%s%s\t(%s + %s)\n" \
25 "${prefix}" "${name}" "${offset}" "${nr}"
26 fi
27 nxt=$((nr+1))
28 done
29
30 printf "\n"
31 printf "#ifdef __KERNEL__\n"
32 printf "#define __NR_syscalls\t%s\n" "${nxt}"
33 printf "#endif\n"
34 printf "\n"
35 printf "#endif /* %s */" "${fileguard}"
36) > "$out"
diff --git a/arch/parisc/kernel/syscalls/syscalltbl.sh b/arch/parisc/kernel/syscalls/syscalltbl.sh
new file mode 100644
index 000000000000..45b5bae26240
--- /dev/null
+++ b/arch/parisc/kernel/syscalls/syscalltbl.sh
@@ -0,0 +1,36 @@
1#!/bin/sh
2# SPDX-License-Identifier: GPL-2.0
3
4in="$1"
5out="$2"
6my_abis=`echo "($3)" | tr ',' '|'`
7my_abi="$4"
8offset="$5"
9
10emit() {
11 t_nxt="$1"
12 t_nr="$2"
13 t_entry="$3"
14
15 while [ $t_nxt -lt $t_nr ]; do
16 printf "__SYSCALL(%s, sys_ni_syscall, )\n" "${t_nxt}"
17 t_nxt=$((t_nxt+1))
18 done
19 printf "__SYSCALL(%s, %s, )\n" "${t_nxt}" "${t_entry}"
20}
21
22grep -E "^[0-9A-Fa-fXx]+[[:space:]]+${my_abis}" "$in" | sort -n | (
23 nxt=0
24 if [ -z "$offset" ]; then
25 offset=0
26 fi
27
28 while read nr abi name entry compat ; do
29 if [ "$my_abi" = "c32" ] && [ ! -z "$compat" ]; then
30 emit $((nxt+offset)) $((nr+offset)) $compat
31 else
32 emit $((nxt+offset)) $((nr+offset)) $entry
33 fi
34 nxt=$((nr+1))
35 done
36) > "$out"
diff --git a/drivers/input/serio/gscps2.c b/drivers/input/serio/gscps2.c
index 49d8d53e50b7..96f9b5397367 100644
--- a/drivers/input/serio/gscps2.c
+++ b/drivers/input/serio/gscps2.c
@@ -381,9 +381,9 @@ static int __init gscps2_probe(struct parisc_device *dev)
381 goto fail; 381 goto fail;
382#endif 382#endif
383 383
384 printk(KERN_INFO "serio: %s port at 0x%p irq %d @ %s\n", 384 pr_info("serio: %s port at 0x%08lx irq %d @ %s\n",
385 ps2port->port->name, 385 ps2port->port->name,
386 ps2port->addr, 386 hpa,
387 ps2port->padev->irq, 387 ps2port->padev->irq,
388 ps2port->port->phys); 388 ps2port->port->phys);
389 389
diff --git a/drivers/input/serio/hp_sdc.c b/drivers/input/serio/hp_sdc.c
index 0b8a25c58d02..654252361653 100644
--- a/drivers/input/serio/hp_sdc.c
+++ b/drivers/input/serio/hp_sdc.c
@@ -884,8 +884,8 @@ static int __init hp_sdc_init(void)
884 "HP SDC NMI", &hp_sdc)) 884 "HP SDC NMI", &hp_sdc))
885 goto err2; 885 goto err2;
886 886
887 printk(KERN_INFO PREFIX "HP SDC at 0x%p, IRQ %d (NMI IRQ %d)\n", 887 pr_info(PREFIX "HP SDC at 0x%08lx, IRQ %d (NMI IRQ %d)\n",
888 (void *)hp_sdc.base_io, hp_sdc.irq, hp_sdc.nmi); 888 hp_sdc.base_io, hp_sdc.irq, hp_sdc.nmi);
889 889
890 hp_sdc_status_in8(); 890 hp_sdc_status_in8();
891 hp_sdc_data_in8(); 891 hp_sdc_data_in8();
diff --git a/scripts/checksyscalls.sh b/scripts/checksyscalls.sh
index ee3dfb5be6cd..cf931003395f 100755
--- a/scripts/checksyscalls.sh
+++ b/scripts/checksyscalls.sh
@@ -150,6 +150,7 @@ cat << EOF
150#define __IGNORE_uselib 150#define __IGNORE_uselib
151#define __IGNORE__sysctl 151#define __IGNORE__sysctl
152#define __IGNORE_arch_prctl 152#define __IGNORE_arch_prctl
153#define __IGNORE_nfsservctl
153 154
154/* ... including the "new" 32-bit uid syscalls */ 155/* ... including the "new" 32-bit uid syscalls */
155#define __IGNORE_lchown32 156#define __IGNORE_lchown32