diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2014-12-08 20:39:29 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2014-12-08 20:39:29 -0500 |
commit | ba00410b8131b23edfb0e09f8b6dd26c8eb621fb (patch) | |
tree | c08504e4d2fa51ac91cef544f336d0169806c49f /arch/parisc | |
parent | 8ce74dd6057832618957fc2cbd38fa959c3a0a6c (diff) | |
parent | aa583096d9767892983332e7c1a984bd17e3cd39 (diff) |
Merge branch 'iov_iter' into for-next
Diffstat (limited to 'arch/parisc')
-rw-r--r-- | arch/parisc/include/asm/uaccess.h | 19 | ||||
-rw-r--r-- | arch/parisc/include/uapi/asm/bitsperlong.h | 8 | ||||
-rw-r--r-- | arch/parisc/include/uapi/asm/msgbuf.h | 8 | ||||
-rw-r--r-- | arch/parisc/include/uapi/asm/sembuf.h | 6 | ||||
-rw-r--r-- | arch/parisc/include/uapi/asm/shmbuf.h | 35 | ||||
-rw-r--r-- | arch/parisc/include/uapi/asm/signal.h | 2 | ||||
-rw-r--r-- | arch/parisc/include/uapi/asm/unistd.h | 3 | ||||
-rw-r--r-- | arch/parisc/kernel/syscall_table.S | 9 |
8 files changed, 41 insertions, 49 deletions
diff --git a/arch/parisc/include/asm/uaccess.h b/arch/parisc/include/asm/uaccess.h index 4006964d8e12..a5cb070b54bf 100644 --- a/arch/parisc/include/asm/uaccess.h +++ b/arch/parisc/include/asm/uaccess.h | |||
@@ -9,6 +9,8 @@ | |||
9 | #include <asm/errno.h> | 9 | #include <asm/errno.h> |
10 | #include <asm-generic/uaccess-unaligned.h> | 10 | #include <asm-generic/uaccess-unaligned.h> |
11 | 11 | ||
12 | #include <linux/bug.h> | ||
13 | |||
12 | #define VERIFY_READ 0 | 14 | #define VERIFY_READ 0 |
13 | #define VERIFY_WRITE 1 | 15 | #define VERIFY_WRITE 1 |
14 | 16 | ||
@@ -28,11 +30,6 @@ | |||
28 | * that put_user is the same as __put_user, etc. | 30 | * that put_user is the same as __put_user, etc. |
29 | */ | 31 | */ |
30 | 32 | ||
31 | extern int __get_kernel_bad(void); | ||
32 | extern int __get_user_bad(void); | ||
33 | extern int __put_kernel_bad(void); | ||
34 | extern int __put_user_bad(void); | ||
35 | |||
36 | static inline long access_ok(int type, const void __user * addr, | 33 | static inline long access_ok(int type, const void __user * addr, |
37 | unsigned long size) | 34 | unsigned long size) |
38 | { | 35 | { |
@@ -43,8 +40,8 @@ static inline long access_ok(int type, const void __user * addr, | |||
43 | #define get_user __get_user | 40 | #define get_user __get_user |
44 | 41 | ||
45 | #if !defined(CONFIG_64BIT) | 42 | #if !defined(CONFIG_64BIT) |
46 | #define LDD_KERNEL(ptr) __get_kernel_bad(); | 43 | #define LDD_KERNEL(ptr) BUILD_BUG() |
47 | #define LDD_USER(ptr) __get_user_bad(); | 44 | #define LDD_USER(ptr) BUILD_BUG() |
48 | #define STD_KERNEL(x, ptr) __put_kernel_asm64(x,ptr) | 45 | #define STD_KERNEL(x, ptr) __put_kernel_asm64(x,ptr) |
49 | #define STD_USER(x, ptr) __put_user_asm64(x,ptr) | 46 | #define STD_USER(x, ptr) __put_user_asm64(x,ptr) |
50 | #define ASM_WORD_INSN ".word\t" | 47 | #define ASM_WORD_INSN ".word\t" |
@@ -94,7 +91,7 @@ struct exception_data { | |||
94 | case 2: __get_kernel_asm("ldh",ptr); break; \ | 91 | case 2: __get_kernel_asm("ldh",ptr); break; \ |
95 | case 4: __get_kernel_asm("ldw",ptr); break; \ | 92 | case 4: __get_kernel_asm("ldw",ptr); break; \ |
96 | case 8: LDD_KERNEL(ptr); break; \ | 93 | case 8: LDD_KERNEL(ptr); break; \ |
97 | default: __get_kernel_bad(); break; \ | 94 | default: BUILD_BUG(); break; \ |
98 | } \ | 95 | } \ |
99 | } \ | 96 | } \ |
100 | else { \ | 97 | else { \ |
@@ -103,7 +100,7 @@ struct exception_data { | |||
103 | case 2: __get_user_asm("ldh",ptr); break; \ | 100 | case 2: __get_user_asm("ldh",ptr); break; \ |
104 | case 4: __get_user_asm("ldw",ptr); break; \ | 101 | case 4: __get_user_asm("ldw",ptr); break; \ |
105 | case 8: LDD_USER(ptr); break; \ | 102 | case 8: LDD_USER(ptr); break; \ |
106 | default: __get_user_bad(); break; \ | 103 | default: BUILD_BUG(); break; \ |
107 | } \ | 104 | } \ |
108 | } \ | 105 | } \ |
109 | \ | 106 | \ |
@@ -136,7 +133,7 @@ struct exception_data { | |||
136 | case 2: __put_kernel_asm("sth",__x,ptr); break; \ | 133 | case 2: __put_kernel_asm("sth",__x,ptr); break; \ |
137 | case 4: __put_kernel_asm("stw",__x,ptr); break; \ | 134 | case 4: __put_kernel_asm("stw",__x,ptr); break; \ |
138 | case 8: STD_KERNEL(__x,ptr); break; \ | 135 | case 8: STD_KERNEL(__x,ptr); break; \ |
139 | default: __put_kernel_bad(); break; \ | 136 | default: BUILD_BUG(); break; \ |
140 | } \ | 137 | } \ |
141 | } \ | 138 | } \ |
142 | else { \ | 139 | else { \ |
@@ -145,7 +142,7 @@ struct exception_data { | |||
145 | case 2: __put_user_asm("sth",__x,ptr); break; \ | 142 | case 2: __put_user_asm("sth",__x,ptr); break; \ |
146 | case 4: __put_user_asm("stw",__x,ptr); break; \ | 143 | case 4: __put_user_asm("stw",__x,ptr); break; \ |
147 | case 8: STD_USER(__x,ptr); break; \ | 144 | case 8: STD_USER(__x,ptr); break; \ |
148 | default: __put_user_bad(); break; \ | 145 | default: BUILD_BUG(); break; \ |
149 | } \ | 146 | } \ |
150 | } \ | 147 | } \ |
151 | \ | 148 | \ |
diff --git a/arch/parisc/include/uapi/asm/bitsperlong.h b/arch/parisc/include/uapi/asm/bitsperlong.h index 75196b415d3f..e0a23c7bdd43 100644 --- a/arch/parisc/include/uapi/asm/bitsperlong.h +++ b/arch/parisc/include/uapi/asm/bitsperlong.h | |||
@@ -1,13 +1,7 @@ | |||
1 | #ifndef __ASM_PARISC_BITSPERLONG_H | 1 | #ifndef __ASM_PARISC_BITSPERLONG_H |
2 | #define __ASM_PARISC_BITSPERLONG_H | 2 | #define __ASM_PARISC_BITSPERLONG_H |
3 | 3 | ||
4 | /* | 4 | #if defined(__LP64__) |
5 | * using CONFIG_* outside of __KERNEL__ is wrong, | ||
6 | * __LP64__ was also removed from headers, so what | ||
7 | * is the right approach on parisc? | ||
8 | * -arnd | ||
9 | */ | ||
10 | #if (defined(__KERNEL__) && defined(CONFIG_64BIT)) || defined (__LP64__) | ||
11 | #define __BITS_PER_LONG 64 | 5 | #define __BITS_PER_LONG 64 |
12 | #define SHIFT_PER_LONG 6 | 6 | #define SHIFT_PER_LONG 6 |
13 | #else | 7 | #else |
diff --git a/arch/parisc/include/uapi/asm/msgbuf.h b/arch/parisc/include/uapi/asm/msgbuf.h index fe88f2649418..342138983914 100644 --- a/arch/parisc/include/uapi/asm/msgbuf.h +++ b/arch/parisc/include/uapi/asm/msgbuf.h | |||
@@ -1,6 +1,8 @@ | |||
1 | #ifndef _PARISC_MSGBUF_H | 1 | #ifndef _PARISC_MSGBUF_H |
2 | #define _PARISC_MSGBUF_H | 2 | #define _PARISC_MSGBUF_H |
3 | 3 | ||
4 | #include <asm/bitsperlong.h> | ||
5 | |||
4 | /* | 6 | /* |
5 | * The msqid64_ds structure for parisc architecture, copied from sparc. | 7 | * The msqid64_ds structure for parisc architecture, copied from sparc. |
6 | * Note extra padding because this structure is passed back and forth | 8 | * Note extra padding because this structure is passed back and forth |
@@ -13,15 +15,15 @@ | |||
13 | 15 | ||
14 | struct msqid64_ds { | 16 | struct msqid64_ds { |
15 | struct ipc64_perm msg_perm; | 17 | struct ipc64_perm msg_perm; |
16 | #ifndef CONFIG_64BIT | 18 | #if __BITS_PER_LONG != 64 |
17 | unsigned int __pad1; | 19 | unsigned int __pad1; |
18 | #endif | 20 | #endif |
19 | __kernel_time_t msg_stime; /* last msgsnd time */ | 21 | __kernel_time_t msg_stime; /* last msgsnd time */ |
20 | #ifndef CONFIG_64BIT | 22 | #if __BITS_PER_LONG != 64 |
21 | unsigned int __pad2; | 23 | unsigned int __pad2; |
22 | #endif | 24 | #endif |
23 | __kernel_time_t msg_rtime; /* last msgrcv time */ | 25 | __kernel_time_t msg_rtime; /* last msgrcv time */ |
24 | #ifndef CONFIG_64BIT | 26 | #if __BITS_PER_LONG != 64 |
25 | unsigned int __pad3; | 27 | unsigned int __pad3; |
26 | #endif | 28 | #endif |
27 | __kernel_time_t msg_ctime; /* last change time */ | 29 | __kernel_time_t msg_ctime; /* last change time */ |
diff --git a/arch/parisc/include/uapi/asm/sembuf.h b/arch/parisc/include/uapi/asm/sembuf.h index 1e59ffd3bd1e..f01d89e30d73 100644 --- a/arch/parisc/include/uapi/asm/sembuf.h +++ b/arch/parisc/include/uapi/asm/sembuf.h | |||
@@ -1,6 +1,8 @@ | |||
1 | #ifndef _PARISC_SEMBUF_H | 1 | #ifndef _PARISC_SEMBUF_H |
2 | #define _PARISC_SEMBUF_H | 2 | #define _PARISC_SEMBUF_H |
3 | 3 | ||
4 | #include <asm/bitsperlong.h> | ||
5 | |||
4 | /* | 6 | /* |
5 | * The semid64_ds structure for parisc architecture. | 7 | * The semid64_ds structure for parisc architecture. |
6 | * Note extra padding because this structure is passed back and forth | 8 | * Note extra padding because this structure is passed back and forth |
@@ -13,11 +15,11 @@ | |||
13 | 15 | ||
14 | struct semid64_ds { | 16 | struct semid64_ds { |
15 | struct ipc64_perm sem_perm; /* permissions .. see ipc.h */ | 17 | struct ipc64_perm sem_perm; /* permissions .. see ipc.h */ |
16 | #ifndef CONFIG_64BIT | 18 | #if __BITS_PER_LONG != 64 |
17 | unsigned int __pad1; | 19 | unsigned int __pad1; |
18 | #endif | 20 | #endif |
19 | __kernel_time_t sem_otime; /* last semop time */ | 21 | __kernel_time_t sem_otime; /* last semop time */ |
20 | #ifndef CONFIG_64BIT | 22 | #if __BITS_PER_LONG != 64 |
21 | unsigned int __pad2; | 23 | unsigned int __pad2; |
22 | #endif | 24 | #endif |
23 | __kernel_time_t sem_ctime; /* last change time */ | 25 | __kernel_time_t sem_ctime; /* last change time */ |
diff --git a/arch/parisc/include/uapi/asm/shmbuf.h b/arch/parisc/include/uapi/asm/shmbuf.h index 0a3eada1863b..8496c38560c6 100644 --- a/arch/parisc/include/uapi/asm/shmbuf.h +++ b/arch/parisc/include/uapi/asm/shmbuf.h | |||
@@ -1,6 +1,8 @@ | |||
1 | #ifndef _PARISC_SHMBUF_H | 1 | #ifndef _PARISC_SHMBUF_H |
2 | #define _PARISC_SHMBUF_H | 2 | #define _PARISC_SHMBUF_H |
3 | 3 | ||
4 | #include <asm/bitsperlong.h> | ||
5 | |||
4 | /* | 6 | /* |
5 | * The shmid64_ds structure for parisc architecture. | 7 | * The shmid64_ds structure for parisc architecture. |
6 | * Note extra padding because this structure is passed back and forth | 8 | * Note extra padding because this structure is passed back and forth |
@@ -13,19 +15,19 @@ | |||
13 | 15 | ||
14 | struct shmid64_ds { | 16 | struct shmid64_ds { |
15 | struct ipc64_perm shm_perm; /* operation perms */ | 17 | struct ipc64_perm shm_perm; /* operation perms */ |
16 | #ifndef CONFIG_64BIT | 18 | #if __BITS_PER_LONG != 64 |
17 | unsigned int __pad1; | 19 | unsigned int __pad1; |
18 | #endif | 20 | #endif |
19 | __kernel_time_t shm_atime; /* last attach time */ | 21 | __kernel_time_t shm_atime; /* last attach time */ |
20 | #ifndef CONFIG_64BIT | 22 | #if __BITS_PER_LONG != 64 |
21 | unsigned int __pad2; | 23 | unsigned int __pad2; |
22 | #endif | 24 | #endif |
23 | __kernel_time_t shm_dtime; /* last detach time */ | 25 | __kernel_time_t shm_dtime; /* last detach time */ |
24 | #ifndef CONFIG_64BIT | 26 | #if __BITS_PER_LONG != 64 |
25 | unsigned int __pad3; | 27 | unsigned int __pad3; |
26 | #endif | 28 | #endif |
27 | __kernel_time_t shm_ctime; /* last change time */ | 29 | __kernel_time_t shm_ctime; /* last change time */ |
28 | #ifndef CONFIG_64BIT | 30 | #if __BITS_PER_LONG != 64 |
29 | unsigned int __pad4; | 31 | unsigned int __pad4; |
30 | #endif | 32 | #endif |
31 | size_t shm_segsz; /* size of segment (bytes) */ | 33 | size_t shm_segsz; /* size of segment (bytes) */ |
@@ -36,23 +38,16 @@ struct shmid64_ds { | |||
36 | unsigned int __unused2; | 38 | unsigned int __unused2; |
37 | }; | 39 | }; |
38 | 40 | ||
39 | #ifdef CONFIG_64BIT | ||
40 | /* The 'unsigned int' (formerly 'unsigned long') data types below will | ||
41 | * ensure that a 32-bit app calling shmctl(*,IPC_INFO,*) will work on | ||
42 | * a wide kernel, but if some of these values are meant to contain pointers | ||
43 | * they may need to be 'long long' instead. -PB XXX FIXME | ||
44 | */ | ||
45 | #endif | ||
46 | struct shminfo64 { | 41 | struct shminfo64 { |
47 | unsigned int shmmax; | 42 | unsigned long shmmax; |
48 | unsigned int shmmin; | 43 | unsigned long shmmin; |
49 | unsigned int shmmni; | 44 | unsigned long shmmni; |
50 | unsigned int shmseg; | 45 | unsigned long shmseg; |
51 | unsigned int shmall; | 46 | unsigned long shmall; |
52 | unsigned int __unused1; | 47 | unsigned long __unused1; |
53 | unsigned int __unused2; | 48 | unsigned long __unused2; |
54 | unsigned int __unused3; | 49 | unsigned long __unused3; |
55 | unsigned int __unused4; | 50 | unsigned long __unused4; |
56 | }; | 51 | }; |
57 | 52 | ||
58 | #endif /* _PARISC_SHMBUF_H */ | 53 | #endif /* _PARISC_SHMBUF_H */ |
diff --git a/arch/parisc/include/uapi/asm/signal.h b/arch/parisc/include/uapi/asm/signal.h index 10df7079f4cd..e26043b73f5d 100644 --- a/arch/parisc/include/uapi/asm/signal.h +++ b/arch/parisc/include/uapi/asm/signal.h | |||
@@ -85,7 +85,7 @@ | |||
85 | struct siginfo; | 85 | struct siginfo; |
86 | 86 | ||
87 | /* Type of a signal handler. */ | 87 | /* Type of a signal handler. */ |
88 | #ifdef CONFIG_64BIT | 88 | #if defined(__LP64__) |
89 | /* function pointers on 64-bit parisc are pointers to little structs and the | 89 | /* function pointers on 64-bit parisc are pointers to little structs and the |
90 | * compiler doesn't support code which changes or tests the address of | 90 | * compiler doesn't support code which changes or tests the address of |
91 | * the function in the little struct. This is really ugly -PB | 91 | * the function in the little struct. This is really ugly -PB |
diff --git a/arch/parisc/include/uapi/asm/unistd.h b/arch/parisc/include/uapi/asm/unistd.h index 8667f18be238..5f5c0373de63 100644 --- a/arch/parisc/include/uapi/asm/unistd.h +++ b/arch/parisc/include/uapi/asm/unistd.h | |||
@@ -833,8 +833,9 @@ | |||
833 | #define __NR_seccomp (__NR_Linux + 338) | 833 | #define __NR_seccomp (__NR_Linux + 338) |
834 | #define __NR_getrandom (__NR_Linux + 339) | 834 | #define __NR_getrandom (__NR_Linux + 339) |
835 | #define __NR_memfd_create (__NR_Linux + 340) | 835 | #define __NR_memfd_create (__NR_Linux + 340) |
836 | #define __NR_bpf (__NR_Linux + 341) | ||
836 | 837 | ||
837 | #define __NR_Linux_syscalls (__NR_memfd_create + 1) | 838 | #define __NR_Linux_syscalls (__NR_bpf + 1) |
838 | 839 | ||
839 | 840 | ||
840 | #define __IGNORE_select /* newselect */ | 841 | #define __IGNORE_select /* newselect */ |
diff --git a/arch/parisc/kernel/syscall_table.S b/arch/parisc/kernel/syscall_table.S index b563d9c8268b..fe4f0b89bf8f 100644 --- a/arch/parisc/kernel/syscall_table.S +++ b/arch/parisc/kernel/syscall_table.S | |||
@@ -286,11 +286,11 @@ | |||
286 | ENTRY_COMP(msgsnd) | 286 | ENTRY_COMP(msgsnd) |
287 | ENTRY_COMP(msgrcv) | 287 | ENTRY_COMP(msgrcv) |
288 | ENTRY_SAME(msgget) /* 190 */ | 288 | ENTRY_SAME(msgget) /* 190 */ |
289 | ENTRY_SAME(msgctl) | 289 | ENTRY_COMP(msgctl) |
290 | ENTRY_SAME(shmat) | 290 | ENTRY_COMP(shmat) |
291 | ENTRY_SAME(shmdt) | 291 | ENTRY_SAME(shmdt) |
292 | ENTRY_SAME(shmget) | 292 | ENTRY_SAME(shmget) |
293 | ENTRY_SAME(shmctl) /* 195 */ | 293 | ENTRY_COMP(shmctl) /* 195 */ |
294 | ENTRY_SAME(ni_syscall) /* streams1 */ | 294 | ENTRY_SAME(ni_syscall) /* streams1 */ |
295 | ENTRY_SAME(ni_syscall) /* streams2 */ | 295 | ENTRY_SAME(ni_syscall) /* streams2 */ |
296 | ENTRY_SAME(lstat64) | 296 | ENTRY_SAME(lstat64) |
@@ -323,7 +323,7 @@ | |||
323 | ENTRY_SAME(epoll_ctl) /* 225 */ | 323 | ENTRY_SAME(epoll_ctl) /* 225 */ |
324 | ENTRY_SAME(epoll_wait) | 324 | ENTRY_SAME(epoll_wait) |
325 | ENTRY_SAME(remap_file_pages) | 325 | ENTRY_SAME(remap_file_pages) |
326 | ENTRY_SAME(semtimedop) | 326 | ENTRY_COMP(semtimedop) |
327 | ENTRY_COMP(mq_open) | 327 | ENTRY_COMP(mq_open) |
328 | ENTRY_SAME(mq_unlink) /* 230 */ | 328 | ENTRY_SAME(mq_unlink) /* 230 */ |
329 | ENTRY_COMP(mq_timedsend) | 329 | ENTRY_COMP(mq_timedsend) |
@@ -436,6 +436,7 @@ | |||
436 | ENTRY_SAME(seccomp) | 436 | ENTRY_SAME(seccomp) |
437 | ENTRY_SAME(getrandom) | 437 | ENTRY_SAME(getrandom) |
438 | ENTRY_SAME(memfd_create) /* 340 */ | 438 | ENTRY_SAME(memfd_create) /* 340 */ |
439 | ENTRY_SAME(bpf) | ||
439 | 440 | ||
440 | /* Nothing yet */ | 441 | /* Nothing yet */ |
441 | 442 | ||