aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-generic
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2012-10-30 03:20:56 -0400
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2012-10-30 03:20:56 -0400
commit53279f36dccffc26ff536003fd6bb97cc21c3b82 (patch)
tree9d16e497c0e4158c7c054c479bd0e9ff0388d7bb /include/asm-generic
parenta6e8c0a25377e27958b11b20e1927885ae7c9857 (diff)
parent8f0d8163b50e01f398b14bcd4dc039ac5ab18d64 (diff)
Merge tag 'v3.7-rc3' into next to sync up with recent USB and MFD changes
Diffstat (limited to 'include/asm-generic')
-rw-r--r--include/asm-generic/Kbuild35
-rw-r--r--include/asm-generic/Kbuild.asm46
-rw-r--r--include/asm-generic/auxvec.h8
-rw-r--r--include/asm-generic/bitops/builtin-__ffs.h15
-rw-r--r--include/asm-generic/bitops/builtin-__fls.h15
-rw-r--r--include/asm-generic/bitops/builtin-ffs.h17
-rw-r--r--include/asm-generic/bitops/builtin-fls.h16
-rw-r--r--include/asm-generic/bitops/count_zeros.h57
-rw-r--r--include/asm-generic/bitops/le.h10
-rw-r--r--include/asm-generic/bitsperlong.h13
-rw-r--r--include/asm-generic/clkdev.h28
-rw-r--r--include/asm-generic/errno-base.h39
-rw-r--r--include/asm-generic/errno.h113
-rw-r--r--include/asm-generic/fcntl.h199
-rw-r--r--include/asm-generic/gpio.h2
-rw-r--r--include/asm-generic/int-l64.h26
-rw-r--r--include/asm-generic/int-ll64.h31
-rw-r--r--include/asm-generic/ioctl.h95
-rw-r--r--include/asm-generic/ioctls.h114
-rw-r--r--include/asm-generic/ipcbuf.h34
-rw-r--r--include/asm-generic/kvm_para.h5
-rw-r--r--include/asm-generic/mman-common.h58
-rw-r--r--include/asm-generic/mman.h19
-rw-r--r--include/asm-generic/module.h40
-rw-r--r--include/asm-generic/msgbuf.h47
-rw-r--r--include/asm-generic/param.h17
-rw-r--r--include/asm-generic/pgtable.h72
-rw-r--r--include/asm-generic/poll.h39
-rw-r--r--include/asm-generic/posix_types.h96
-rw-r--r--include/asm-generic/resource.h66
-rw-r--r--include/asm-generic/sembuf.h38
-rw-r--r--include/asm-generic/setup.h6
-rw-r--r--include/asm-generic/shmbuf.h59
-rw-r--r--include/asm-generic/shmparam.h6
-rw-r--r--include/asm-generic/siginfo.h297
-rw-r--r--include/asm-generic/signal-defs.h28
-rw-r--r--include/asm-generic/signal.h117
-rw-r--r--include/asm-generic/socket.h75
-rw-r--r--include/asm-generic/sockios.h13
-rw-r--r--include/asm-generic/stat.h72
-rw-r--r--include/asm-generic/statfs.h81
-rw-r--r--include/asm-generic/swab.h18
-rw-r--r--include/asm-generic/termbits.h199
-rw-r--r--include/asm-generic/termios.h49
-rw-r--r--include/asm-generic/types.h9
-rw-r--r--include/asm-generic/ucontext.h12
-rw-r--r--include/asm-generic/unistd.h909
-rw-r--r--include/asm-generic/vmlinux.lds.h9
-rw-r--r--include/asm-generic/xor.h4
49 files changed, 266 insertions, 3107 deletions
diff --git a/include/asm-generic/Kbuild b/include/asm-generic/Kbuild
deleted file mode 100644
index 2c85a0f647b7..000000000000
--- a/include/asm-generic/Kbuild
+++ /dev/null
@@ -1,35 +0,0 @@
1header-y += auxvec.h
2header-y += bitsperlong.h
3header-y += errno-base.h
4header-y += errno.h
5header-y += fcntl.h
6header-y += int-l64.h
7header-y += int-ll64.h
8header-y += ioctl.h
9header-y += ioctls.h
10header-y += ipcbuf.h
11header-y += kvm_para.h
12header-y += mman-common.h
13header-y += mman.h
14header-y += msgbuf.h
15header-y += param.h
16header-y += poll.h
17header-y += posix_types.h
18header-y += resource.h
19header-y += sembuf.h
20header-y += setup.h
21header-y += shmbuf.h
22header-y += shmparam.h
23header-y += siginfo.h
24header-y += signal-defs.h
25header-y += signal.h
26header-y += socket.h
27header-y += sockios.h
28header-y += stat.h
29header-y += statfs.h
30header-y += swab.h
31header-y += termbits.h
32header-y += termios.h
33header-y += types.h
34header-y += ucontext.h
35header-y += unistd.h
diff --git a/include/asm-generic/Kbuild.asm b/include/asm-generic/Kbuild.asm
index c5d2e5dd871b..d2ee86b4c091 100644
--- a/include/asm-generic/Kbuild.asm
+++ b/include/asm-generic/Kbuild.asm
@@ -1,45 +1 @@
1ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/kvm.h \ include include/uapi/asm-generic/Kbuild.asm
2 $(srctree)/include/asm-$(SRCARCH)/kvm.h),)
3header-y += kvm.h
4endif
5
6ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/kvm_para.h \
7 $(srctree)/include/asm-$(SRCARCH)/kvm_para.h),)
8header-y += kvm_para.h
9endif
10
11ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/a.out.h \
12 $(srctree)/include/asm-$(SRCARCH)/a.out.h),)
13header-y += a.out.h
14endif
15
16header-y += auxvec.h
17header-y += bitsperlong.h
18header-y += byteorder.h
19header-y += errno.h
20header-y += fcntl.h
21header-y += ioctl.h
22header-y += ioctls.h
23header-y += ipcbuf.h
24header-y += mman.h
25header-y += msgbuf.h
26header-y += param.h
27header-y += poll.h
28header-y += posix_types.h
29header-y += ptrace.h
30header-y += resource.h
31header-y += sembuf.h
32header-y += setup.h
33header-y += shmbuf.h
34header-y += sigcontext.h
35header-y += siginfo.h
36header-y += signal.h
37header-y += socket.h
38header-y += sockios.h
39header-y += stat.h
40header-y += statfs.h
41header-y += swab.h
42header-y += termbits.h
43header-y += termios.h
44header-y += types.h
45header-y += unistd.h
diff --git a/include/asm-generic/auxvec.h b/include/asm-generic/auxvec.h
deleted file mode 100644
index b99573b0ad12..000000000000
--- a/include/asm-generic/auxvec.h
+++ /dev/null
@@ -1,8 +0,0 @@
1#ifndef __ASM_GENERIC_AUXVEC_H
2#define __ASM_GENERIC_AUXVEC_H
3/*
4 * Not all architectures need their own auxvec.h, the most
5 * common definitions are already in linux/auxvec.h.
6 */
7
8#endif /* __ASM_GENERIC_AUXVEC_H */
diff --git a/include/asm-generic/bitops/builtin-__ffs.h b/include/asm-generic/bitops/builtin-__ffs.h
new file mode 100644
index 000000000000..90041e3a41f0
--- /dev/null
+++ b/include/asm-generic/bitops/builtin-__ffs.h
@@ -0,0 +1,15 @@
1#ifndef _ASM_GENERIC_BITOPS_BUILTIN___FFS_H_
2#define _ASM_GENERIC_BITOPS_BUILTIN___FFS_H_
3
4/**
5 * __ffs - find first bit in word.
6 * @word: The word to search
7 *
8 * Undefined if no bit exists, so code should check against 0 first.
9 */
10static __always_inline unsigned long __ffs(unsigned long word)
11{
12 return __builtin_ctzl(word);
13}
14
15#endif
diff --git a/include/asm-generic/bitops/builtin-__fls.h b/include/asm-generic/bitops/builtin-__fls.h
new file mode 100644
index 000000000000..0248f386635f
--- /dev/null
+++ b/include/asm-generic/bitops/builtin-__fls.h
@@ -0,0 +1,15 @@
1#ifndef _ASM_GENERIC_BITOPS_BUILTIN___FLS_H_
2#define _ASM_GENERIC_BITOPS_BUILTIN___FLS_H_
3
4/**
5 * __fls - find last (most-significant) set bit in a long word
6 * @word: the word to search
7 *
8 * Undefined if no set bit exists, so code should check against 0 first.
9 */
10static __always_inline unsigned long __fls(unsigned long word)
11{
12 return (sizeof(word) * 8) - 1 - __builtin_clzl(word);
13}
14
15#endif
diff --git a/include/asm-generic/bitops/builtin-ffs.h b/include/asm-generic/bitops/builtin-ffs.h
new file mode 100644
index 000000000000..064825829e1c
--- /dev/null
+++ b/include/asm-generic/bitops/builtin-ffs.h
@@ -0,0 +1,17 @@
1#ifndef _ASM_GENERIC_BITOPS_BUILTIN_FFS_H_
2#define _ASM_GENERIC_BITOPS_BUILTIN_FFS_H_
3
4/**
5 * ffs - find first bit set
6 * @x: the word to search
7 *
8 * This is defined the same way as
9 * the libc and compiler builtin ffs routines, therefore
10 * differs in spirit from the above ffz (man ffs).
11 */
12static __always_inline int ffs(int x)
13{
14 return __builtin_ffs(x);
15}
16
17#endif
diff --git a/include/asm-generic/bitops/builtin-fls.h b/include/asm-generic/bitops/builtin-fls.h
new file mode 100644
index 000000000000..eda652d0ac7f
--- /dev/null
+++ b/include/asm-generic/bitops/builtin-fls.h
@@ -0,0 +1,16 @@
1#ifndef _ASM_GENERIC_BITOPS_BUILTIN_FLS_H_
2#define _ASM_GENERIC_BITOPS_BUILTIN_FLS_H_
3
4/**
5 * fls - find last (most-significant) bit set
6 * @x: the word to search
7 *
8 * This is defined the same way as ffs.
9 * Note fls(0) = 0, fls(1) = 1, fls(0x80000000) = 32.
10 */
11static __always_inline int fls(int x)
12{
13 return x ? sizeof(x) * 8 - __builtin_clz(x) : 0;
14}
15
16#endif
diff --git a/include/asm-generic/bitops/count_zeros.h b/include/asm-generic/bitops/count_zeros.h
new file mode 100644
index 000000000000..97520d21fe62
--- /dev/null
+++ b/include/asm-generic/bitops/count_zeros.h
@@ -0,0 +1,57 @@
1/* Count leading and trailing zeros functions
2 *
3 * Copyright (C) 2012 Red Hat, Inc. All Rights Reserved.
4 * Written by David Howells (dhowells@redhat.com)
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public Licence
8 * as published by the Free Software Foundation; either version
9 * 2 of the Licence, or (at your option) any later version.
10 */
11
12#ifndef _ASM_GENERIC_BITOPS_COUNT_ZEROS_H_
13#define _ASM_GENERIC_BITOPS_COUNT_ZEROS_H_
14
15#include <asm/bitops.h>
16
17/**
18 * count_leading_zeros - Count the number of zeros from the MSB back
19 * @x: The value
20 *
21 * Count the number of leading zeros from the MSB going towards the LSB in @x.
22 *
23 * If the MSB of @x is set, the result is 0.
24 * If only the LSB of @x is set, then the result is BITS_PER_LONG-1.
25 * If @x is 0 then the result is COUNT_LEADING_ZEROS_0.
26 */
27static inline int count_leading_zeros(unsigned long x)
28{
29 if (sizeof(x) == 4)
30 return BITS_PER_LONG - fls(x);
31 else
32 return BITS_PER_LONG - fls64(x);
33}
34
35#define COUNT_LEADING_ZEROS_0 BITS_PER_LONG
36
37/**
38 * count_trailing_zeros - Count the number of zeros from the LSB forwards
39 * @x: The value
40 *
41 * Count the number of trailing zeros from the LSB going towards the MSB in @x.
42 *
43 * If the LSB of @x is set, the result is 0.
44 * If only the MSB of @x is set, then the result is BITS_PER_LONG-1.
45 * If @x is 0 then the result is COUNT_TRAILING_ZEROS_0.
46 */
47static inline int count_trailing_zeros(unsigned long x)
48{
49#define COUNT_TRAILING_ZEROS_0 (-1)
50
51 if (sizeof(x) == 4)
52 return ffs(x);
53 else
54 return (x != 0) ? __ffs(x) : COUNT_TRAILING_ZEROS_0;
55}
56
57#endif /* _ASM_GENERIC_BITOPS_COUNT_ZEROS_H_ */
diff --git a/include/asm-generic/bitops/le.h b/include/asm-generic/bitops/le.h
index f95c663a6a41..61731543c00e 100644
--- a/include/asm-generic/bitops/le.h
+++ b/include/asm-generic/bitops/le.h
@@ -54,6 +54,16 @@ static inline int test_bit_le(int nr, const void *addr)
54 return test_bit(nr ^ BITOP_LE_SWIZZLE, addr); 54 return test_bit(nr ^ BITOP_LE_SWIZZLE, addr);
55} 55}
56 56
57static inline void set_bit_le(int nr, void *addr)
58{
59 set_bit(nr ^ BITOP_LE_SWIZZLE, addr);
60}
61
62static inline void clear_bit_le(int nr, void *addr)
63{
64 clear_bit(nr ^ BITOP_LE_SWIZZLE, addr);
65}
66
57static inline void __set_bit_le(int nr, void *addr) 67static inline void __set_bit_le(int nr, void *addr)
58{ 68{
59 __set_bit(nr ^ BITOP_LE_SWIZZLE, addr); 69 __set_bit(nr ^ BITOP_LE_SWIZZLE, addr);
diff --git a/include/asm-generic/bitsperlong.h b/include/asm-generic/bitsperlong.h
index a7b0914348fd..d1d70aa19021 100644
--- a/include/asm-generic/bitsperlong.h
+++ b/include/asm-generic/bitsperlong.h
@@ -1,18 +1,8 @@
1#ifndef __ASM_GENERIC_BITS_PER_LONG 1#ifndef __ASM_GENERIC_BITS_PER_LONG
2#define __ASM_GENERIC_BITS_PER_LONG 2#define __ASM_GENERIC_BITS_PER_LONG
3 3
4/* 4#include <uapi/asm-generic/bitsperlong.h>
5 * There seems to be no way of detecting this automatically from user
6 * space, so 64 bit architectures should override this in their
7 * bitsperlong.h. In particular, an architecture that supports
8 * both 32 and 64 bit user space must not rely on CONFIG_64BIT
9 * to decide it, but rather check a compiler provided macro.
10 */
11#ifndef __BITS_PER_LONG
12#define __BITS_PER_LONG 32
13#endif
14 5
15#ifdef __KERNEL__
16 6
17#ifdef CONFIG_64BIT 7#ifdef CONFIG_64BIT
18#define BITS_PER_LONG 64 8#define BITS_PER_LONG 64
@@ -32,5 +22,4 @@
32#define BITS_PER_LONG_LONG 64 22#define BITS_PER_LONG_LONG 64
33#endif 23#endif
34 24
35#endif /* __KERNEL__ */
36#endif /* __ASM_GENERIC_BITS_PER_LONG */ 25#endif /* __ASM_GENERIC_BITS_PER_LONG */
diff --git a/include/asm-generic/clkdev.h b/include/asm-generic/clkdev.h
new file mode 100644
index 000000000000..90a32a61dd21
--- /dev/null
+++ b/include/asm-generic/clkdev.h
@@ -0,0 +1,28 @@
1/*
2 * include/asm-generic/clkdev.h
3 *
4 * Based on the ARM clkdev.h:
5 * Copyright (C) 2008 Russell King.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 *
11 * Helper for the clk API to assist looking up a struct clk.
12 */
13#ifndef __ASM_CLKDEV_H
14#define __ASM_CLKDEV_H
15
16#include <linux/slab.h>
17
18struct clk;
19
20static inline int __clk_get(struct clk *clk) { return 1; }
21static inline void __clk_put(struct clk *clk) { }
22
23static inline struct clk_lookup_alloc *__clkdev_alloc(size_t size)
24{
25 return kzalloc(size, GFP_KERNEL);
26}
27
28#endif
diff --git a/include/asm-generic/errno-base.h b/include/asm-generic/errno-base.h
deleted file mode 100644
index 65115978510f..000000000000
--- a/include/asm-generic/errno-base.h
+++ /dev/null
@@ -1,39 +0,0 @@
1#ifndef _ASM_GENERIC_ERRNO_BASE_H
2#define _ASM_GENERIC_ERRNO_BASE_H
3
4#define EPERM 1 /* Operation not permitted */
5#define ENOENT 2 /* No such file or directory */
6#define ESRCH 3 /* No such process */
7#define EINTR 4 /* Interrupted system call */
8#define EIO 5 /* I/O error */
9#define ENXIO 6 /* No such device or address */
10#define E2BIG 7 /* Argument list too long */
11#define ENOEXEC 8 /* Exec format error */
12#define EBADF 9 /* Bad file number */
13#define ECHILD 10 /* No child processes */
14#define EAGAIN 11 /* Try again */
15#define ENOMEM 12 /* Out of memory */
16#define EACCES 13 /* Permission denied */
17#define EFAULT 14 /* Bad address */
18#define ENOTBLK 15 /* Block device required */
19#define EBUSY 16 /* Device or resource busy */
20#define EEXIST 17 /* File exists */
21#define EXDEV 18 /* Cross-device link */
22#define ENODEV 19 /* No such device */
23#define ENOTDIR 20 /* Not a directory */
24#define EISDIR 21 /* Is a directory */
25#define EINVAL 22 /* Invalid argument */
26#define ENFILE 23 /* File table overflow */
27#define EMFILE 24 /* Too many open files */
28#define ENOTTY 25 /* Not a typewriter */
29#define ETXTBSY 26 /* Text file busy */
30#define EFBIG 27 /* File too large */
31#define ENOSPC 28 /* No space left on device */
32#define ESPIPE 29 /* Illegal seek */
33#define EROFS 30 /* Read-only file system */
34#define EMLINK 31 /* Too many links */
35#define EPIPE 32 /* Broken pipe */
36#define EDOM 33 /* Math argument out of domain of func */
37#define ERANGE 34 /* Math result not representable */
38
39#endif
diff --git a/include/asm-generic/errno.h b/include/asm-generic/errno.h
deleted file mode 100644
index a1331ce50445..000000000000
--- a/include/asm-generic/errno.h
+++ /dev/null
@@ -1,113 +0,0 @@
1#ifndef _ASM_GENERIC_ERRNO_H
2#define _ASM_GENERIC_ERRNO_H
3
4#include <asm-generic/errno-base.h>
5
6#define EDEADLK 35 /* Resource deadlock would occur */
7#define ENAMETOOLONG 36 /* File name too long */
8#define ENOLCK 37 /* No record locks available */
9#define ENOSYS 38 /* Function not implemented */
10#define ENOTEMPTY 39 /* Directory not empty */
11#define ELOOP 40 /* Too many symbolic links encountered */
12#define EWOULDBLOCK EAGAIN /* Operation would block */
13#define ENOMSG 42 /* No message of desired type */
14#define EIDRM 43 /* Identifier removed */
15#define ECHRNG 44 /* Channel number out of range */
16#define EL2NSYNC 45 /* Level 2 not synchronized */
17#define EL3HLT 46 /* Level 3 halted */
18#define EL3RST 47 /* Level 3 reset */
19#define ELNRNG 48 /* Link number out of range */
20#define EUNATCH 49 /* Protocol driver not attached */
21#define ENOCSI 50 /* No CSI structure available */
22#define EL2HLT 51 /* Level 2 halted */
23#define EBADE 52 /* Invalid exchange */
24#define EBADR 53 /* Invalid request descriptor */
25#define EXFULL 54 /* Exchange full */
26#define ENOANO 55 /* No anode */
27#define EBADRQC 56 /* Invalid request code */
28#define EBADSLT 57 /* Invalid slot */
29
30#define EDEADLOCK EDEADLK
31
32#define EBFONT 59 /* Bad font file format */
33#define ENOSTR 60 /* Device not a stream */
34#define ENODATA 61 /* No data available */
35#define ETIME 62 /* Timer expired */
36#define ENOSR 63 /* Out of streams resources */
37#define ENONET 64 /* Machine is not on the network */
38#define ENOPKG 65 /* Package not installed */
39#define EREMOTE 66 /* Object is remote */
40#define ENOLINK 67 /* Link has been severed */
41#define EADV 68 /* Advertise error */
42#define ESRMNT 69 /* Srmount error */
43#define ECOMM 70 /* Communication error on send */
44#define EPROTO 71 /* Protocol error */
45#define EMULTIHOP 72 /* Multihop attempted */
46#define EDOTDOT 73 /* RFS specific error */
47#define EBADMSG 74 /* Not a data message */
48#define EOVERFLOW 75 /* Value too large for defined data type */
49#define ENOTUNIQ 76 /* Name not unique on network */
50#define EBADFD 77 /* File descriptor in bad state */
51#define EREMCHG 78 /* Remote address changed */
52#define ELIBACC 79 /* Can not access a needed shared library */
53#define ELIBBAD 80 /* Accessing a corrupted shared library */
54#define ELIBSCN 81 /* .lib section in a.out corrupted */
55#define ELIBMAX 82 /* Attempting to link in too many shared libraries */
56#define ELIBEXEC 83 /* Cannot exec a shared library directly */
57#define EILSEQ 84 /* Illegal byte sequence */
58#define ERESTART 85 /* Interrupted system call should be restarted */
59#define ESTRPIPE 86 /* Streams pipe error */
60#define EUSERS 87 /* Too many users */
61#define ENOTSOCK 88 /* Socket operation on non-socket */
62#define EDESTADDRREQ 89 /* Destination address required */
63#define EMSGSIZE 90 /* Message too long */
64#define EPROTOTYPE 91 /* Protocol wrong type for socket */
65#define ENOPROTOOPT 92 /* Protocol not available */
66#define EPROTONOSUPPORT 93 /* Protocol not supported */
67#define ESOCKTNOSUPPORT 94 /* Socket type not supported */
68#define EOPNOTSUPP 95 /* Operation not supported on transport endpoint */
69#define EPFNOSUPPORT 96 /* Protocol family not supported */
70#define EAFNOSUPPORT 97 /* Address family not supported by protocol */
71#define EADDRINUSE 98 /* Address already in use */
72#define EADDRNOTAVAIL 99 /* Cannot assign requested address */
73#define ENETDOWN 100 /* Network is down */
74#define ENETUNREACH 101 /* Network is unreachable */
75#define ENETRESET 102 /* Network dropped connection because of reset */
76#define ECONNABORTED 103 /* Software caused connection abort */
77#define ECONNRESET 104 /* Connection reset by peer */
78#define ENOBUFS 105 /* No buffer space available */
79#define EISCONN 106 /* Transport endpoint is already connected */
80#define ENOTCONN 107 /* Transport endpoint is not connected */
81#define ESHUTDOWN 108 /* Cannot send after transport endpoint shutdown */
82#define ETOOMANYREFS 109 /* Too many references: cannot splice */
83#define ETIMEDOUT 110 /* Connection timed out */
84#define ECONNREFUSED 111 /* Connection refused */
85#define EHOSTDOWN 112 /* Host is down */
86#define EHOSTUNREACH 113 /* No route to host */
87#define EALREADY 114 /* Operation already in progress */
88#define EINPROGRESS 115 /* Operation now in progress */
89#define ESTALE 116 /* Stale NFS file handle */
90#define EUCLEAN 117 /* Structure needs cleaning */
91#define ENOTNAM 118 /* Not a XENIX named type file */
92#define ENAVAIL 119 /* No XENIX semaphores available */
93#define EISNAM 120 /* Is a named type file */
94#define EREMOTEIO 121 /* Remote I/O error */
95#define EDQUOT 122 /* Quota exceeded */
96
97#define ENOMEDIUM 123 /* No medium found */
98#define EMEDIUMTYPE 124 /* Wrong medium type */
99#define ECANCELED 125 /* Operation Canceled */
100#define ENOKEY 126 /* Required key not available */
101#define EKEYEXPIRED 127 /* Key has expired */
102#define EKEYREVOKED 128 /* Key has been revoked */
103#define EKEYREJECTED 129 /* Key was rejected by service */
104
105/* for robust mutexes */
106#define EOWNERDEAD 130 /* Owner died */
107#define ENOTRECOVERABLE 131 /* State not recoverable */
108
109#define ERFKILL 132 /* Operation not possible due to RF-kill */
110
111#define EHWPOISON 133 /* Memory page has hardware error */
112
113#endif
diff --git a/include/asm-generic/fcntl.h b/include/asm-generic/fcntl.h
deleted file mode 100644
index a48937d4a5ea..000000000000
--- a/include/asm-generic/fcntl.h
+++ /dev/null
@@ -1,199 +0,0 @@
1#ifndef _ASM_GENERIC_FCNTL_H
2#define _ASM_GENERIC_FCNTL_H
3
4#include <linux/types.h>
5
6/*
7 * FMODE_EXEC is 0x20
8 * FMODE_NONOTIFY is 0x1000000
9 * These cannot be used by userspace O_* until internal and external open
10 * flags are split.
11 * -Eric Paris
12 */
13
14/*
15 * When introducing new O_* bits, please check its uniqueness in fcntl_init().
16 */
17
18#define O_ACCMODE 00000003
19#define O_RDONLY 00000000
20#define O_WRONLY 00000001
21#define O_RDWR 00000002
22#ifndef O_CREAT
23#define O_CREAT 00000100 /* not fcntl */
24#endif
25#ifndef O_EXCL
26#define O_EXCL 00000200 /* not fcntl */
27#endif
28#ifndef O_NOCTTY
29#define O_NOCTTY 00000400 /* not fcntl */
30#endif
31#ifndef O_TRUNC
32#define O_TRUNC 00001000 /* not fcntl */
33#endif
34#ifndef O_APPEND
35#define O_APPEND 00002000
36#endif
37#ifndef O_NONBLOCK
38#define O_NONBLOCK 00004000
39#endif
40#ifndef O_DSYNC
41#define O_DSYNC 00010000 /* used to be O_SYNC, see below */
42#endif
43#ifndef FASYNC
44#define FASYNC 00020000 /* fcntl, for BSD compatibility */
45#endif
46#ifndef O_DIRECT
47#define O_DIRECT 00040000 /* direct disk access hint */
48#endif
49#ifndef O_LARGEFILE
50#define O_LARGEFILE 00100000
51#endif
52#ifndef O_DIRECTORY
53#define O_DIRECTORY 00200000 /* must be a directory */
54#endif
55#ifndef O_NOFOLLOW
56#define O_NOFOLLOW 00400000 /* don't follow links */
57#endif
58#ifndef O_NOATIME
59#define O_NOATIME 01000000
60#endif
61#ifndef O_CLOEXEC
62#define O_CLOEXEC 02000000 /* set close_on_exec */
63#endif
64
65/*
66 * Before Linux 2.6.33 only O_DSYNC semantics were implemented, but using
67 * the O_SYNC flag. We continue to use the existing numerical value
68 * for O_DSYNC semantics now, but using the correct symbolic name for it.
69 * This new value is used to request true Posix O_SYNC semantics. It is
70 * defined in this strange way to make sure applications compiled against
71 * new headers get at least O_DSYNC semantics on older kernels.
72 *
73 * This has the nice side-effect that we can simply test for O_DSYNC
74 * wherever we do not care if O_DSYNC or O_SYNC is used.
75 *
76 * Note: __O_SYNC must never be used directly.
77 */
78#ifndef O_SYNC
79#define __O_SYNC 04000000
80#define O_SYNC (__O_SYNC|O_DSYNC)
81#endif
82
83#ifndef O_PATH
84#define O_PATH 010000000
85#endif
86
87#ifndef O_NDELAY
88#define O_NDELAY O_NONBLOCK
89#endif
90
91#define F_DUPFD 0 /* dup */
92#define F_GETFD 1 /* get close_on_exec */
93#define F_SETFD 2 /* set/clear close_on_exec */
94#define F_GETFL 3 /* get file->f_flags */
95#define F_SETFL 4 /* set file->f_flags */
96#ifndef F_GETLK
97#define F_GETLK 5
98#define F_SETLK 6
99#define F_SETLKW 7
100#endif
101#ifndef F_SETOWN
102#define F_SETOWN 8 /* for sockets. */
103#define F_GETOWN 9 /* for sockets. */
104#endif
105#ifndef F_SETSIG
106#define F_SETSIG 10 /* for sockets. */
107#define F_GETSIG 11 /* for sockets. */
108#endif
109
110#ifndef CONFIG_64BIT
111#ifndef F_GETLK64
112#define F_GETLK64 12 /* using 'struct flock64' */
113#define F_SETLK64 13
114#define F_SETLKW64 14
115#endif
116#endif
117
118#ifndef F_SETOWN_EX
119#define F_SETOWN_EX 15
120#define F_GETOWN_EX 16
121#endif
122
123#ifndef F_GETOWNER_UIDS
124#define F_GETOWNER_UIDS 17
125#endif
126
127#define F_OWNER_TID 0
128#define F_OWNER_PID 1
129#define F_OWNER_PGRP 2
130
131struct f_owner_ex {
132 int type;
133 __kernel_pid_t pid;
134};
135
136/* for F_[GET|SET]FL */
137#define FD_CLOEXEC 1 /* actually anything with low bit set goes */
138
139/* for posix fcntl() and lockf() */
140#ifndef F_RDLCK
141#define F_RDLCK 0
142#define F_WRLCK 1
143#define F_UNLCK 2
144#endif
145
146/* for old implementation of bsd flock () */
147#ifndef F_EXLCK
148#define F_EXLCK 4 /* or 3 */
149#define F_SHLCK 8 /* or 4 */
150#endif
151
152/* operations for bsd flock(), also used by the kernel implementation */
153#define LOCK_SH 1 /* shared lock */
154#define LOCK_EX 2 /* exclusive lock */
155#define LOCK_NB 4 /* or'd with one of the above to prevent
156 blocking */
157#define LOCK_UN 8 /* remove lock */
158
159#define LOCK_MAND 32 /* This is a mandatory flock ... */
160#define LOCK_READ 64 /* which allows concurrent read operations */
161#define LOCK_WRITE 128 /* which allows concurrent write operations */
162#define LOCK_RW 192 /* which allows concurrent read & write ops */
163
164#define F_LINUX_SPECIFIC_BASE 1024
165
166#ifndef HAVE_ARCH_STRUCT_FLOCK
167#ifndef __ARCH_FLOCK_PAD
168#define __ARCH_FLOCK_PAD
169#endif
170
171struct flock {
172 short l_type;
173 short l_whence;
174 __kernel_off_t l_start;
175 __kernel_off_t l_len;
176 __kernel_pid_t l_pid;
177 __ARCH_FLOCK_PAD
178};
179#endif
180
181#ifndef CONFIG_64BIT
182
183#ifndef HAVE_ARCH_STRUCT_FLOCK64
184#ifndef __ARCH_FLOCK64_PAD
185#define __ARCH_FLOCK64_PAD
186#endif
187
188struct flock64 {
189 short l_type;
190 short l_whence;
191 __kernel_loff_t l_start;
192 __kernel_loff_t l_len;
193 __kernel_pid_t l_pid;
194 __ARCH_FLOCK64_PAD
195};
196#endif
197#endif /* !CONFIG_64BIT */
198
199#endif /* _ASM_GENERIC_FCNTL_H */
diff --git a/include/asm-generic/gpio.h b/include/asm-generic/gpio.h
index 365ea09ed3b0..a9432fc6b8ba 100644
--- a/include/asm-generic/gpio.h
+++ b/include/asm-generic/gpio.h
@@ -60,6 +60,8 @@ struct device_node;
60 * @get: returns value for signal "offset"; for output signals this 60 * @get: returns value for signal "offset"; for output signals this
61 * returns either the value actually sensed, or zero 61 * returns either the value actually sensed, or zero
62 * @direction_output: configures signal "offset" as output, or returns error 62 * @direction_output: configures signal "offset" as output, or returns error
63 * @set_debounce: optional hook for setting debounce time for specified gpio in
64 * interrupt triggered gpio chips
63 * @set: assigns output value for signal "offset" 65 * @set: assigns output value for signal "offset"
64 * @to_irq: optional hook supporting non-static gpio_to_irq() mappings; 66 * @to_irq: optional hook supporting non-static gpio_to_irq() mappings;
65 * implementation may not sleep 67 * implementation may not sleep
diff --git a/include/asm-generic/int-l64.h b/include/asm-generic/int-l64.h
index 1ca3efc976cc..27d4ec0dfce0 100644
--- a/include/asm-generic/int-l64.h
+++ b/include/asm-generic/int-l64.h
@@ -4,33 +4,11 @@
4 * Integer declarations for architectures which use "long" 4 * Integer declarations for architectures which use "long"
5 * for 64-bit types. 5 * for 64-bit types.
6 */ 6 */
7
8#ifndef _ASM_GENERIC_INT_L64_H 7#ifndef _ASM_GENERIC_INT_L64_H
9#define _ASM_GENERIC_INT_L64_H 8#define _ASM_GENERIC_INT_L64_H
10 9
11#include <asm/bitsperlong.h> 10#include <uapi/asm-generic/int-l64.h>
12
13#ifndef __ASSEMBLY__
14/*
15 * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the
16 * header files exported to user space
17 */
18
19typedef __signed__ char __s8;
20typedef unsigned char __u8;
21 11
22typedef __signed__ short __s16;
23typedef unsigned short __u16;
24
25typedef __signed__ int __s32;
26typedef unsigned int __u32;
27
28typedef __signed__ long __s64;
29typedef unsigned long __u64;
30
31#endif /* __ASSEMBLY__ */
32
33#ifdef __KERNEL__
34 12
35#ifndef __ASSEMBLY__ 13#ifndef __ASSEMBLY__
36 14
@@ -68,6 +46,4 @@ typedef unsigned long u64;
68 46
69#endif /* __ASSEMBLY__ */ 47#endif /* __ASSEMBLY__ */
70 48
71#endif /* __KERNEL__ */
72
73#endif /* _ASM_GENERIC_INT_L64_H */ 49#endif /* _ASM_GENERIC_INT_L64_H */
diff --git a/include/asm-generic/int-ll64.h b/include/asm-generic/int-ll64.h
index f394147c0739..4cd84855cb46 100644
--- a/include/asm-generic/int-ll64.h
+++ b/include/asm-generic/int-ll64.h
@@ -4,38 +4,11 @@
4 * Integer declarations for architectures which use "long long" 4 * Integer declarations for architectures which use "long long"
5 * for 64-bit types. 5 * for 64-bit types.
6 */ 6 */
7
8#ifndef _ASM_GENERIC_INT_LL64_H 7#ifndef _ASM_GENERIC_INT_LL64_H
9#define _ASM_GENERIC_INT_LL64_H 8#define _ASM_GENERIC_INT_LL64_H
10 9
11#include <asm/bitsperlong.h> 10#include <uapi/asm-generic/int-ll64.h>
12
13#ifndef __ASSEMBLY__
14/*
15 * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the
16 * header files exported to user space
17 */
18
19typedef __signed__ char __s8;
20typedef unsigned char __u8;
21 11
22typedef __signed__ short __s16;
23typedef unsigned short __u16;
24
25typedef __signed__ int __s32;
26typedef unsigned int __u32;
27
28#ifdef __GNUC__
29__extension__ typedef __signed__ long long __s64;
30__extension__ typedef unsigned long long __u64;
31#else
32typedef __signed__ long long __s64;
33typedef unsigned long long __u64;
34#endif
35
36#endif /* __ASSEMBLY__ */
37
38#ifdef __KERNEL__
39 12
40#ifndef __ASSEMBLY__ 13#ifndef __ASSEMBLY__
41 14
@@ -73,6 +46,4 @@ typedef unsigned long long u64;
73 46
74#endif /* __ASSEMBLY__ */ 47#endif /* __ASSEMBLY__ */
75 48
76#endif /* __KERNEL__ */
77
78#endif /* _ASM_GENERIC_INT_LL64_H */ 49#endif /* _ASM_GENERIC_INT_LL64_H */
diff --git a/include/asm-generic/ioctl.h b/include/asm-generic/ioctl.h
index 15828b2d663c..d17295b290fa 100644
--- a/include/asm-generic/ioctl.h
+++ b/include/asm-generic/ioctl.h
@@ -1,105 +1,12 @@
1#ifndef _ASM_GENERIC_IOCTL_H 1#ifndef _ASM_GENERIC_IOCTL_H
2#define _ASM_GENERIC_IOCTL_H 2#define _ASM_GENERIC_IOCTL_H
3 3
4/* ioctl command encoding: 32 bits total, command in lower 16 bits, 4#include <uapi/asm-generic/ioctl.h>
5 * size of the parameter structure in the lower 14 bits of the
6 * upper 16 bits.
7 * Encoding the size of the parameter structure in the ioctl request
8 * is useful for catching programs compiled with old versions
9 * and to avoid overwriting user space outside the user buffer area.
10 * The highest 2 bits are reserved for indicating the ``access mode''.
11 * NOTE: This limits the max parameter size to 16kB -1 !
12 */
13 5
14/*
15 * The following is for compatibility across the various Linux
16 * platforms. The generic ioctl numbering scheme doesn't really enforce
17 * a type field. De facto, however, the top 8 bits of the lower 16
18 * bits are indeed used as a type field, so we might just as well make
19 * this explicit here. Please be sure to use the decoding macros
20 * below from now on.
21 */
22#define _IOC_NRBITS 8
23#define _IOC_TYPEBITS 8
24
25/*
26 * Let any architecture override either of the following before
27 * including this file.
28 */
29
30#ifndef _IOC_SIZEBITS
31# define _IOC_SIZEBITS 14
32#endif
33
34#ifndef _IOC_DIRBITS
35# define _IOC_DIRBITS 2
36#endif
37
38#define _IOC_NRMASK ((1 << _IOC_NRBITS)-1)
39#define _IOC_TYPEMASK ((1 << _IOC_TYPEBITS)-1)
40#define _IOC_SIZEMASK ((1 << _IOC_SIZEBITS)-1)
41#define _IOC_DIRMASK ((1 << _IOC_DIRBITS)-1)
42
43#define _IOC_NRSHIFT 0
44#define _IOC_TYPESHIFT (_IOC_NRSHIFT+_IOC_NRBITS)
45#define _IOC_SIZESHIFT (_IOC_TYPESHIFT+_IOC_TYPEBITS)
46#define _IOC_DIRSHIFT (_IOC_SIZESHIFT+_IOC_SIZEBITS)
47
48/*
49 * Direction bits, which any architecture can choose to override
50 * before including this file.
51 */
52
53#ifndef _IOC_NONE
54# define _IOC_NONE 0U
55#endif
56
57#ifndef _IOC_WRITE
58# define _IOC_WRITE 1U
59#endif
60
61#ifndef _IOC_READ
62# define _IOC_READ 2U
63#endif
64
65#define _IOC(dir,type,nr,size) \
66 (((dir) << _IOC_DIRSHIFT) | \
67 ((type) << _IOC_TYPESHIFT) | \
68 ((nr) << _IOC_NRSHIFT) | \
69 ((size) << _IOC_SIZESHIFT))
70
71#ifdef __KERNEL__
72/* provoke compile error for invalid uses of size argument */ 6/* provoke compile error for invalid uses of size argument */
73extern unsigned int __invalid_size_argument_for_IOC; 7extern unsigned int __invalid_size_argument_for_IOC;
74#define _IOC_TYPECHECK(t) \ 8#define _IOC_TYPECHECK(t) \
75 ((sizeof(t) == sizeof(t[1]) && \ 9 ((sizeof(t) == sizeof(t[1]) && \
76 sizeof(t) < (1 << _IOC_SIZEBITS)) ? \ 10 sizeof(t) < (1 << _IOC_SIZEBITS)) ? \
77 sizeof(t) : __invalid_size_argument_for_IOC) 11 sizeof(t) : __invalid_size_argument_for_IOC)
78#else
79#define _IOC_TYPECHECK(t) (sizeof(t))
80#endif
81
82/* used to create numbers */
83#define _IO(type,nr) _IOC(_IOC_NONE,(type),(nr),0)
84#define _IOR(type,nr,size) _IOC(_IOC_READ,(type),(nr),(_IOC_TYPECHECK(size)))
85#define _IOW(type,nr,size) _IOC(_IOC_WRITE,(type),(nr),(_IOC_TYPECHECK(size)))
86#define _IOWR(type,nr,size) _IOC(_IOC_READ|_IOC_WRITE,(type),(nr),(_IOC_TYPECHECK(size)))
87#define _IOR_BAD(type,nr,size) _IOC(_IOC_READ,(type),(nr),sizeof(size))
88#define _IOW_BAD(type,nr,size) _IOC(_IOC_WRITE,(type),(nr),sizeof(size))
89#define _IOWR_BAD(type,nr,size) _IOC(_IOC_READ|_IOC_WRITE,(type),(nr),sizeof(size))
90
91/* used to decode ioctl numbers.. */
92#define _IOC_DIR(nr) (((nr) >> _IOC_DIRSHIFT) & _IOC_DIRMASK)
93#define _IOC_TYPE(nr) (((nr) >> _IOC_TYPESHIFT) & _IOC_TYPEMASK)
94#define _IOC_NR(nr) (((nr) >> _IOC_NRSHIFT) & _IOC_NRMASK)
95#define _IOC_SIZE(nr) (((nr) >> _IOC_SIZESHIFT) & _IOC_SIZEMASK)
96
97/* ...and for the drivers/sound files... */
98
99#define IOC_IN (_IOC_WRITE << _IOC_DIRSHIFT)
100#define IOC_OUT (_IOC_READ << _IOC_DIRSHIFT)
101#define IOC_INOUT ((_IOC_WRITE|_IOC_READ) << _IOC_DIRSHIFT)
102#define IOCSIZE_MASK (_IOC_SIZEMASK << _IOC_SIZESHIFT)
103#define IOCSIZE_SHIFT (_IOC_SIZESHIFT)
104
105#endif /* _ASM_GENERIC_IOCTL_H */ 12#endif /* _ASM_GENERIC_IOCTL_H */
diff --git a/include/asm-generic/ioctls.h b/include/asm-generic/ioctls.h
deleted file mode 100644
index 199975fac395..000000000000
--- a/include/asm-generic/ioctls.h
+++ /dev/null
@@ -1,114 +0,0 @@
1#ifndef __ASM_GENERIC_IOCTLS_H
2#define __ASM_GENERIC_IOCTLS_H
3
4#include <linux/ioctl.h>
5
6/*
7 * These are the most common definitions for tty ioctl numbers.
8 * Most of them do not use the recommended _IOC(), but there is
9 * probably some source code out there hardcoding the number,
10 * so we might as well use them for all new platforms.
11 *
12 * The architectures that use different values here typically
13 * try to be compatible with some Unix variants for the same
14 * architecture.
15 */
16
17/* 0x54 is just a magic number to make these relatively unique ('T') */
18
19#define TCGETS 0x5401
20#define TCSETS 0x5402
21#define TCSETSW 0x5403
22#define TCSETSF 0x5404
23#define TCGETA 0x5405
24#define TCSETA 0x5406
25#define TCSETAW 0x5407
26#define TCSETAF 0x5408
27#define TCSBRK 0x5409
28#define TCXONC 0x540A
29#define TCFLSH 0x540B
30#define TIOCEXCL 0x540C
31#define TIOCNXCL 0x540D
32#define TIOCSCTTY 0x540E
33#define TIOCGPGRP 0x540F
34#define TIOCSPGRP 0x5410
35#define TIOCOUTQ 0x5411
36#define TIOCSTI 0x5412
37#define TIOCGWINSZ 0x5413
38#define TIOCSWINSZ 0x5414
39#define TIOCMGET 0x5415
40#define TIOCMBIS 0x5416
41#define TIOCMBIC 0x5417
42#define TIOCMSET 0x5418
43#define TIOCGSOFTCAR 0x5419
44#define TIOCSSOFTCAR 0x541A
45#define FIONREAD 0x541B
46#define TIOCINQ FIONREAD
47#define TIOCLINUX 0x541C
48#define TIOCCONS 0x541D
49#define TIOCGSERIAL 0x541E
50#define TIOCSSERIAL 0x541F
51#define TIOCPKT 0x5420
52#define FIONBIO 0x5421
53#define TIOCNOTTY 0x5422
54#define TIOCSETD 0x5423
55#define TIOCGETD 0x5424
56#define TCSBRKP 0x5425 /* Needed for POSIX tcsendbreak() */
57#define TIOCSBRK 0x5427 /* BSD compatibility */
58#define TIOCCBRK 0x5428 /* BSD compatibility */
59#define TIOCGSID 0x5429 /* Return the session ID of FD */
60#define TCGETS2 _IOR('T', 0x2A, struct termios2)
61#define TCSETS2 _IOW('T', 0x2B, struct termios2)
62#define TCSETSW2 _IOW('T', 0x2C, struct termios2)
63#define TCSETSF2 _IOW('T', 0x2D, struct termios2)
64#define TIOCGRS485 0x542E
65#ifndef TIOCSRS485
66#define TIOCSRS485 0x542F
67#endif
68#define TIOCGPTN _IOR('T', 0x30, unsigned int) /* Get Pty Number (of pty-mux device) */
69#define TIOCSPTLCK _IOW('T', 0x31, int) /* Lock/unlock Pty */
70#define TIOCGDEV _IOR('T', 0x32, unsigned int) /* Get primary device node of /dev/console */
71#define TCGETX 0x5432 /* SYS5 TCGETX compatibility */
72#define TCSETX 0x5433
73#define TCSETXF 0x5434
74#define TCSETXW 0x5435
75#define TIOCSIG _IOW('T', 0x36, int) /* pty: generate signal */
76#define TIOCVHANGUP 0x5437
77
78#define FIONCLEX 0x5450
79#define FIOCLEX 0x5451
80#define FIOASYNC 0x5452
81#define TIOCSERCONFIG 0x5453
82#define TIOCSERGWILD 0x5454
83#define TIOCSERSWILD 0x5455
84#define TIOCGLCKTRMIOS 0x5456
85#define TIOCSLCKTRMIOS 0x5457
86#define TIOCSERGSTRUCT 0x5458 /* For debugging only */
87#define TIOCSERGETLSR 0x5459 /* Get line status register */
88#define TIOCSERGETMULTI 0x545A /* Get multiport config */
89#define TIOCSERSETMULTI 0x545B /* Set multiport config */
90
91#define TIOCMIWAIT 0x545C /* wait for a change on serial input line(s) */
92#define TIOCGICOUNT 0x545D /* read serial port inline interrupt counts */
93
94/*
95 * Some arches already define FIOQSIZE due to a historical
96 * conflict with a Hayes modem-specific ioctl value.
97 */
98#ifndef FIOQSIZE
99# define FIOQSIZE 0x5460
100#endif
101
102/* Used for packet mode */
103#define TIOCPKT_DATA 0
104#define TIOCPKT_FLUSHREAD 1
105#define TIOCPKT_FLUSHWRITE 2
106#define TIOCPKT_STOP 4
107#define TIOCPKT_START 8
108#define TIOCPKT_NOSTOP 16
109#define TIOCPKT_DOSTOP 32
110#define TIOCPKT_IOCTL 64
111
112#define TIOCSER_TEMT 0x01 /* Transmitter physically empty */
113
114#endif /* __ASM_GENERIC_IOCTLS_H */
diff --git a/include/asm-generic/ipcbuf.h b/include/asm-generic/ipcbuf.h
deleted file mode 100644
index 76982b2a1b58..000000000000
--- a/include/asm-generic/ipcbuf.h
+++ /dev/null
@@ -1,34 +0,0 @@
1#ifndef __ASM_GENERIC_IPCBUF_H
2#define __ASM_GENERIC_IPCBUF_H
3
4/*
5 * The generic ipc64_perm structure:
6 * Note extra padding because this structure is passed back and forth
7 * between kernel and user space.
8 *
9 * ipc64_perm was originally meant to be architecture specific, but
10 * everyone just ended up making identical copies without specific
11 * optimizations, so we may just as well all use the same one.
12 *
13 * Pad space is left for:
14 * - 32-bit mode_t on architectures that only had 16 bit
15 * - 32-bit seq
16 * - 2 miscellaneous 32-bit values
17 */
18
19struct ipc64_perm {
20 __kernel_key_t key;
21 __kernel_uid32_t uid;
22 __kernel_gid32_t gid;
23 __kernel_uid32_t cuid;
24 __kernel_gid32_t cgid;
25 __kernel_mode_t mode;
26 /* pad if mode_t is u16: */
27 unsigned char __pad1[4 - sizeof(__kernel_mode_t)];
28 unsigned short seq;
29 unsigned short __pad2;
30 unsigned long __unused1;
31 unsigned long __unused2;
32};
33
34#endif /* __ASM_GENERIC_IPCBUF_H */
diff --git a/include/asm-generic/kvm_para.h b/include/asm-generic/kvm_para.h
index 5cba37f9eae1..9d96605f160a 100644
--- a/include/asm-generic/kvm_para.h
+++ b/include/asm-generic/kvm_para.h
@@ -1,7 +1,8 @@
1#ifndef _ASM_GENERIC_KVM_PARA_H 1#ifndef _ASM_GENERIC_KVM_PARA_H
2#define _ASM_GENERIC_KVM_PARA_H 2#define _ASM_GENERIC_KVM_PARA_H
3 3
4#ifdef __KERNEL__ 4#include <uapi/asm-generic/kvm_para.h>
5
5 6
6/* 7/*
7 * This function is used by architectures that support kvm to avoid issuing 8 * This function is used by architectures that support kvm to avoid issuing
@@ -17,6 +18,4 @@ static inline unsigned int kvm_arch_para_features(void)
17 return 0; 18 return 0;
18} 19}
19 20
20#endif /* _KERNEL__ */
21
22#endif 21#endif
diff --git a/include/asm-generic/mman-common.h b/include/asm-generic/mman-common.h
deleted file mode 100644
index d030d2c2647a..000000000000
--- a/include/asm-generic/mman-common.h
+++ /dev/null
@@ -1,58 +0,0 @@
1#ifndef __ASM_GENERIC_MMAN_COMMON_H
2#define __ASM_GENERIC_MMAN_COMMON_H
3
4/*
5 Author: Michael S. Tsirkin <mst@mellanox.co.il>, Mellanox Technologies Ltd.
6 Based on: asm-xxx/mman.h
7*/
8
9#define PROT_READ 0x1 /* page can be read */
10#define PROT_WRITE 0x2 /* page can be written */
11#define PROT_EXEC 0x4 /* page can be executed */
12#define PROT_SEM 0x8 /* page may be used for atomic ops */
13#define PROT_NONE 0x0 /* page can not be accessed */
14#define PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start of growsdown vma */
15#define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end of growsup vma */
16
17#define MAP_SHARED 0x01 /* Share changes */
18#define MAP_PRIVATE 0x02 /* Changes are private */
19#define MAP_TYPE 0x0f /* Mask for type of mapping */
20#define MAP_FIXED 0x10 /* Interpret addr exactly */
21#define MAP_ANONYMOUS 0x20 /* don't use a file */
22#ifdef CONFIG_MMAP_ALLOW_UNINITIALIZED
23# define MAP_UNINITIALIZED 0x4000000 /* For anonymous mmap, memory could be uninitialized */
24#else
25# define MAP_UNINITIALIZED 0x0 /* Don't support this flag */
26#endif
27
28#define MS_ASYNC 1 /* sync memory asynchronously */
29#define MS_INVALIDATE 2 /* invalidate the caches */
30#define MS_SYNC 4 /* synchronous memory sync */
31
32#define MADV_NORMAL 0 /* no further special treatment */
33#define MADV_RANDOM 1 /* expect random page references */
34#define MADV_SEQUENTIAL 2 /* expect sequential page references */
35#define MADV_WILLNEED 3 /* will need these pages */
36#define MADV_DONTNEED 4 /* don't need these pages */
37
38/* common parameters: try to keep these consistent across architectures */
39#define MADV_REMOVE 9 /* remove these pages & resources */
40#define MADV_DONTFORK 10 /* don't inherit across fork */
41#define MADV_DOFORK 11 /* do inherit across fork */
42#define MADV_HWPOISON 100 /* poison a page for testing */
43#define MADV_SOFT_OFFLINE 101 /* soft offline page for testing */
44
45#define MADV_MERGEABLE 12 /* KSM may merge identical pages */
46#define MADV_UNMERGEABLE 13 /* KSM may not merge identical pages */
47
48#define MADV_HUGEPAGE 14 /* Worth backing with hugepages */
49#define MADV_NOHUGEPAGE 15 /* Not worth backing with hugepages */
50
51#define MADV_DONTDUMP 16 /* Explicity exclude from the core dump,
52 overrides the coredump filter bits */
53#define MADV_DODUMP 17 /* Clear the MADV_NODUMP flag */
54
55/* compatibility flags */
56#define MAP_FILE 0
57
58#endif /* __ASM_GENERIC_MMAN_COMMON_H */
diff --git a/include/asm-generic/mman.h b/include/asm-generic/mman.h
deleted file mode 100644
index 32c8bd6a196d..000000000000
--- a/include/asm-generic/mman.h
+++ /dev/null
@@ -1,19 +0,0 @@
1#ifndef __ASM_GENERIC_MMAN_H
2#define __ASM_GENERIC_MMAN_H
3
4#include <asm-generic/mman-common.h>
5
6#define MAP_GROWSDOWN 0x0100 /* stack-like segment */
7#define MAP_DENYWRITE 0x0800 /* ETXTBSY */
8#define MAP_EXECUTABLE 0x1000 /* mark it as an executable */
9#define MAP_LOCKED 0x2000 /* pages are locked */
10#define MAP_NORESERVE 0x4000 /* don't check for reservations */
11#define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */
12#define MAP_NONBLOCK 0x10000 /* do not block on IO */
13#define MAP_STACK 0x20000 /* give out an address that is best suited for process/thread stacks */
14#define MAP_HUGETLB 0x40000 /* create a huge page mapping */
15
16#define MCL_CURRENT 1 /* lock all current mappings */
17#define MCL_FUTURE 2 /* lock all future mappings */
18
19#endif /* __ASM_GENERIC_MMAN_H */
diff --git a/include/asm-generic/module.h b/include/asm-generic/module.h
index ed5b44de4c91..14dc41d185a7 100644
--- a/include/asm-generic/module.h
+++ b/include/asm-generic/module.h
@@ -5,18 +5,44 @@
5 * Many architectures just need a simple module 5 * Many architectures just need a simple module
6 * loader without arch specific data. 6 * loader without arch specific data.
7 */ 7 */
8#ifndef CONFIG_HAVE_MOD_ARCH_SPECIFIC
8struct mod_arch_specific 9struct mod_arch_specific
9{ 10{
10}; 11};
12#endif
11 13
12#ifdef CONFIG_64BIT 14#ifdef CONFIG_64BIT
13#define Elf_Shdr Elf64_Shdr 15#define Elf_Shdr Elf64_Shdr
14#define Elf_Sym Elf64_Sym 16#define Elf_Phdr Elf64_Phdr
15#define Elf_Ehdr Elf64_Ehdr 17#define Elf_Sym Elf64_Sym
16#else 18#define Elf_Dyn Elf64_Dyn
17#define Elf_Shdr Elf32_Shdr 19#define Elf_Ehdr Elf64_Ehdr
18#define Elf_Sym Elf32_Sym 20#define Elf_Addr Elf64_Addr
19#define Elf_Ehdr Elf32_Ehdr 21#ifdef CONFIG_MODULES_USE_ELF_REL
22#define Elf_Rel Elf64_Rel
23#endif
24#ifdef CONFIG_MODULES_USE_ELF_RELA
25#define Elf_Rela Elf64_Rela
26#endif
27#define ELF_R_TYPE(X) ELF64_R_TYPE(X)
28#define ELF_R_SYM(X) ELF64_R_SYM(X)
29
30#else /* CONFIG_64BIT */
31
32#define Elf_Shdr Elf32_Shdr
33#define Elf_Phdr Elf32_Phdr
34#define Elf_Sym Elf32_Sym
35#define Elf_Dyn Elf32_Dyn
36#define Elf_Ehdr Elf32_Ehdr
37#define Elf_Addr Elf32_Addr
38#ifdef CONFIG_MODULES_USE_ELF_REL
39#define Elf_Rel Elf32_Rel
40#endif
41#ifdef CONFIG_MODULES_USE_ELF_RELA
42#define Elf_Rela Elf32_Rela
43#endif
44#define ELF_R_TYPE(X) ELF32_R_TYPE(X)
45#define ELF_R_SYM(X) ELF32_R_SYM(X)
20#endif 46#endif
21 47
22#endif /* __ASM_GENERIC_MODULE_H */ 48#endif /* __ASM_GENERIC_MODULE_H */
diff --git a/include/asm-generic/msgbuf.h b/include/asm-generic/msgbuf.h
deleted file mode 100644
index aec850d9159e..000000000000
--- a/include/asm-generic/msgbuf.h
+++ /dev/null
@@ -1,47 +0,0 @@
1#ifndef __ASM_GENERIC_MSGBUF_H
2#define __ASM_GENERIC_MSGBUF_H
3
4#include <asm/bitsperlong.h>
5/*
6 * generic msqid64_ds structure.
7 *
8 * Note extra padding because this structure is passed back and forth
9 * between kernel and user space.
10 *
11 * msqid64_ds was originally meant to be architecture specific, but
12 * everyone just ended up making identical copies without specific
13 * optimizations, so we may just as well all use the same one.
14 *
15 * 64 bit architectures typically define a 64 bit __kernel_time_t,
16 * so they do not need the first three padding words.
17 * On big-endian systems, the padding is in the wrong place.
18 *
19 * Pad space is left for:
20 * - 64-bit time_t to solve y2038 problem
21 * - 2 miscellaneous 32-bit values
22 */
23
24struct msqid64_ds {
25 struct ipc64_perm msg_perm;
26 __kernel_time_t msg_stime; /* last msgsnd time */
27#if __BITS_PER_LONG != 64
28 unsigned long __unused1;
29#endif
30 __kernel_time_t msg_rtime; /* last msgrcv time */
31#if __BITS_PER_LONG != 64
32 unsigned long __unused2;
33#endif
34 __kernel_time_t msg_ctime; /* last change time */
35#if __BITS_PER_LONG != 64
36 unsigned long __unused3;
37#endif
38 unsigned long msg_cbytes; /* current number of bytes on queue */
39 unsigned long msg_qnum; /* number of messages in queue */
40 unsigned long msg_qbytes; /* max number of bytes on queue */
41 __kernel_pid_t msg_lspid; /* pid of last msgsnd */
42 __kernel_pid_t msg_lrpid; /* last receive pid */
43 unsigned long __unused4;
44 unsigned long __unused5;
45};
46
47#endif /* __ASM_GENERIC_MSGBUF_H */
diff --git a/include/asm-generic/param.h b/include/asm-generic/param.h
index 835632a3b468..04e715bccceb 100644
--- a/include/asm-generic/param.h
+++ b/include/asm-generic/param.h
@@ -1,25 +1,10 @@
1#ifndef __ASM_GENERIC_PARAM_H 1#ifndef __ASM_GENERIC_PARAM_H
2#define __ASM_GENERIC_PARAM_H 2#define __ASM_GENERIC_PARAM_H
3 3
4#ifndef HZ 4#include <uapi/asm-generic/param.h>
5#define HZ 100
6#endif
7 5
8#ifndef EXEC_PAGESIZE
9#define EXEC_PAGESIZE 4096
10#endif
11
12#ifndef NOGROUP
13#define NOGROUP (-1)
14#endif
15
16#define MAXHOSTNAMELEN 64 /* max length of hostname */
17
18#ifdef __KERNEL__
19# undef HZ 6# undef HZ
20# define HZ CONFIG_HZ /* Internal kernel timer frequency */ 7# define HZ CONFIG_HZ /* Internal kernel timer frequency */
21# define USER_HZ 100 /* some user interfaces are */ 8# define USER_HZ 100 /* some user interfaces are */
22# define CLOCKS_PER_SEC (USER_HZ) /* in "ticks" like times() */ 9# define CLOCKS_PER_SEC (USER_HZ) /* in "ticks" like times() */
23#endif
24
25#endif /* __ASM_GENERIC_PARAM_H */ 10#endif /* __ASM_GENERIC_PARAM_H */
diff --git a/include/asm-generic/pgtable.h b/include/asm-generic/pgtable.h
index ff4947b7a976..b36ce40bd1c6 100644
--- a/include/asm-generic/pgtable.h
+++ b/include/asm-generic/pgtable.h
@@ -87,7 +87,7 @@ static inline pmd_t pmdp_get_and_clear(struct mm_struct *mm,
87 pmd_t *pmdp) 87 pmd_t *pmdp)
88{ 88{
89 pmd_t pmd = *pmdp; 89 pmd_t pmd = *pmdp;
90 pmd_clear(mm, address, pmdp); 90 pmd_clear(pmdp);
91 return pmd; 91 return pmd;
92} 92}
93#endif /* CONFIG_TRANSPARENT_HUGEPAGE */ 93#endif /* CONFIG_TRANSPARENT_HUGEPAGE */
@@ -162,6 +162,19 @@ extern void pmdp_splitting_flush(struct vm_area_struct *vma,
162 unsigned long address, pmd_t *pmdp); 162 unsigned long address, pmd_t *pmdp);
163#endif 163#endif
164 164
165#ifndef __HAVE_ARCH_PGTABLE_DEPOSIT
166extern void pgtable_trans_huge_deposit(struct mm_struct *mm, pgtable_t pgtable);
167#endif
168
169#ifndef __HAVE_ARCH_PGTABLE_WITHDRAW
170extern pgtable_t pgtable_trans_huge_withdraw(struct mm_struct *mm);
171#endif
172
173#ifndef __HAVE_ARCH_PMDP_INVALIDATE
174extern void pmdp_invalidate(struct vm_area_struct *vma, unsigned long address,
175 pmd_t *pmdp);
176#endif
177
165#ifndef __HAVE_ARCH_PTE_SAME 178#ifndef __HAVE_ARCH_PTE_SAME
166static inline int pte_same(pte_t pte_a, pte_t pte_b) 179static inline int pte_same(pte_t pte_a, pte_t pte_b)
167{ 180{
@@ -381,48 +394,59 @@ static inline void ptep_modify_prot_commit(struct mm_struct *mm,
381 394
382#ifndef __HAVE_PFNMAP_TRACKING 395#ifndef __HAVE_PFNMAP_TRACKING
383/* 396/*
384 * Interface that can be used by architecture code to keep track of 397 * Interfaces that can be used by architecture code to keep track of
385 * memory type of pfn mappings (remap_pfn_range, vm_insert_pfn) 398 * memory type of pfn mappings specified by the remap_pfn_range,
386 * 399 * vm_insert_pfn.
387 * track_pfn_vma_new is called when a _new_ pfn mapping is being established 400 */
388 * for physical range indicated by pfn and size. 401
402/*
403 * track_pfn_remap is called when a _new_ pfn mapping is being established
404 * by remap_pfn_range() for physical range indicated by pfn and size.
389 */ 405 */
390static inline int track_pfn_vma_new(struct vm_area_struct *vma, pgprot_t *prot, 406static inline int track_pfn_remap(struct vm_area_struct *vma, pgprot_t *prot,
391 unsigned long pfn, unsigned long size) 407 unsigned long pfn, unsigned long addr,
408 unsigned long size)
392{ 409{
393 return 0; 410 return 0;
394} 411}
395 412
396/* 413/*
397 * Interface that can be used by architecture code to keep track of 414 * track_pfn_insert is called when a _new_ single pfn is established
398 * memory type of pfn mappings (remap_pfn_range, vm_insert_pfn) 415 * by vm_insert_pfn().
399 * 416 */
400 * track_pfn_vma_copy is called when vma that is covering the pfnmap gets 417static inline int track_pfn_insert(struct vm_area_struct *vma, pgprot_t *prot,
418 unsigned long pfn)
419{
420 return 0;
421}
422
423/*
424 * track_pfn_copy is called when vma that is covering the pfnmap gets
401 * copied through copy_page_range(). 425 * copied through copy_page_range().
402 */ 426 */
403static inline int track_pfn_vma_copy(struct vm_area_struct *vma) 427static inline int track_pfn_copy(struct vm_area_struct *vma)
404{ 428{
405 return 0; 429 return 0;
406} 430}
407 431
408/* 432/*
409 * Interface that can be used by architecture code to keep track of
410 * memory type of pfn mappings (remap_pfn_range, vm_insert_pfn)
411 *
412 * untrack_pfn_vma is called while unmapping a pfnmap for a region. 433 * untrack_pfn_vma is called while unmapping a pfnmap for a region.
413 * untrack can be called for a specific region indicated by pfn and size or 434 * untrack can be called for a specific region indicated by pfn and size or
414 * can be for the entire vma (in which case size can be zero). 435 * can be for the entire vma (in which case pfn, size are zero).
415 */ 436 */
416static inline void untrack_pfn_vma(struct vm_area_struct *vma, 437static inline void untrack_pfn(struct vm_area_struct *vma,
417 unsigned long pfn, unsigned long size) 438 unsigned long pfn, unsigned long size)
418{ 439{
419} 440}
420#else 441#else
421extern int track_pfn_vma_new(struct vm_area_struct *vma, pgprot_t *prot, 442extern int track_pfn_remap(struct vm_area_struct *vma, pgprot_t *prot,
422 unsigned long pfn, unsigned long size); 443 unsigned long pfn, unsigned long addr,
423extern int track_pfn_vma_copy(struct vm_area_struct *vma); 444 unsigned long size);
424extern void untrack_pfn_vma(struct vm_area_struct *vma, unsigned long pfn, 445extern int track_pfn_insert(struct vm_area_struct *vma, pgprot_t *prot,
425 unsigned long size); 446 unsigned long pfn);
447extern int track_pfn_copy(struct vm_area_struct *vma);
448extern void untrack_pfn(struct vm_area_struct *vma, unsigned long pfn,
449 unsigned long size);
426#endif 450#endif
427 451
428#ifdef CONFIG_MMU 452#ifdef CONFIG_MMU
diff --git a/include/asm-generic/poll.h b/include/asm-generic/poll.h
deleted file mode 100644
index 9ce7f44aebd2..000000000000
--- a/include/asm-generic/poll.h
+++ /dev/null
@@ -1,39 +0,0 @@
1#ifndef __ASM_GENERIC_POLL_H
2#define __ASM_GENERIC_POLL_H
3
4/* These are specified by iBCS2 */
5#define POLLIN 0x0001
6#define POLLPRI 0x0002
7#define POLLOUT 0x0004
8#define POLLERR 0x0008
9#define POLLHUP 0x0010
10#define POLLNVAL 0x0020
11
12/* The rest seem to be more-or-less nonstandard. Check them! */
13#define POLLRDNORM 0x0040
14#define POLLRDBAND 0x0080
15#ifndef POLLWRNORM
16#define POLLWRNORM 0x0100
17#endif
18#ifndef POLLWRBAND
19#define POLLWRBAND 0x0200
20#endif
21#ifndef POLLMSG
22#define POLLMSG 0x0400
23#endif
24#ifndef POLLREMOVE
25#define POLLREMOVE 0x1000
26#endif
27#ifndef POLLRDHUP
28#define POLLRDHUP 0x2000
29#endif
30
31#define POLLFREE 0x4000 /* currently only for epoll */
32
33struct pollfd {
34 int fd;
35 short events;
36 short revents;
37};
38
39#endif /* __ASM_GENERIC_POLL_H */
diff --git a/include/asm-generic/posix_types.h b/include/asm-generic/posix_types.h
deleted file mode 100644
index fe74fccf18db..000000000000
--- a/include/asm-generic/posix_types.h
+++ /dev/null
@@ -1,96 +0,0 @@
1#ifndef __ASM_GENERIC_POSIX_TYPES_H
2#define __ASM_GENERIC_POSIX_TYPES_H
3
4#include <asm/bitsperlong.h>
5/*
6 * This file is generally used by user-level software, so you need to
7 * be a little careful about namespace pollution etc.
8 *
9 * First the types that are often defined in different ways across
10 * architectures, so that you can override them.
11 */
12
13#ifndef __kernel_long_t
14typedef long __kernel_long_t;
15typedef unsigned long __kernel_ulong_t;
16#endif
17
18#ifndef __kernel_ino_t
19typedef __kernel_ulong_t __kernel_ino_t;
20#endif
21
22#ifndef __kernel_mode_t
23typedef unsigned int __kernel_mode_t;
24#endif
25
26#ifndef __kernel_pid_t
27typedef int __kernel_pid_t;
28#endif
29
30#ifndef __kernel_ipc_pid_t
31typedef int __kernel_ipc_pid_t;
32#endif
33
34#ifndef __kernel_uid_t
35typedef unsigned int __kernel_uid_t;
36typedef unsigned int __kernel_gid_t;
37#endif
38
39#ifndef __kernel_suseconds_t
40typedef __kernel_long_t __kernel_suseconds_t;
41#endif
42
43#ifndef __kernel_daddr_t
44typedef int __kernel_daddr_t;
45#endif
46
47#ifndef __kernel_uid32_t
48typedef unsigned int __kernel_uid32_t;
49typedef unsigned int __kernel_gid32_t;
50#endif
51
52#ifndef __kernel_old_uid_t
53typedef __kernel_uid_t __kernel_old_uid_t;
54typedef __kernel_gid_t __kernel_old_gid_t;
55#endif
56
57#ifndef __kernel_old_dev_t
58typedef unsigned int __kernel_old_dev_t;
59#endif
60
61/*
62 * Most 32 bit architectures use "unsigned int" size_t,
63 * and all 64 bit architectures use "unsigned long" size_t.
64 */
65#ifndef __kernel_size_t
66#if __BITS_PER_LONG != 64
67typedef unsigned int __kernel_size_t;
68typedef int __kernel_ssize_t;
69typedef int __kernel_ptrdiff_t;
70#else
71typedef __kernel_ulong_t __kernel_size_t;
72typedef __kernel_long_t __kernel_ssize_t;
73typedef __kernel_long_t __kernel_ptrdiff_t;
74#endif
75#endif
76
77#ifndef __kernel_fsid_t
78typedef struct {
79 int val[2];
80} __kernel_fsid_t;
81#endif
82
83/*
84 * anything below here should be completely generic
85 */
86typedef __kernel_long_t __kernel_off_t;
87typedef long long __kernel_loff_t;
88typedef __kernel_long_t __kernel_time_t;
89typedef __kernel_long_t __kernel_clock_t;
90typedef int __kernel_timer_t;
91typedef int __kernel_clockid_t;
92typedef char * __kernel_caddr_t;
93typedef unsigned short __kernel_uid16_t;
94typedef unsigned short __kernel_gid16_t;
95
96#endif /* __ASM_GENERIC_POSIX_TYPES_H */
diff --git a/include/asm-generic/resource.h b/include/asm-generic/resource.h
index 61fa862fe08d..b4ea8f50fc65 100644
--- a/include/asm-generic/resource.h
+++ b/include/asm-generic/resource.h
@@ -1,70 +1,8 @@
1#ifndef _ASM_GENERIC_RESOURCE_H 1#ifndef _ASM_GENERIC_RESOURCE_H
2#define _ASM_GENERIC_RESOURCE_H 2#define _ASM_GENERIC_RESOURCE_H
3 3
4/* 4#include <uapi/asm-generic/resource.h>
5 * Resource limit IDs
6 *
7 * ( Compatibility detail: there are architectures that have
8 * a different rlimit ID order in the 5-9 range and want
9 * to keep that order for binary compatibility. The reasons
10 * are historic and all new rlimits are identical across all
11 * arches. If an arch has such special order for some rlimits
12 * then it defines them prior including asm-generic/resource.h. )
13 */
14
15#define RLIMIT_CPU 0 /* CPU time in sec */
16#define RLIMIT_FSIZE 1 /* Maximum filesize */
17#define RLIMIT_DATA 2 /* max data size */
18#define RLIMIT_STACK 3 /* max stack size */
19#define RLIMIT_CORE 4 /* max core file size */
20
21#ifndef RLIMIT_RSS
22# define RLIMIT_RSS 5 /* max resident set size */
23#endif
24
25#ifndef RLIMIT_NPROC
26# define RLIMIT_NPROC 6 /* max number of processes */
27#endif
28
29#ifndef RLIMIT_NOFILE
30# define RLIMIT_NOFILE 7 /* max number of open files */
31#endif
32 5
33#ifndef RLIMIT_MEMLOCK
34# define RLIMIT_MEMLOCK 8 /* max locked-in-memory address space */
35#endif
36
37#ifndef RLIMIT_AS
38# define RLIMIT_AS 9 /* address space limit */
39#endif
40
41#define RLIMIT_LOCKS 10 /* maximum file locks held */
42#define RLIMIT_SIGPENDING 11 /* max number of pending signals */
43#define RLIMIT_MSGQUEUE 12 /* maximum bytes in POSIX mqueues */
44#define RLIMIT_NICE 13 /* max nice prio allowed to raise to
45 0-39 for nice level 19 .. -20 */
46#define RLIMIT_RTPRIO 14 /* maximum realtime priority */
47#define RLIMIT_RTTIME 15 /* timeout for RT tasks in us */
48#define RLIM_NLIMITS 16
49
50/*
51 * SuS says limits have to be unsigned.
52 * Which makes a ton more sense anyway.
53 *
54 * Some architectures override this (for compatibility reasons):
55 */
56#ifndef RLIM_INFINITY
57# define RLIM_INFINITY (~0UL)
58#endif
59
60/*
61 * RLIMIT_STACK default maximum - some architectures override it:
62 */
63#ifndef _STK_LIM_MAX
64# define _STK_LIM_MAX RLIM_INFINITY
65#endif
66
67#ifdef __KERNEL__
68 6
69/* 7/*
70 * boot-time rlimit defaults for the init task: 8 * boot-time rlimit defaults for the init task:
@@ -89,6 +27,4 @@
89 [RLIMIT_RTTIME] = { RLIM_INFINITY, RLIM_INFINITY }, \ 27 [RLIMIT_RTTIME] = { RLIM_INFINITY, RLIM_INFINITY }, \
90} 28}
91 29
92#endif /* __KERNEL__ */
93
94#endif 30#endif
diff --git a/include/asm-generic/sembuf.h b/include/asm-generic/sembuf.h
deleted file mode 100644
index 4cb2c13e5090..000000000000
--- a/include/asm-generic/sembuf.h
+++ /dev/null
@@ -1,38 +0,0 @@
1#ifndef __ASM_GENERIC_SEMBUF_H
2#define __ASM_GENERIC_SEMBUF_H
3
4#include <asm/bitsperlong.h>
5
6/*
7 * The semid64_ds structure for x86 architecture.
8 * Note extra padding because this structure is passed back and forth
9 * between kernel and user space.
10 *
11 * semid64_ds was originally meant to be architecture specific, but
12 * everyone just ended up making identical copies without specific
13 * optimizations, so we may just as well all use the same one.
14 *
15 * 64 bit architectures typically define a 64 bit __kernel_time_t,
16 * so they do not need the first two padding words.
17 * On big-endian systems, the padding is in the wrong place.
18 *
19 * Pad space is left for:
20 * - 64-bit time_t to solve y2038 problem
21 * - 2 miscellaneous 32-bit values
22 */
23struct semid64_ds {
24 struct ipc64_perm sem_perm; /* permissions .. see ipc.h */
25 __kernel_time_t sem_otime; /* last semop time */
26#if __BITS_PER_LONG != 64
27 unsigned long __unused1;
28#endif
29 __kernel_time_t sem_ctime; /* last change time */
30#if __BITS_PER_LONG != 64
31 unsigned long __unused2;
32#endif
33 unsigned long sem_nsems; /* no. of semaphores in array */
34 unsigned long __unused3;
35 unsigned long __unused4;
36};
37
38#endif /* __ASM_GENERIC_SEMBUF_H */
diff --git a/include/asm-generic/setup.h b/include/asm-generic/setup.h
deleted file mode 100644
index 6fc26a51003c..000000000000
--- a/include/asm-generic/setup.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef __ASM_GENERIC_SETUP_H
2#define __ASM_GENERIC_SETUP_H
3
4#define COMMAND_LINE_SIZE 512
5
6#endif /* __ASM_GENERIC_SETUP_H */
diff --git a/include/asm-generic/shmbuf.h b/include/asm-generic/shmbuf.h
deleted file mode 100644
index 5768fa60ac82..000000000000
--- a/include/asm-generic/shmbuf.h
+++ /dev/null
@@ -1,59 +0,0 @@
1#ifndef __ASM_GENERIC_SHMBUF_H
2#define __ASM_GENERIC_SHMBUF_H
3
4#include <asm/bitsperlong.h>
5
6/*
7 * The shmid64_ds structure for x86 architecture.
8 * Note extra padding because this structure is passed back and forth
9 * between kernel and user space.
10 *
11 * shmid64_ds was originally meant to be architecture specific, but
12 * everyone just ended up making identical copies without specific
13 * optimizations, so we may just as well all use the same one.
14 *
15 * 64 bit architectures typically define a 64 bit __kernel_time_t,
16 * so they do not need the first two padding words.
17 * On big-endian systems, the padding is in the wrong place.
18 *
19 *
20 * Pad space is left for:
21 * - 64-bit time_t to solve y2038 problem
22 * - 2 miscellaneous 32-bit values
23 */
24
25struct shmid64_ds {
26 struct ipc64_perm shm_perm; /* operation perms */
27 size_t shm_segsz; /* size of segment (bytes) */
28 __kernel_time_t shm_atime; /* last attach time */
29#if __BITS_PER_LONG != 64
30 unsigned long __unused1;
31#endif
32 __kernel_time_t shm_dtime; /* last detach time */
33#if __BITS_PER_LONG != 64
34 unsigned long __unused2;
35#endif
36 __kernel_time_t shm_ctime; /* last change time */
37#if __BITS_PER_LONG != 64
38 unsigned long __unused3;
39#endif
40 __kernel_pid_t shm_cpid; /* pid of creator */
41 __kernel_pid_t shm_lpid; /* pid of last operator */
42 unsigned long shm_nattch; /* no. of current attaches */
43 unsigned long __unused4;
44 unsigned long __unused5;
45};
46
47struct shminfo64 {
48 unsigned long shmmax;
49 unsigned long shmmin;
50 unsigned long shmmni;
51 unsigned long shmseg;
52 unsigned long shmall;
53 unsigned long __unused1;
54 unsigned long __unused2;
55 unsigned long __unused3;
56 unsigned long __unused4;
57};
58
59#endif /* __ASM_GENERIC_SHMBUF_H */
diff --git a/include/asm-generic/shmparam.h b/include/asm-generic/shmparam.h
deleted file mode 100644
index 51a3852de733..000000000000
--- a/include/asm-generic/shmparam.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef __ASM_GENERIC_SHMPARAM_H
2#define __ASM_GENERIC_SHMPARAM_H
3
4#define SHMLBA PAGE_SIZE /* attach addr a multiple of this */
5
6#endif /* _ASM_GENERIC_SHMPARAM_H */
diff --git a/include/asm-generic/siginfo.h b/include/asm-generic/siginfo.h
index 8ed67779fc09..b685d3bd32e2 100644
--- a/include/asm-generic/siginfo.h
+++ b/include/asm-generic/siginfo.h
@@ -1,145 +1,8 @@
1#ifndef _ASM_GENERIC_SIGINFO_H 1#ifndef _ASM_GENERIC_SIGINFO_H
2#define _ASM_GENERIC_SIGINFO_H 2#define _ASM_GENERIC_SIGINFO_H
3 3
4#include <linux/compiler.h> 4#include <uapi/asm-generic/siginfo.h>
5#include <linux/types.h>
6 5
7typedef union sigval {
8 int sival_int;
9 void __user *sival_ptr;
10} sigval_t;
11
12/*
13 * This is the size (including padding) of the part of the
14 * struct siginfo that is before the union.
15 */
16#ifndef __ARCH_SI_PREAMBLE_SIZE
17#define __ARCH_SI_PREAMBLE_SIZE (3 * sizeof(int))
18#endif
19
20#define SI_MAX_SIZE 128
21#ifndef SI_PAD_SIZE
22#define SI_PAD_SIZE ((SI_MAX_SIZE - __ARCH_SI_PREAMBLE_SIZE) / sizeof(int))
23#endif
24
25#ifndef __ARCH_SI_UID_T
26#define __ARCH_SI_UID_T __kernel_uid32_t
27#endif
28
29/*
30 * The default "si_band" type is "long", as specified by POSIX.
31 * However, some architectures want to override this to "int"
32 * for historical compatibility reasons, so we allow that.
33 */
34#ifndef __ARCH_SI_BAND_T
35#define __ARCH_SI_BAND_T long
36#endif
37
38#ifndef __ARCH_SI_CLOCK_T
39#define __ARCH_SI_CLOCK_T __kernel_clock_t
40#endif
41
42#ifndef __ARCH_SI_ATTRIBUTES
43#define __ARCH_SI_ATTRIBUTES
44#endif
45
46#ifndef HAVE_ARCH_SIGINFO_T
47
48typedef struct siginfo {
49 int si_signo;
50 int si_errno;
51 int si_code;
52
53 union {
54 int _pad[SI_PAD_SIZE];
55
56 /* kill() */
57 struct {
58 __kernel_pid_t _pid; /* sender's pid */
59 __ARCH_SI_UID_T _uid; /* sender's uid */
60 } _kill;
61
62 /* POSIX.1b timers */
63 struct {
64 __kernel_timer_t _tid; /* timer id */
65 int _overrun; /* overrun count */
66 char _pad[sizeof( __ARCH_SI_UID_T) - sizeof(int)];
67 sigval_t _sigval; /* same as below */
68 int _sys_private; /* not to be passed to user */
69 } _timer;
70
71 /* POSIX.1b signals */
72 struct {
73 __kernel_pid_t _pid; /* sender's pid */
74 __ARCH_SI_UID_T _uid; /* sender's uid */
75 sigval_t _sigval;
76 } _rt;
77
78 /* SIGCHLD */
79 struct {
80 __kernel_pid_t _pid; /* which child */
81 __ARCH_SI_UID_T _uid; /* sender's uid */
82 int _status; /* exit code */
83 __ARCH_SI_CLOCK_T _utime;
84 __ARCH_SI_CLOCK_T _stime;
85 } _sigchld;
86
87 /* SIGILL, SIGFPE, SIGSEGV, SIGBUS */
88 struct {
89 void __user *_addr; /* faulting insn/memory ref. */
90#ifdef __ARCH_SI_TRAPNO
91 int _trapno; /* TRAP # which caused the signal */
92#endif
93 short _addr_lsb; /* LSB of the reported address */
94 } _sigfault;
95
96 /* SIGPOLL */
97 struct {
98 __ARCH_SI_BAND_T _band; /* POLL_IN, POLL_OUT, POLL_MSG */
99 int _fd;
100 } _sigpoll;
101
102 /* SIGSYS */
103 struct {
104 void __user *_call_addr; /* calling user insn */
105 int _syscall; /* triggering system call number */
106 unsigned int _arch; /* AUDIT_ARCH_* of syscall */
107 } _sigsys;
108 } _sifields;
109} __ARCH_SI_ATTRIBUTES siginfo_t;
110
111/* If the arch shares siginfo, then it has SIGSYS. */
112#define __ARCH_SIGSYS
113#endif
114
115/*
116 * How these fields are to be accessed.
117 */
118#define si_pid _sifields._kill._pid
119#define si_uid _sifields._kill._uid
120#define si_tid _sifields._timer._tid
121#define si_overrun _sifields._timer._overrun
122#define si_sys_private _sifields._timer._sys_private
123#define si_status _sifields._sigchld._status
124#define si_utime _sifields._sigchld._utime
125#define si_stime _sifields._sigchld._stime
126#define si_value _sifields._rt._sigval
127#define si_int _sifields._rt._sigval.sival_int
128#define si_ptr _sifields._rt._sigval.sival_ptr
129#define si_addr _sifields._sigfault._addr
130#ifdef __ARCH_SI_TRAPNO
131#define si_trapno _sifields._sigfault._trapno
132#endif
133#define si_addr_lsb _sifields._sigfault._addr_lsb
134#define si_band _sifields._sigpoll._band
135#define si_fd _sifields._sigpoll._fd
136#ifdef __ARCH_SIGSYS
137#define si_call_addr _sifields._sigsys._call_addr
138#define si_syscall _sifields._sigsys._syscall
139#define si_arch _sifields._sigsys._arch
140#endif
141
142#ifdef __KERNEL__
143#define __SI_MASK 0xffff0000u 6#define __SI_MASK 0xffff0000u
144#define __SI_KILL (0 << 16) 7#define __SI_KILL (0 << 16)
145#define __SI_TIMER (1 << 16) 8#define __SI_TIMER (1 << 16)
@@ -150,162 +13,6 @@ typedef struct siginfo {
150#define __SI_MESGQ (6 << 16) 13#define __SI_MESGQ (6 << 16)
151#define __SI_SYS (7 << 16) 14#define __SI_SYS (7 << 16)
152#define __SI_CODE(T,N) ((T) | ((N) & 0xffff)) 15#define __SI_CODE(T,N) ((T) | ((N) & 0xffff))
153#else
154#define __SI_KILL 0
155#define __SI_TIMER 0
156#define __SI_POLL 0
157#define __SI_FAULT 0
158#define __SI_CHLD 0
159#define __SI_RT 0
160#define __SI_MESGQ 0
161#define __SI_SYS 0
162#define __SI_CODE(T,N) (N)
163#endif
164
165/*
166 * si_code values
167 * Digital reserves positive values for kernel-generated signals.
168 */
169#define SI_USER 0 /* sent by kill, sigsend, raise */
170#define SI_KERNEL 0x80 /* sent by the kernel from somewhere */
171#define SI_QUEUE -1 /* sent by sigqueue */
172#define SI_TIMER __SI_CODE(__SI_TIMER,-2) /* sent by timer expiration */
173#define SI_MESGQ __SI_CODE(__SI_MESGQ,-3) /* sent by real time mesq state change */
174#define SI_ASYNCIO -4 /* sent by AIO completion */
175#define SI_SIGIO -5 /* sent by queued SIGIO */
176#define SI_TKILL -6 /* sent by tkill system call */
177#define SI_DETHREAD -7 /* sent by execve() killing subsidiary threads */
178
179#define SI_FROMUSER(siptr) ((siptr)->si_code <= 0)
180#define SI_FROMKERNEL(siptr) ((siptr)->si_code > 0)
181
182/*
183 * SIGILL si_codes
184 */
185#define ILL_ILLOPC (__SI_FAULT|1) /* illegal opcode */
186#define ILL_ILLOPN (__SI_FAULT|2) /* illegal operand */
187#define ILL_ILLADR (__SI_FAULT|3) /* illegal addressing mode */
188#define ILL_ILLTRP (__SI_FAULT|4) /* illegal trap */
189#define ILL_PRVOPC (__SI_FAULT|5) /* privileged opcode */
190#define ILL_PRVREG (__SI_FAULT|6) /* privileged register */
191#define ILL_COPROC (__SI_FAULT|7) /* coprocessor error */
192#define ILL_BADSTK (__SI_FAULT|8) /* internal stack error */
193#define NSIGILL 8
194
195/*
196 * SIGFPE si_codes
197 */
198#define FPE_INTDIV (__SI_FAULT|1) /* integer divide by zero */
199#define FPE_INTOVF (__SI_FAULT|2) /* integer overflow */
200#define FPE_FLTDIV (__SI_FAULT|3) /* floating point divide by zero */
201#define FPE_FLTOVF (__SI_FAULT|4) /* floating point overflow */
202#define FPE_FLTUND (__SI_FAULT|5) /* floating point underflow */
203#define FPE_FLTRES (__SI_FAULT|6) /* floating point inexact result */
204#define FPE_FLTINV (__SI_FAULT|7) /* floating point invalid operation */
205#define FPE_FLTSUB (__SI_FAULT|8) /* subscript out of range */
206#define NSIGFPE 8
207
208/*
209 * SIGSEGV si_codes
210 */
211#define SEGV_MAPERR (__SI_FAULT|1) /* address not mapped to object */
212#define SEGV_ACCERR (__SI_FAULT|2) /* invalid permissions for mapped object */
213#define NSIGSEGV 2
214
215/*
216 * SIGBUS si_codes
217 */
218#define BUS_ADRALN (__SI_FAULT|1) /* invalid address alignment */
219#define BUS_ADRERR (__SI_FAULT|2) /* non-existent physical address */
220#define BUS_OBJERR (__SI_FAULT|3) /* object specific hardware error */
221/* hardware memory error consumed on a machine check: action required */
222#define BUS_MCEERR_AR (__SI_FAULT|4)
223/* hardware memory error detected in process but not consumed: action optional*/
224#define BUS_MCEERR_AO (__SI_FAULT|5)
225#define NSIGBUS 5
226
227/*
228 * SIGTRAP si_codes
229 */
230#define TRAP_BRKPT (__SI_FAULT|1) /* process breakpoint */
231#define TRAP_TRACE (__SI_FAULT|2) /* process trace trap */
232#define TRAP_BRANCH (__SI_FAULT|3) /* process taken branch trap */
233#define TRAP_HWBKPT (__SI_FAULT|4) /* hardware breakpoint/watchpoint */
234#define NSIGTRAP 4
235
236/*
237 * SIGCHLD si_codes
238 */
239#define CLD_EXITED (__SI_CHLD|1) /* child has exited */
240#define CLD_KILLED (__SI_CHLD|2) /* child was killed */
241#define CLD_DUMPED (__SI_CHLD|3) /* child terminated abnormally */
242#define CLD_TRAPPED (__SI_CHLD|4) /* traced child has trapped */
243#define CLD_STOPPED (__SI_CHLD|5) /* child has stopped */
244#define CLD_CONTINUED (__SI_CHLD|6) /* stopped child has continued */
245#define NSIGCHLD 6
246
247/*
248 * SIGPOLL si_codes
249 */
250#define POLL_IN (__SI_POLL|1) /* data input available */
251#define POLL_OUT (__SI_POLL|2) /* output buffers available */
252#define POLL_MSG (__SI_POLL|3) /* input message available */
253#define POLL_ERR (__SI_POLL|4) /* i/o error */
254#define POLL_PRI (__SI_POLL|5) /* high priority input available */
255#define POLL_HUP (__SI_POLL|6) /* device disconnected */
256#define NSIGPOLL 6
257
258/*
259 * SIGSYS si_codes
260 */
261#define SYS_SECCOMP (__SI_SYS|1) /* seccomp triggered */
262#define NSIGSYS 1
263
264/*
265 * sigevent definitions
266 *
267 * It seems likely that SIGEV_THREAD will have to be handled from
268 * userspace, libpthread transmuting it to SIGEV_SIGNAL, which the
269 * thread manager then catches and does the appropriate nonsense.
270 * However, everything is written out here so as to not get lost.
271 */
272#define SIGEV_SIGNAL 0 /* notify via signal */
273#define SIGEV_NONE 1 /* other notification: meaningless */
274#define SIGEV_THREAD 2 /* deliver via thread creation */
275#define SIGEV_THREAD_ID 4 /* deliver to thread */
276
277/*
278 * This works because the alignment is ok on all current architectures
279 * but we leave open this being overridden in the future
280 */
281#ifndef __ARCH_SIGEV_PREAMBLE_SIZE
282#define __ARCH_SIGEV_PREAMBLE_SIZE (sizeof(int) * 2 + sizeof(sigval_t))
283#endif
284
285#define SIGEV_MAX_SIZE 64
286#define SIGEV_PAD_SIZE ((SIGEV_MAX_SIZE - __ARCH_SIGEV_PREAMBLE_SIZE) \
287 / sizeof(int))
288
289typedef struct sigevent {
290 sigval_t sigev_value;
291 int sigev_signo;
292 int sigev_notify;
293 union {
294 int _pad[SIGEV_PAD_SIZE];
295 int _tid;
296
297 struct {
298 void (*_function)(sigval_t);
299 void *_attribute; /* really pthread_attr_t */
300 } _sigev_thread;
301 } _sigev_un;
302} sigevent_t;
303
304#define sigev_notify_function _sigev_un._sigev_thread._function
305#define sigev_notify_attributes _sigev_un._sigev_thread._attribute
306#define sigev_notify_thread_id _sigev_un._tid
307
308#ifdef __KERNEL__
309 16
310struct siginfo; 17struct siginfo;
311void do_schedule_next_timer(struct siginfo *info); 18void do_schedule_next_timer(struct siginfo *info);
@@ -327,6 +34,4 @@ static inline void copy_siginfo(struct siginfo *to, struct siginfo *from)
327 34
328extern int copy_siginfo_to_user(struct siginfo __user *to, struct siginfo *from); 35extern int copy_siginfo_to_user(struct siginfo __user *to, struct siginfo *from);
329 36
330#endif /* __KERNEL__ */
331
332#endif 37#endif
diff --git a/include/asm-generic/signal-defs.h b/include/asm-generic/signal-defs.h
deleted file mode 100644
index 00f95df54297..000000000000
--- a/include/asm-generic/signal-defs.h
+++ /dev/null
@@ -1,28 +0,0 @@
1#ifndef __ASM_GENERIC_SIGNAL_DEFS_H
2#define __ASM_GENERIC_SIGNAL_DEFS_H
3
4#include <linux/compiler.h>
5
6#ifndef SIG_BLOCK
7#define SIG_BLOCK 0 /* for blocking signals */
8#endif
9#ifndef SIG_UNBLOCK
10#define SIG_UNBLOCK 1 /* for unblocking signals */
11#endif
12#ifndef SIG_SETMASK
13#define SIG_SETMASK 2 /* for setting the signal mask */
14#endif
15
16#ifndef __ASSEMBLY__
17typedef void __signalfn_t(int);
18typedef __signalfn_t __user *__sighandler_t;
19
20typedef void __restorefn_t(void);
21typedef __restorefn_t __user *__sigrestore_t;
22
23#define SIG_DFL ((__force __sighandler_t)0) /* default signal handling */
24#define SIG_IGN ((__force __sighandler_t)1) /* ignore signal */
25#define SIG_ERR ((__force __sighandler_t)-1) /* error return from signal */
26#endif
27
28#endif /* __ASM_GENERIC_SIGNAL_DEFS_H */
diff --git a/include/asm-generic/signal.h b/include/asm-generic/signal.h
index 555c0aee8a47..98caa306122a 100644
--- a/include/asm-generic/signal.h
+++ b/include/asm-generic/signal.h
@@ -1,131 +1,16 @@
1#ifndef __ASM_GENERIC_SIGNAL_H 1#ifndef __ASM_GENERIC_SIGNAL_H
2#define __ASM_GENERIC_SIGNAL_H 2#define __ASM_GENERIC_SIGNAL_H
3 3
4#include <linux/types.h> 4#include <uapi/asm-generic/signal.h>
5
6#define _NSIG 64
7#define _NSIG_BPW __BITS_PER_LONG
8#define _NSIG_WORDS (_NSIG / _NSIG_BPW)
9
10#define SIGHUP 1
11#define SIGINT 2
12#define SIGQUIT 3
13#define SIGILL 4
14#define SIGTRAP 5
15#define SIGABRT 6
16#define SIGIOT 6
17#define SIGBUS 7
18#define SIGFPE 8
19#define SIGKILL 9
20#define SIGUSR1 10
21#define SIGSEGV 11
22#define SIGUSR2 12
23#define SIGPIPE 13
24#define SIGALRM 14
25#define SIGTERM 15
26#define SIGSTKFLT 16
27#define SIGCHLD 17
28#define SIGCONT 18
29#define SIGSTOP 19
30#define SIGTSTP 20
31#define SIGTTIN 21
32#define SIGTTOU 22
33#define SIGURG 23
34#define SIGXCPU 24
35#define SIGXFSZ 25
36#define SIGVTALRM 26
37#define SIGPROF 27
38#define SIGWINCH 28
39#define SIGIO 29
40#define SIGPOLL SIGIO
41/*
42#define SIGLOST 29
43*/
44#define SIGPWR 30
45#define SIGSYS 31
46#define SIGUNUSED 31
47
48/* These should not be considered constants from userland. */
49#define SIGRTMIN 32
50#ifndef SIGRTMAX
51#define SIGRTMAX _NSIG
52#endif
53
54/*
55 * SA_FLAGS values:
56 *
57 * SA_ONSTACK indicates that a registered stack_t will be used.
58 * SA_RESTART flag to get restarting signals (which were the default long ago)
59 * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop.
60 * SA_RESETHAND clears the handler when the signal is delivered.
61 * SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies.
62 * SA_NODEFER prevents the current signal from being masked in the handler.
63 *
64 * SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single
65 * Unix names RESETHAND and NODEFER respectively.
66 */
67#define SA_NOCLDSTOP 0x00000001
68#define SA_NOCLDWAIT 0x00000002
69#define SA_SIGINFO 0x00000004
70#define SA_ONSTACK 0x08000000
71#define SA_RESTART 0x10000000
72#define SA_NODEFER 0x40000000
73#define SA_RESETHAND 0x80000000
74
75#define SA_NOMASK SA_NODEFER
76#define SA_ONESHOT SA_RESETHAND
77
78/*
79 * New architectures should not define the obsolete
80 * SA_RESTORER 0x04000000
81 */
82
83/*
84 * sigaltstack controls
85 */
86#define SS_ONSTACK 1
87#define SS_DISABLE 2
88
89#define MINSIGSTKSZ 2048
90#define SIGSTKSZ 8192
91 5
92#ifndef __ASSEMBLY__ 6#ifndef __ASSEMBLY__
93typedef struct {
94 unsigned long sig[_NSIG_WORDS];
95} sigset_t;
96
97/* not actually used, but required for linux/syscalls.h */
98typedef unsigned long old_sigset_t;
99
100#include <asm-generic/signal-defs.h>
101
102struct sigaction {
103 __sighandler_t sa_handler;
104 unsigned long sa_flags;
105#ifdef SA_RESTORER 7#ifdef SA_RESTORER
106 __sigrestore_t sa_restorer;
107#endif 8#endif
108 sigset_t sa_mask; /* mask last for extensibility */
109};
110
111struct k_sigaction {
112 struct sigaction sa;
113};
114
115typedef struct sigaltstack {
116 void __user *ss_sp;
117 int ss_flags;
118 size_t ss_size;
119} stack_t;
120
121#ifdef __KERNEL__
122 9
123#include <asm/sigcontext.h> 10#include <asm/sigcontext.h>
124#undef __HAVE_ARCH_SIG_BITOPS 11#undef __HAVE_ARCH_SIG_BITOPS
125 12
126#define ptrace_signal_deliver(regs, cookie) do { } while (0) 13#define ptrace_signal_deliver(regs, cookie) do { } while (0)
127 14
128#endif /* __KERNEL__ */
129#endif /* __ASSEMBLY__ */ 15#endif /* __ASSEMBLY__ */
130
131#endif /* _ASM_GENERIC_SIGNAL_H */ 16#endif /* _ASM_GENERIC_SIGNAL_H */
diff --git a/include/asm-generic/socket.h b/include/asm-generic/socket.h
deleted file mode 100644
index b1bea03274d5..000000000000
--- a/include/asm-generic/socket.h
+++ /dev/null
@@ -1,75 +0,0 @@
1#ifndef __ASM_GENERIC_SOCKET_H
2#define __ASM_GENERIC_SOCKET_H
3
4#include <asm/sockios.h>
5
6/* For setsockopt(2) */
7#define SOL_SOCKET 1
8
9#define SO_DEBUG 1
10#define SO_REUSEADDR 2
11#define SO_TYPE 3
12#define SO_ERROR 4
13#define SO_DONTROUTE 5
14#define SO_BROADCAST 6
15#define SO_SNDBUF 7
16#define SO_RCVBUF 8
17#define SO_SNDBUFFORCE 32
18#define SO_RCVBUFFORCE 33
19#define SO_KEEPALIVE 9
20#define SO_OOBINLINE 10
21#define SO_NO_CHECK 11
22#define SO_PRIORITY 12
23#define SO_LINGER 13
24#define SO_BSDCOMPAT 14
25/* To add :#define SO_REUSEPORT 15 */
26
27#ifndef SO_PASSCRED /* powerpc only differs in these */
28#define SO_PASSCRED 16
29#define SO_PEERCRED 17
30#define SO_RCVLOWAT 18
31#define SO_SNDLOWAT 19
32#define SO_RCVTIMEO 20
33#define SO_SNDTIMEO 21
34#endif
35
36/* Security levels - as per NRL IPv6 - don't actually do anything */
37#define SO_SECURITY_AUTHENTICATION 22
38#define SO_SECURITY_ENCRYPTION_TRANSPORT 23
39#define SO_SECURITY_ENCRYPTION_NETWORK 24
40
41#define SO_BINDTODEVICE 25
42
43/* Socket filtering */
44#define SO_ATTACH_FILTER 26
45#define SO_DETACH_FILTER 27
46
47#define SO_PEERNAME 28
48#define SO_TIMESTAMP 29
49#define SCM_TIMESTAMP SO_TIMESTAMP
50
51#define SO_ACCEPTCONN 30
52
53#define SO_PEERSEC 31
54#define SO_PASSSEC 34
55#define SO_TIMESTAMPNS 35
56#define SCM_TIMESTAMPNS SO_TIMESTAMPNS
57
58#define SO_MARK 36
59
60#define SO_TIMESTAMPING 37
61#define SCM_TIMESTAMPING SO_TIMESTAMPING
62
63#define SO_PROTOCOL 38
64#define SO_DOMAIN 39
65
66#define SO_RXQ_OVFL 40
67
68#define SO_WIFI_STATUS 41
69#define SCM_WIFI_STATUS SO_WIFI_STATUS
70#define SO_PEEK_OFF 42
71
72/* Instruct lower device to use last 4-bytes of skb data as FCS */
73#define SO_NOFCS 43
74
75#endif /* __ASM_GENERIC_SOCKET_H */
diff --git a/include/asm-generic/sockios.h b/include/asm-generic/sockios.h
deleted file mode 100644
index 9a61a369b901..000000000000
--- a/include/asm-generic/sockios.h
+++ /dev/null
@@ -1,13 +0,0 @@
1#ifndef __ASM_GENERIC_SOCKIOS_H
2#define __ASM_GENERIC_SOCKIOS_H
3
4/* Socket-level I/O control calls. */
5#define FIOSETOWN 0x8901
6#define SIOCSPGRP 0x8902
7#define FIOGETOWN 0x8903
8#define SIOCGPGRP 0x8904
9#define SIOCATMARK 0x8905
10#define SIOCGSTAMP 0x8906 /* Get stamp (timeval) */
11#define SIOCGSTAMPNS 0x8907 /* Get stamp (timespec) */
12
13#endif /* __ASM_GENERIC_SOCKIOS_H */
diff --git a/include/asm-generic/stat.h b/include/asm-generic/stat.h
deleted file mode 100644
index bd8cad21998e..000000000000
--- a/include/asm-generic/stat.h
+++ /dev/null
@@ -1,72 +0,0 @@
1#ifndef __ASM_GENERIC_STAT_H
2#define __ASM_GENERIC_STAT_H
3
4/*
5 * Everybody gets this wrong and has to stick with it for all
6 * eternity. Hopefully, this version gets used by new architectures
7 * so they don't fall into the same traps.
8 *
9 * stat64 is copied from powerpc64, with explicit padding added.
10 * stat is the same structure layout on 64-bit, without the 'long long'
11 * types.
12 *
13 * By convention, 64 bit architectures use the stat interface, while
14 * 32 bit architectures use the stat64 interface. Note that we don't
15 * provide an __old_kernel_stat here, which new architecture should
16 * not have to start with.
17 */
18
19#include <asm/bitsperlong.h>
20
21#define STAT_HAVE_NSEC 1
22
23struct stat {
24 unsigned long st_dev; /* Device. */
25 unsigned long st_ino; /* File serial number. */
26 unsigned int st_mode; /* File mode. */
27 unsigned int st_nlink; /* Link count. */
28 unsigned int st_uid; /* User ID of the file's owner. */
29 unsigned int st_gid; /* Group ID of the file's group. */
30 unsigned long st_rdev; /* Device number, if device. */
31 unsigned long __pad1;
32 long st_size; /* Size of file, in bytes. */
33 int st_blksize; /* Optimal block size for I/O. */
34 int __pad2;
35 long st_blocks; /* Number 512-byte blocks allocated. */
36 long st_atime; /* Time of last access. */
37 unsigned long st_atime_nsec;
38 long st_mtime; /* Time of last modification. */
39 unsigned long st_mtime_nsec;
40 long st_ctime; /* Time of last status change. */
41 unsigned long st_ctime_nsec;
42 unsigned int __unused4;
43 unsigned int __unused5;
44};
45
46/* This matches struct stat64 in glibc2.1. Only used for 32 bit. */
47#if __BITS_PER_LONG != 64 || defined(__ARCH_WANT_STAT64)
48struct stat64 {
49 unsigned long long st_dev; /* Device. */
50 unsigned long long st_ino; /* File serial number. */
51 unsigned int st_mode; /* File mode. */
52 unsigned int st_nlink; /* Link count. */
53 unsigned int st_uid; /* User ID of the file's owner. */
54 unsigned int st_gid; /* Group ID of the file's group. */
55 unsigned long long st_rdev; /* Device number, if device. */
56 unsigned long long __pad1;
57 long long st_size; /* Size of file, in bytes. */
58 int st_blksize; /* Optimal block size for I/O. */
59 int __pad2;
60 long long st_blocks; /* Number 512-byte blocks allocated. */
61 int st_atime; /* Time of last access. */
62 unsigned int st_atime_nsec;
63 int st_mtime; /* Time of last modification. */
64 unsigned int st_mtime_nsec;
65 int st_ctime; /* Time of last status change. */
66 unsigned int st_ctime_nsec;
67 unsigned int __unused4;
68 unsigned int __unused5;
69};
70#endif
71
72#endif /* __ASM_GENERIC_STAT_H */
diff --git a/include/asm-generic/statfs.h b/include/asm-generic/statfs.h
index c749af9c0983..4b934e9ec970 100644
--- a/include/asm-generic/statfs.h
+++ b/include/asm-generic/statfs.h
@@ -1,86 +1,7 @@
1#ifndef _GENERIC_STATFS_H 1#ifndef _GENERIC_STATFS_H
2#define _GENERIC_STATFS_H 2#define _GENERIC_STATFS_H
3 3
4#include <linux/types.h> 4#include <uapi/asm-generic/statfs.h>
5 5
6#ifdef __KERNEL__
7typedef __kernel_fsid_t fsid_t; 6typedef __kernel_fsid_t fsid_t;
8#endif 7#endif
9
10/*
11 * Most 64-bit platforms use 'long', while most 32-bit platforms use '__u32'.
12 * Yes, they differ in signedness as well as size.
13 * Special cases can override it for themselves -- except for S390x, which
14 * is just a little too special for us. And MIPS, which I'm not touching
15 * with a 10' pole.
16 */
17#ifndef __statfs_word
18#if __BITS_PER_LONG == 64
19#define __statfs_word long
20#else
21#define __statfs_word __u32
22#endif
23#endif
24
25struct statfs {
26 __statfs_word f_type;
27 __statfs_word f_bsize;
28 __statfs_word f_blocks;
29 __statfs_word f_bfree;
30 __statfs_word f_bavail;
31 __statfs_word f_files;
32 __statfs_word f_ffree;
33 __kernel_fsid_t f_fsid;
34 __statfs_word f_namelen;
35 __statfs_word f_frsize;
36 __statfs_word f_flags;
37 __statfs_word f_spare[4];
38};
39
40/*
41 * ARM needs to avoid the 32-bit padding at the end, for consistency
42 * between EABI and OABI
43 */
44#ifndef ARCH_PACK_STATFS64
45#define ARCH_PACK_STATFS64
46#endif
47
48struct statfs64 {
49 __statfs_word f_type;
50 __statfs_word f_bsize;
51 __u64 f_blocks;
52 __u64 f_bfree;
53 __u64 f_bavail;
54 __u64 f_files;
55 __u64 f_ffree;
56 __kernel_fsid_t f_fsid;
57 __statfs_word f_namelen;
58 __statfs_word f_frsize;
59 __statfs_word f_flags;
60 __statfs_word f_spare[4];
61} ARCH_PACK_STATFS64;
62
63/*
64 * IA64 and x86_64 need to avoid the 32-bit padding at the end,
65 * to be compatible with the i386 ABI
66 */
67#ifndef ARCH_PACK_COMPAT_STATFS64
68#define ARCH_PACK_COMPAT_STATFS64
69#endif
70
71struct compat_statfs64 {
72 __u32 f_type;
73 __u32 f_bsize;
74 __u64 f_blocks;
75 __u64 f_bfree;
76 __u64 f_bavail;
77 __u64 f_files;
78 __u64 f_ffree;
79 __kernel_fsid_t f_fsid;
80 __u32 f_namelen;
81 __u32 f_frsize;
82 __u32 f_flags;
83 __u32 f_spare[4];
84} ARCH_PACK_COMPAT_STATFS64;
85
86#endif
diff --git a/include/asm-generic/swab.h b/include/asm-generic/swab.h
deleted file mode 100644
index a8e9029d9eba..000000000000
--- a/include/asm-generic/swab.h
+++ /dev/null
@@ -1,18 +0,0 @@
1#ifndef _ASM_GENERIC_SWAB_H
2#define _ASM_GENERIC_SWAB_H
3
4#include <asm/bitsperlong.h>
5
6/*
7 * 32 bit architectures typically (but not always) want to
8 * set __SWAB_64_THRU_32__. In user space, this is only
9 * valid if the compiler supports 64 bit data types.
10 */
11
12#if __BITS_PER_LONG == 32
13#if defined(__GNUC__) && !defined(__STRICT_ANSI__) || defined(__KERNEL__)
14#define __SWAB_64_THRU_32__
15#endif
16#endif
17
18#endif /* _ASM_GENERIC_SWAB_H */
diff --git a/include/asm-generic/termbits.h b/include/asm-generic/termbits.h
deleted file mode 100644
index 232b4781aef3..000000000000
--- a/include/asm-generic/termbits.h
+++ /dev/null
@@ -1,199 +0,0 @@
1#ifndef __ASM_GENERIC_TERMBITS_H
2#define __ASM_GENERIC_TERMBITS_H
3
4#include <linux/posix_types.h>
5
6typedef unsigned char cc_t;
7typedef unsigned int speed_t;
8typedef unsigned int tcflag_t;
9
10#define NCCS 19
11struct termios {
12 tcflag_t c_iflag; /* input mode flags */
13 tcflag_t c_oflag; /* output mode flags */
14 tcflag_t c_cflag; /* control mode flags */
15 tcflag_t c_lflag; /* local mode flags */
16 cc_t c_line; /* line discipline */
17 cc_t c_cc[NCCS]; /* control characters */
18};
19
20struct termios2 {
21 tcflag_t c_iflag; /* input mode flags */
22 tcflag_t c_oflag; /* output mode flags */
23 tcflag_t c_cflag; /* control mode flags */
24 tcflag_t c_lflag; /* local mode flags */
25 cc_t c_line; /* line discipline */
26 cc_t c_cc[NCCS]; /* control characters */
27 speed_t c_ispeed; /* input speed */
28 speed_t c_ospeed; /* output speed */
29};
30
31struct ktermios {
32 tcflag_t c_iflag; /* input mode flags */
33 tcflag_t c_oflag; /* output mode flags */
34 tcflag_t c_cflag; /* control mode flags */
35 tcflag_t c_lflag; /* local mode flags */
36 cc_t c_line; /* line discipline */
37 cc_t c_cc[NCCS]; /* control characters */
38 speed_t c_ispeed; /* input speed */
39 speed_t c_ospeed; /* output speed */
40};
41
42/* c_cc characters */
43#define VINTR 0
44#define VQUIT 1
45#define VERASE 2
46#define VKILL 3
47#define VEOF 4
48#define VTIME 5
49#define VMIN 6
50#define VSWTC 7
51#define VSTART 8
52#define VSTOP 9
53#define VSUSP 10
54#define VEOL 11
55#define VREPRINT 12
56#define VDISCARD 13
57#define VWERASE 14
58#define VLNEXT 15
59#define VEOL2 16
60
61/* c_iflag bits */
62#define IGNBRK 0000001
63#define BRKINT 0000002
64#define IGNPAR 0000004
65#define PARMRK 0000010
66#define INPCK 0000020
67#define ISTRIP 0000040
68#define INLCR 0000100
69#define IGNCR 0000200
70#define ICRNL 0000400
71#define IUCLC 0001000
72#define IXON 0002000
73#define IXANY 0004000
74#define IXOFF 0010000
75#define IMAXBEL 0020000
76#define IUTF8 0040000
77
78/* c_oflag bits */
79#define OPOST 0000001
80#define OLCUC 0000002
81#define ONLCR 0000004
82#define OCRNL 0000010
83#define ONOCR 0000020
84#define ONLRET 0000040
85#define OFILL 0000100
86#define OFDEL 0000200
87#define NLDLY 0000400
88#define NL0 0000000
89#define NL1 0000400
90#define CRDLY 0003000
91#define CR0 0000000
92#define CR1 0001000
93#define CR2 0002000
94#define CR3 0003000
95#define TABDLY 0014000
96#define TAB0 0000000
97#define TAB1 0004000
98#define TAB2 0010000
99#define TAB3 0014000
100#define XTABS 0014000
101#define BSDLY 0020000
102#define BS0 0000000
103#define BS1 0020000
104#define VTDLY 0040000
105#define VT0 0000000
106#define VT1 0040000
107#define FFDLY 0100000
108#define FF0 0000000
109#define FF1 0100000
110
111/* c_cflag bit meaning */
112#define CBAUD 0010017
113#define B0 0000000 /* hang up */
114#define B50 0000001
115#define B75 0000002
116#define B110 0000003
117#define B134 0000004
118#define B150 0000005
119#define B200 0000006
120#define B300 0000007
121#define B600 0000010
122#define B1200 0000011
123#define B1800 0000012
124#define B2400 0000013
125#define B4800 0000014
126#define B9600 0000015
127#define B19200 0000016
128#define B38400 0000017
129#define EXTA B19200
130#define EXTB B38400
131#define CSIZE 0000060
132#define CS5 0000000
133#define CS6 0000020
134#define CS7 0000040
135#define CS8 0000060
136#define CSTOPB 0000100
137#define CREAD 0000200
138#define PARENB 0000400
139#define PARODD 0001000
140#define HUPCL 0002000
141#define CLOCAL 0004000
142#define CBAUDEX 0010000
143#define BOTHER 0010000
144#define B57600 0010001
145#define B115200 0010002
146#define B230400 0010003
147#define B460800 0010004
148#define B500000 0010005
149#define B576000 0010006
150#define B921600 0010007
151#define B1000000 0010010
152#define B1152000 0010011
153#define B1500000 0010012
154#define B2000000 0010013
155#define B2500000 0010014
156#define B3000000 0010015
157#define B3500000 0010016
158#define B4000000 0010017
159#define CIBAUD 002003600000 /* input baud rate */
160#define CMSPAR 010000000000 /* mark or space (stick) parity */
161#define CRTSCTS 020000000000 /* flow control */
162
163#define IBSHIFT 16 /* Shift from CBAUD to CIBAUD */
164
165/* c_lflag bits */
166#define ISIG 0000001
167#define ICANON 0000002
168#define XCASE 0000004
169#define ECHO 0000010
170#define ECHOE 0000020
171#define ECHOK 0000040
172#define ECHONL 0000100
173#define NOFLSH 0000200
174#define TOSTOP 0000400
175#define ECHOCTL 0001000
176#define ECHOPRT 0002000
177#define ECHOKE 0004000
178#define FLUSHO 0010000
179#define PENDIN 0040000
180#define IEXTEN 0100000
181#define EXTPROC 0200000
182
183/* tcflow() and TCXONC use these */
184#define TCOOFF 0
185#define TCOON 1
186#define TCIOFF 2
187#define TCION 3
188
189/* tcflush() and TCFLSH use these */
190#define TCIFLUSH 0
191#define TCOFLUSH 1
192#define TCIOFLUSH 2
193
194/* tcsetattr uses these */
195#define TCSANOW 0
196#define TCSADRAIN 1
197#define TCSAFLUSH 2
198
199#endif /* __ASM_GENERIC_TERMBITS_H */
diff --git a/include/asm-generic/termios.h b/include/asm-generic/termios.h
index d0922adc56d4..4fa6fe0fc2a2 100644
--- a/include/asm-generic/termios.h
+++ b/include/asm-generic/termios.h
@@ -1,54 +1,9 @@
1#ifndef _ASM_GENERIC_TERMIOS_H 1#ifndef _ASM_GENERIC_TERMIOS_H
2#define _ASM_GENERIC_TERMIOS_H 2#define _ASM_GENERIC_TERMIOS_H
3/*
4 * Most architectures have straight copies of the x86 code, with
5 * varying levels of bug fixes on top. Usually it's a good idea
6 * to use this generic version instead, but be careful to avoid
7 * ABI changes.
8 * New architectures should not provide their own version.
9 */
10 3
11#include <asm/termbits.h>
12#include <asm/ioctls.h>
13
14struct winsize {
15 unsigned short ws_row;
16 unsigned short ws_col;
17 unsigned short ws_xpixel;
18 unsigned short ws_ypixel;
19};
20
21#define NCC 8
22struct termio {
23 unsigned short c_iflag; /* input mode flags */
24 unsigned short c_oflag; /* output mode flags */
25 unsigned short c_cflag; /* control mode flags */
26 unsigned short c_lflag; /* local mode flags */
27 unsigned char c_line; /* line discipline */
28 unsigned char c_cc[NCC]; /* control characters */
29};
30
31/* modem lines */
32#define TIOCM_LE 0x001
33#define TIOCM_DTR 0x002
34#define TIOCM_RTS 0x004
35#define TIOCM_ST 0x008
36#define TIOCM_SR 0x010
37#define TIOCM_CTS 0x020
38#define TIOCM_CAR 0x040
39#define TIOCM_RNG 0x080
40#define TIOCM_DSR 0x100
41#define TIOCM_CD TIOCM_CAR
42#define TIOCM_RI TIOCM_RNG
43#define TIOCM_OUT1 0x2000
44#define TIOCM_OUT2 0x4000
45#define TIOCM_LOOP 0x8000
46
47/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
48
49#ifdef __KERNEL__
50 4
51#include <asm/uaccess.h> 5#include <asm/uaccess.h>
6#include <uapi/asm-generic/termios.h>
52 7
53/* intr=^C quit=^\ erase=del kill=^U 8/* intr=^C quit=^\ erase=del kill=^U
54 eof=^D vtime=\0 vmin=\1 sxtc=\0 9 eof=^D vtime=\0 vmin=\1 sxtc=\0
@@ -149,6 +104,4 @@ static inline int kernel_termios_to_user_termios(struct termios __user *u,
149} 104}
150#endif /* TCGETS2 */ 105#endif /* TCGETS2 */
151 106
152#endif /* __KERNEL__ */
153
154#endif /* _ASM_GENERIC_TERMIOS_H */ 107#endif /* _ASM_GENERIC_TERMIOS_H */
diff --git a/include/asm-generic/types.h b/include/asm-generic/types.h
deleted file mode 100644
index bd39806013b5..000000000000
--- a/include/asm-generic/types.h
+++ /dev/null
@@ -1,9 +0,0 @@
1#ifndef _ASM_GENERIC_TYPES_H
2#define _ASM_GENERIC_TYPES_H
3/*
4 * int-ll64 is used practically everywhere now,
5 * so use it as a reasonable default.
6 */
7#include <asm-generic/int-ll64.h>
8
9#endif /* _ASM_GENERIC_TYPES_H */
diff --git a/include/asm-generic/ucontext.h b/include/asm-generic/ucontext.h
deleted file mode 100644
index ad77343e8a9a..000000000000
--- a/include/asm-generic/ucontext.h
+++ /dev/null
@@ -1,12 +0,0 @@
1#ifndef __ASM_GENERIC_UCONTEXT_H
2#define __ASM_GENERIC_UCONTEXT_H
3
4struct ucontext {
5 unsigned long uc_flags;
6 struct ucontext *uc_link;
7 stack_t uc_stack;
8 struct sigcontext uc_mcontext;
9 sigset_t uc_sigmask; /* mask last for extensibility */
10};
11
12#endif /* __ASM_GENERIC_UCONTEXT_H */
diff --git a/include/asm-generic/unistd.h b/include/asm-generic/unistd.h
index 991ef01cd77e..a36991ab334e 100644
--- a/include/asm-generic/unistd.h
+++ b/include/asm-generic/unistd.h
@@ -1,908 +1,4 @@
1#if !defined(_ASM_GENERIC_UNISTD_H) || defined(__SYSCALL) 1#include <uapi/asm-generic/unistd.h>
2#define _ASM_GENERIC_UNISTD_H
3
4#include <asm/bitsperlong.h>
5
6/*
7 * This file contains the system call numbers, based on the
8 * layout of the x86-64 architecture, which embeds the
9 * pointer to the syscall in the table.
10 *
11 * As a basic principle, no duplication of functionality
12 * should be added, e.g. we don't use lseek when llseek
13 * is present. New architectures should use this file
14 * and implement the less feature-full calls in user space.
15 */
16
17#ifndef __SYSCALL
18#define __SYSCALL(x, y)
19#endif
20
21#if __BITS_PER_LONG == 32 || defined(__SYSCALL_COMPAT)
22#define __SC_3264(_nr, _32, _64) __SYSCALL(_nr, _32)
23#else
24#define __SC_3264(_nr, _32, _64) __SYSCALL(_nr, _64)
25#endif
26
27#ifdef __SYSCALL_COMPAT
28#define __SC_COMP(_nr, _sys, _comp) __SYSCALL(_nr, _comp)
29#define __SC_COMP_3264(_nr, _32, _64, _comp) __SYSCALL(_nr, _comp)
30#else
31#define __SC_COMP(_nr, _sys, _comp) __SYSCALL(_nr, _sys)
32#define __SC_COMP_3264(_nr, _32, _64, _comp) __SC_3264(_nr, _32, _64)
33#endif
34
35#define __NR_io_setup 0
36__SC_COMP(__NR_io_setup, sys_io_setup, compat_sys_io_setup)
37#define __NR_io_destroy 1
38__SYSCALL(__NR_io_destroy, sys_io_destroy)
39#define __NR_io_submit 2
40__SC_COMP(__NR_io_submit, sys_io_submit, compat_sys_io_submit)
41#define __NR_io_cancel 3
42__SYSCALL(__NR_io_cancel, sys_io_cancel)
43#define __NR_io_getevents 4
44__SC_COMP(__NR_io_getevents, sys_io_getevents, compat_sys_io_getevents)
45
46/* fs/xattr.c */
47#define __NR_setxattr 5
48__SYSCALL(__NR_setxattr, sys_setxattr)
49#define __NR_lsetxattr 6
50__SYSCALL(__NR_lsetxattr, sys_lsetxattr)
51#define __NR_fsetxattr 7
52__SYSCALL(__NR_fsetxattr, sys_fsetxattr)
53#define __NR_getxattr 8
54__SYSCALL(__NR_getxattr, sys_getxattr)
55#define __NR_lgetxattr 9
56__SYSCALL(__NR_lgetxattr, sys_lgetxattr)
57#define __NR_fgetxattr 10
58__SYSCALL(__NR_fgetxattr, sys_fgetxattr)
59#define __NR_listxattr 11
60__SYSCALL(__NR_listxattr, sys_listxattr)
61#define __NR_llistxattr 12
62__SYSCALL(__NR_llistxattr, sys_llistxattr)
63#define __NR_flistxattr 13
64__SYSCALL(__NR_flistxattr, sys_flistxattr)
65#define __NR_removexattr 14
66__SYSCALL(__NR_removexattr, sys_removexattr)
67#define __NR_lremovexattr 15
68__SYSCALL(__NR_lremovexattr, sys_lremovexattr)
69#define __NR_fremovexattr 16
70__SYSCALL(__NR_fremovexattr, sys_fremovexattr)
71
72/* fs/dcache.c */
73#define __NR_getcwd 17
74__SYSCALL(__NR_getcwd, sys_getcwd)
75
76/* fs/cookies.c */
77#define __NR_lookup_dcookie 18
78__SC_COMP(__NR_lookup_dcookie, sys_lookup_dcookie, compat_sys_lookup_dcookie)
79
80/* fs/eventfd.c */
81#define __NR_eventfd2 19
82__SYSCALL(__NR_eventfd2, sys_eventfd2)
83
84/* fs/eventpoll.c */
85#define __NR_epoll_create1 20
86__SYSCALL(__NR_epoll_create1, sys_epoll_create1)
87#define __NR_epoll_ctl 21
88__SYSCALL(__NR_epoll_ctl, sys_epoll_ctl)
89#define __NR_epoll_pwait 22
90__SC_COMP(__NR_epoll_pwait, sys_epoll_pwait, compat_sys_epoll_pwait)
91
92/* fs/fcntl.c */
93#define __NR_dup 23
94__SYSCALL(__NR_dup, sys_dup)
95#define __NR_dup3 24
96__SYSCALL(__NR_dup3, sys_dup3)
97#define __NR3264_fcntl 25
98__SC_COMP_3264(__NR3264_fcntl, sys_fcntl64, sys_fcntl, compat_sys_fcntl64)
99
100/* fs/inotify_user.c */
101#define __NR_inotify_init1 26
102__SYSCALL(__NR_inotify_init1, sys_inotify_init1)
103#define __NR_inotify_add_watch 27
104__SYSCALL(__NR_inotify_add_watch, sys_inotify_add_watch)
105#define __NR_inotify_rm_watch 28
106__SYSCALL(__NR_inotify_rm_watch, sys_inotify_rm_watch)
107
108/* fs/ioctl.c */
109#define __NR_ioctl 29
110__SC_COMP(__NR_ioctl, sys_ioctl, compat_sys_ioctl)
111
112/* fs/ioprio.c */
113#define __NR_ioprio_set 30
114__SYSCALL(__NR_ioprio_set, sys_ioprio_set)
115#define __NR_ioprio_get 31
116__SYSCALL(__NR_ioprio_get, sys_ioprio_get)
117
118/* fs/locks.c */
119#define __NR_flock 32
120__SYSCALL(__NR_flock, sys_flock)
121
122/* fs/namei.c */
123#define __NR_mknodat 33
124__SYSCALL(__NR_mknodat, sys_mknodat)
125#define __NR_mkdirat 34
126__SYSCALL(__NR_mkdirat, sys_mkdirat)
127#define __NR_unlinkat 35
128__SYSCALL(__NR_unlinkat, sys_unlinkat)
129#define __NR_symlinkat 36
130__SYSCALL(__NR_symlinkat, sys_symlinkat)
131#define __NR_linkat 37
132__SYSCALL(__NR_linkat, sys_linkat)
133#define __NR_renameat 38
134__SYSCALL(__NR_renameat, sys_renameat)
135
136/* fs/namespace.c */
137#define __NR_umount2 39
138__SYSCALL(__NR_umount2, sys_umount)
139#define __NR_mount 40
140__SC_COMP(__NR_mount, sys_mount, compat_sys_mount)
141#define __NR_pivot_root 41
142__SYSCALL(__NR_pivot_root, sys_pivot_root)
143
144/* fs/nfsctl.c */
145#define __NR_nfsservctl 42
146__SYSCALL(__NR_nfsservctl, sys_ni_syscall)
147
148/* fs/open.c */
149#define __NR3264_statfs 43
150__SC_COMP_3264(__NR3264_statfs, sys_statfs64, sys_statfs, \
151 compat_sys_statfs64)
152#define __NR3264_fstatfs 44
153__SC_COMP_3264(__NR3264_fstatfs, sys_fstatfs64, sys_fstatfs, \
154 compat_sys_fstatfs64)
155#define __NR3264_truncate 45
156__SC_COMP_3264(__NR3264_truncate, sys_truncate64, sys_truncate, \
157 compat_sys_truncate64)
158#define __NR3264_ftruncate 46
159__SC_COMP_3264(__NR3264_ftruncate, sys_ftruncate64, sys_ftruncate, \
160 compat_sys_ftruncate64)
161
162#define __NR_fallocate 47
163__SC_COMP(__NR_fallocate, sys_fallocate, compat_sys_fallocate)
164#define __NR_faccessat 48
165__SYSCALL(__NR_faccessat, sys_faccessat)
166#define __NR_chdir 49
167__SYSCALL(__NR_chdir, sys_chdir)
168#define __NR_fchdir 50
169__SYSCALL(__NR_fchdir, sys_fchdir)
170#define __NR_chroot 51
171__SYSCALL(__NR_chroot, sys_chroot)
172#define __NR_fchmod 52
173__SYSCALL(__NR_fchmod, sys_fchmod)
174#define __NR_fchmodat 53
175__SYSCALL(__NR_fchmodat, sys_fchmodat)
176#define __NR_fchownat 54
177__SYSCALL(__NR_fchownat, sys_fchownat)
178#define __NR_fchown 55
179__SYSCALL(__NR_fchown, sys_fchown)
180#define __NR_openat 56
181__SC_COMP(__NR_openat, sys_openat, compat_sys_openat)
182#define __NR_close 57
183__SYSCALL(__NR_close, sys_close)
184#define __NR_vhangup 58
185__SYSCALL(__NR_vhangup, sys_vhangup)
186
187/* fs/pipe.c */
188#define __NR_pipe2 59
189__SYSCALL(__NR_pipe2, sys_pipe2)
190
191/* fs/quota.c */
192#define __NR_quotactl 60
193__SYSCALL(__NR_quotactl, sys_quotactl)
194
195/* fs/readdir.c */
196#define __NR_getdents64 61
197__SC_COMP(__NR_getdents64, sys_getdents64, compat_sys_getdents64)
198
199/* fs/read_write.c */
200#define __NR3264_lseek 62
201__SC_3264(__NR3264_lseek, sys_llseek, sys_lseek)
202#define __NR_read 63
203__SYSCALL(__NR_read, sys_read)
204#define __NR_write 64
205__SYSCALL(__NR_write, sys_write)
206#define __NR_readv 65
207__SC_COMP(__NR_readv, sys_readv, compat_sys_readv)
208#define __NR_writev 66
209__SC_COMP(__NR_writev, sys_writev, compat_sys_writev)
210#define __NR_pread64 67
211__SC_COMP(__NR_pread64, sys_pread64, compat_sys_pread64)
212#define __NR_pwrite64 68
213__SC_COMP(__NR_pwrite64, sys_pwrite64, compat_sys_pwrite64)
214#define __NR_preadv 69
215__SC_COMP(__NR_preadv, sys_preadv, compat_sys_preadv)
216#define __NR_pwritev 70
217__SC_COMP(__NR_pwritev, sys_pwritev, compat_sys_pwritev)
218
219/* fs/sendfile.c */
220#define __NR3264_sendfile 71
221__SYSCALL(__NR3264_sendfile, sys_sendfile64)
222
223/* fs/select.c */
224#define __NR_pselect6 72
225__SC_COMP(__NR_pselect6, sys_pselect6, compat_sys_pselect6)
226#define __NR_ppoll 73
227__SC_COMP(__NR_ppoll, sys_ppoll, compat_sys_ppoll)
228
229/* fs/signalfd.c */
230#define __NR_signalfd4 74
231__SC_COMP(__NR_signalfd4, sys_signalfd4, compat_sys_signalfd4)
232
233/* fs/splice.c */
234#define __NR_vmsplice 75
235__SC_COMP(__NR_vmsplice, sys_vmsplice, compat_sys_vmsplice)
236#define __NR_splice 76
237__SYSCALL(__NR_splice, sys_splice)
238#define __NR_tee 77
239__SYSCALL(__NR_tee, sys_tee)
240
241/* fs/stat.c */
242#define __NR_readlinkat 78
243__SYSCALL(__NR_readlinkat, sys_readlinkat)
244#define __NR3264_fstatat 79
245__SC_3264(__NR3264_fstatat, sys_fstatat64, sys_newfstatat)
246#define __NR3264_fstat 80
247__SC_3264(__NR3264_fstat, sys_fstat64, sys_newfstat)
248
249/* fs/sync.c */
250#define __NR_sync 81
251__SYSCALL(__NR_sync, sys_sync)
252#define __NR_fsync 82
253__SYSCALL(__NR_fsync, sys_fsync)
254#define __NR_fdatasync 83
255__SYSCALL(__NR_fdatasync, sys_fdatasync)
256#ifdef __ARCH_WANT_SYNC_FILE_RANGE2
257#define __NR_sync_file_range2 84
258__SC_COMP(__NR_sync_file_range2, sys_sync_file_range2, \
259 compat_sys_sync_file_range2)
260#else
261#define __NR_sync_file_range 84
262__SC_COMP(__NR_sync_file_range, sys_sync_file_range, \
263 compat_sys_sync_file_range)
264#endif
265
266/* fs/timerfd.c */
267#define __NR_timerfd_create 85
268__SYSCALL(__NR_timerfd_create, sys_timerfd_create)
269#define __NR_timerfd_settime 86
270__SC_COMP(__NR_timerfd_settime, sys_timerfd_settime, \
271 compat_sys_timerfd_settime)
272#define __NR_timerfd_gettime 87
273__SC_COMP(__NR_timerfd_gettime, sys_timerfd_gettime, \
274 compat_sys_timerfd_gettime)
275
276/* fs/utimes.c */
277#define __NR_utimensat 88
278__SC_COMP(__NR_utimensat, sys_utimensat, compat_sys_utimensat)
279
280/* kernel/acct.c */
281#define __NR_acct 89
282__SYSCALL(__NR_acct, sys_acct)
283
284/* kernel/capability.c */
285#define __NR_capget 90
286__SYSCALL(__NR_capget, sys_capget)
287#define __NR_capset 91
288__SYSCALL(__NR_capset, sys_capset)
289
290/* kernel/exec_domain.c */
291#define __NR_personality 92
292__SYSCALL(__NR_personality, sys_personality)
293
294/* kernel/exit.c */
295#define __NR_exit 93
296__SYSCALL(__NR_exit, sys_exit)
297#define __NR_exit_group 94
298__SYSCALL(__NR_exit_group, sys_exit_group)
299#define __NR_waitid 95
300__SC_COMP(__NR_waitid, sys_waitid, compat_sys_waitid)
301
302/* kernel/fork.c */
303#define __NR_set_tid_address 96
304__SYSCALL(__NR_set_tid_address, sys_set_tid_address)
305#define __NR_unshare 97
306__SYSCALL(__NR_unshare, sys_unshare)
307
308/* kernel/futex.c */
309#define __NR_futex 98
310__SC_COMP(__NR_futex, sys_futex, compat_sys_futex)
311#define __NR_set_robust_list 99
312__SC_COMP(__NR_set_robust_list, sys_set_robust_list, \
313 compat_sys_set_robust_list)
314#define __NR_get_robust_list 100
315__SC_COMP(__NR_get_robust_list, sys_get_robust_list, \
316 compat_sys_get_robust_list)
317
318/* kernel/hrtimer.c */
319#define __NR_nanosleep 101
320__SC_COMP(__NR_nanosleep, sys_nanosleep, compat_sys_nanosleep)
321
322/* kernel/itimer.c */
323#define __NR_getitimer 102
324__SC_COMP(__NR_getitimer, sys_getitimer, compat_sys_getitimer)
325#define __NR_setitimer 103
326__SC_COMP(__NR_setitimer, sys_setitimer, compat_sys_setitimer)
327
328/* kernel/kexec.c */
329#define __NR_kexec_load 104
330__SC_COMP(__NR_kexec_load, sys_kexec_load, compat_sys_kexec_load)
331
332/* kernel/module.c */
333#define __NR_init_module 105
334__SYSCALL(__NR_init_module, sys_init_module)
335#define __NR_delete_module 106
336__SYSCALL(__NR_delete_module, sys_delete_module)
337
338/* kernel/posix-timers.c */
339#define __NR_timer_create 107
340__SC_COMP(__NR_timer_create, sys_timer_create, compat_sys_timer_create)
341#define __NR_timer_gettime 108
342__SC_COMP(__NR_timer_gettime, sys_timer_gettime, compat_sys_timer_gettime)
343#define __NR_timer_getoverrun 109
344__SYSCALL(__NR_timer_getoverrun, sys_timer_getoverrun)
345#define __NR_timer_settime 110
346__SC_COMP(__NR_timer_settime, sys_timer_settime, compat_sys_timer_settime)
347#define __NR_timer_delete 111
348__SYSCALL(__NR_timer_delete, sys_timer_delete)
349#define __NR_clock_settime 112
350__SC_COMP(__NR_clock_settime, sys_clock_settime, compat_sys_clock_settime)
351#define __NR_clock_gettime 113
352__SC_COMP(__NR_clock_gettime, sys_clock_gettime, compat_sys_clock_gettime)
353#define __NR_clock_getres 114
354__SC_COMP(__NR_clock_getres, sys_clock_getres, compat_sys_clock_getres)
355#define __NR_clock_nanosleep 115
356__SC_COMP(__NR_clock_nanosleep, sys_clock_nanosleep, \
357 compat_sys_clock_nanosleep)
358
359/* kernel/printk.c */
360#define __NR_syslog 116
361__SYSCALL(__NR_syslog, sys_syslog)
362
363/* kernel/ptrace.c */
364#define __NR_ptrace 117
365__SYSCALL(__NR_ptrace, sys_ptrace)
366
367/* kernel/sched.c */
368#define __NR_sched_setparam 118
369__SYSCALL(__NR_sched_setparam, sys_sched_setparam)
370#define __NR_sched_setscheduler 119
371__SYSCALL(__NR_sched_setscheduler, sys_sched_setscheduler)
372#define __NR_sched_getscheduler 120
373__SYSCALL(__NR_sched_getscheduler, sys_sched_getscheduler)
374#define __NR_sched_getparam 121
375__SYSCALL(__NR_sched_getparam, sys_sched_getparam)
376#define __NR_sched_setaffinity 122
377__SC_COMP(__NR_sched_setaffinity, sys_sched_setaffinity, \
378 compat_sys_sched_setaffinity)
379#define __NR_sched_getaffinity 123
380__SC_COMP(__NR_sched_getaffinity, sys_sched_getaffinity, \
381 compat_sys_sched_getaffinity)
382#define __NR_sched_yield 124
383__SYSCALL(__NR_sched_yield, sys_sched_yield)
384#define __NR_sched_get_priority_max 125
385__SYSCALL(__NR_sched_get_priority_max, sys_sched_get_priority_max)
386#define __NR_sched_get_priority_min 126
387__SYSCALL(__NR_sched_get_priority_min, sys_sched_get_priority_min)
388#define __NR_sched_rr_get_interval 127
389__SC_COMP(__NR_sched_rr_get_interval, sys_sched_rr_get_interval, \
390 compat_sys_sched_rr_get_interval)
391
392/* kernel/signal.c */
393#define __NR_restart_syscall 128
394__SYSCALL(__NR_restart_syscall, sys_restart_syscall)
395#define __NR_kill 129
396__SYSCALL(__NR_kill, sys_kill)
397#define __NR_tkill 130
398__SYSCALL(__NR_tkill, sys_tkill)
399#define __NR_tgkill 131
400__SYSCALL(__NR_tgkill, sys_tgkill)
401#define __NR_sigaltstack 132
402__SC_COMP(__NR_sigaltstack, sys_sigaltstack, compat_sys_sigaltstack)
403#define __NR_rt_sigsuspend 133
404__SC_COMP(__NR_rt_sigsuspend, sys_rt_sigsuspend, compat_sys_rt_sigsuspend)
405#define __NR_rt_sigaction 134
406__SC_COMP(__NR_rt_sigaction, sys_rt_sigaction, compat_sys_rt_sigaction)
407#define __NR_rt_sigprocmask 135
408__SYSCALL(__NR_rt_sigprocmask, sys_rt_sigprocmask)
409#define __NR_rt_sigpending 136
410__SYSCALL(__NR_rt_sigpending, sys_rt_sigpending)
411#define __NR_rt_sigtimedwait 137
412__SC_COMP(__NR_rt_sigtimedwait, sys_rt_sigtimedwait, \
413 compat_sys_rt_sigtimedwait)
414#define __NR_rt_sigqueueinfo 138
415__SC_COMP(__NR_rt_sigqueueinfo, sys_rt_sigqueueinfo, \
416 compat_sys_rt_sigqueueinfo)
417#define __NR_rt_sigreturn 139
418__SC_COMP(__NR_rt_sigreturn, sys_rt_sigreturn, compat_sys_rt_sigreturn)
419
420/* kernel/sys.c */
421#define __NR_setpriority 140
422__SYSCALL(__NR_setpriority, sys_setpriority)
423#define __NR_getpriority 141
424__SYSCALL(__NR_getpriority, sys_getpriority)
425#define __NR_reboot 142
426__SYSCALL(__NR_reboot, sys_reboot)
427#define __NR_setregid 143
428__SYSCALL(__NR_setregid, sys_setregid)
429#define __NR_setgid 144
430__SYSCALL(__NR_setgid, sys_setgid)
431#define __NR_setreuid 145
432__SYSCALL(__NR_setreuid, sys_setreuid)
433#define __NR_setuid 146
434__SYSCALL(__NR_setuid, sys_setuid)
435#define __NR_setresuid 147
436__SYSCALL(__NR_setresuid, sys_setresuid)
437#define __NR_getresuid 148
438__SYSCALL(__NR_getresuid, sys_getresuid)
439#define __NR_setresgid 149
440__SYSCALL(__NR_setresgid, sys_setresgid)
441#define __NR_getresgid 150
442__SYSCALL(__NR_getresgid, sys_getresgid)
443#define __NR_setfsuid 151
444__SYSCALL(__NR_setfsuid, sys_setfsuid)
445#define __NR_setfsgid 152
446__SYSCALL(__NR_setfsgid, sys_setfsgid)
447#define __NR_times 153
448__SC_COMP(__NR_times, sys_times, compat_sys_times)
449#define __NR_setpgid 154
450__SYSCALL(__NR_setpgid, sys_setpgid)
451#define __NR_getpgid 155
452__SYSCALL(__NR_getpgid, sys_getpgid)
453#define __NR_getsid 156
454__SYSCALL(__NR_getsid, sys_getsid)
455#define __NR_setsid 157
456__SYSCALL(__NR_setsid, sys_setsid)
457#define __NR_getgroups 158
458__SYSCALL(__NR_getgroups, sys_getgroups)
459#define __NR_setgroups 159
460__SYSCALL(__NR_setgroups, sys_setgroups)
461#define __NR_uname 160
462__SYSCALL(__NR_uname, sys_newuname)
463#define __NR_sethostname 161
464__SYSCALL(__NR_sethostname, sys_sethostname)
465#define __NR_setdomainname 162
466__SYSCALL(__NR_setdomainname, sys_setdomainname)
467#define __NR_getrlimit 163
468__SC_COMP(__NR_getrlimit, sys_getrlimit, compat_sys_getrlimit)
469#define __NR_setrlimit 164
470__SC_COMP(__NR_setrlimit, sys_setrlimit, compat_sys_setrlimit)
471#define __NR_getrusage 165
472__SC_COMP(__NR_getrusage, sys_getrusage, compat_sys_getrusage)
473#define __NR_umask 166
474__SYSCALL(__NR_umask, sys_umask)
475#define __NR_prctl 167
476__SYSCALL(__NR_prctl, sys_prctl)
477#define __NR_getcpu 168
478__SYSCALL(__NR_getcpu, sys_getcpu)
479
480/* kernel/time.c */
481#define __NR_gettimeofday 169
482__SC_COMP(__NR_gettimeofday, sys_gettimeofday, compat_sys_gettimeofday)
483#define __NR_settimeofday 170
484__SC_COMP(__NR_settimeofday, sys_settimeofday, compat_sys_settimeofday)
485#define __NR_adjtimex 171
486__SC_COMP(__NR_adjtimex, sys_adjtimex, compat_sys_adjtimex)
487
488/* kernel/timer.c */
489#define __NR_getpid 172
490__SYSCALL(__NR_getpid, sys_getpid)
491#define __NR_getppid 173
492__SYSCALL(__NR_getppid, sys_getppid)
493#define __NR_getuid 174
494__SYSCALL(__NR_getuid, sys_getuid)
495#define __NR_geteuid 175
496__SYSCALL(__NR_geteuid, sys_geteuid)
497#define __NR_getgid 176
498__SYSCALL(__NR_getgid, sys_getgid)
499#define __NR_getegid 177
500__SYSCALL(__NR_getegid, sys_getegid)
501#define __NR_gettid 178
502__SYSCALL(__NR_gettid, sys_gettid)
503#define __NR_sysinfo 179
504__SC_COMP(__NR_sysinfo, sys_sysinfo, compat_sys_sysinfo)
505
506/* ipc/mqueue.c */
507#define __NR_mq_open 180
508__SC_COMP(__NR_mq_open, sys_mq_open, compat_sys_mq_open)
509#define __NR_mq_unlink 181
510__SYSCALL(__NR_mq_unlink, sys_mq_unlink)
511#define __NR_mq_timedsend 182
512__SC_COMP(__NR_mq_timedsend, sys_mq_timedsend, compat_sys_mq_timedsend)
513#define __NR_mq_timedreceive 183
514__SC_COMP(__NR_mq_timedreceive, sys_mq_timedreceive, \
515 compat_sys_mq_timedreceive)
516#define __NR_mq_notify 184
517__SC_COMP(__NR_mq_notify, sys_mq_notify, compat_sys_mq_notify)
518#define __NR_mq_getsetattr 185
519__SC_COMP(__NR_mq_getsetattr, sys_mq_getsetattr, compat_sys_mq_getsetattr)
520
521/* ipc/msg.c */
522#define __NR_msgget 186
523__SYSCALL(__NR_msgget, sys_msgget)
524#define __NR_msgctl 187
525__SC_COMP(__NR_msgctl, sys_msgctl, compat_sys_msgctl)
526#define __NR_msgrcv 188
527__SC_COMP(__NR_msgrcv, sys_msgrcv, compat_sys_msgrcv)
528#define __NR_msgsnd 189
529__SC_COMP(__NR_msgsnd, sys_msgsnd, compat_sys_msgsnd)
530
531/* ipc/sem.c */
532#define __NR_semget 190
533__SYSCALL(__NR_semget, sys_semget)
534#define __NR_semctl 191
535__SC_COMP(__NR_semctl, sys_semctl, compat_sys_semctl)
536#define __NR_semtimedop 192
537__SC_COMP(__NR_semtimedop, sys_semtimedop, compat_sys_semtimedop)
538#define __NR_semop 193
539__SYSCALL(__NR_semop, sys_semop)
540
541/* ipc/shm.c */
542#define __NR_shmget 194
543__SYSCALL(__NR_shmget, sys_shmget)
544#define __NR_shmctl 195
545__SC_COMP(__NR_shmctl, sys_shmctl, compat_sys_shmctl)
546#define __NR_shmat 196
547__SC_COMP(__NR_shmat, sys_shmat, compat_sys_shmat)
548#define __NR_shmdt 197
549__SYSCALL(__NR_shmdt, sys_shmdt)
550
551/* net/socket.c */
552#define __NR_socket 198
553__SYSCALL(__NR_socket, sys_socket)
554#define __NR_socketpair 199
555__SYSCALL(__NR_socketpair, sys_socketpair)
556#define __NR_bind 200
557__SYSCALL(__NR_bind, sys_bind)
558#define __NR_listen 201
559__SYSCALL(__NR_listen, sys_listen)
560#define __NR_accept 202
561__SYSCALL(__NR_accept, sys_accept)
562#define __NR_connect 203
563__SYSCALL(__NR_connect, sys_connect)
564#define __NR_getsockname 204
565__SYSCALL(__NR_getsockname, sys_getsockname)
566#define __NR_getpeername 205
567__SYSCALL(__NR_getpeername, sys_getpeername)
568#define __NR_sendto 206
569__SYSCALL(__NR_sendto, sys_sendto)
570#define __NR_recvfrom 207
571__SC_COMP(__NR_recvfrom, sys_recvfrom, compat_sys_recvfrom)
572#define __NR_setsockopt 208
573__SC_COMP(__NR_setsockopt, sys_setsockopt, compat_sys_setsockopt)
574#define __NR_getsockopt 209
575__SC_COMP(__NR_getsockopt, sys_getsockopt, compat_sys_getsockopt)
576#define __NR_shutdown 210
577__SYSCALL(__NR_shutdown, sys_shutdown)
578#define __NR_sendmsg 211
579__SC_COMP(__NR_sendmsg, sys_sendmsg, compat_sys_sendmsg)
580#define __NR_recvmsg 212
581__SC_COMP(__NR_recvmsg, sys_recvmsg, compat_sys_recvmsg)
582
583/* mm/filemap.c */
584#define __NR_readahead 213
585__SC_COMP(__NR_readahead, sys_readahead, compat_sys_readahead)
586
587/* mm/nommu.c, also with MMU */
588#define __NR_brk 214
589__SYSCALL(__NR_brk, sys_brk)
590#define __NR_munmap 215
591__SYSCALL(__NR_munmap, sys_munmap)
592#define __NR_mremap 216
593__SYSCALL(__NR_mremap, sys_mremap)
594
595/* security/keys/keyctl.c */
596#define __NR_add_key 217
597__SYSCALL(__NR_add_key, sys_add_key)
598#define __NR_request_key 218
599__SYSCALL(__NR_request_key, sys_request_key)
600#define __NR_keyctl 219
601__SC_COMP(__NR_keyctl, sys_keyctl, compat_sys_keyctl)
602
603/* arch/example/kernel/sys_example.c */
604#define __NR_clone 220
605__SYSCALL(__NR_clone, sys_clone)
606#define __NR_execve 221
607__SC_COMP(__NR_execve, sys_execve, compat_sys_execve)
608
609#define __NR3264_mmap 222
610__SC_3264(__NR3264_mmap, sys_mmap2, sys_mmap)
611/* mm/fadvise.c */
612#define __NR3264_fadvise64 223
613__SC_COMP(__NR3264_fadvise64, sys_fadvise64_64, compat_sys_fadvise64_64)
614
615/* mm/, CONFIG_MMU only */
616#ifndef __ARCH_NOMMU
617#define __NR_swapon 224
618__SYSCALL(__NR_swapon, sys_swapon)
619#define __NR_swapoff 225
620__SYSCALL(__NR_swapoff, sys_swapoff)
621#define __NR_mprotect 226
622__SYSCALL(__NR_mprotect, sys_mprotect)
623#define __NR_msync 227
624__SYSCALL(__NR_msync, sys_msync)
625#define __NR_mlock 228
626__SYSCALL(__NR_mlock, sys_mlock)
627#define __NR_munlock 229
628__SYSCALL(__NR_munlock, sys_munlock)
629#define __NR_mlockall 230
630__SYSCALL(__NR_mlockall, sys_mlockall)
631#define __NR_munlockall 231
632__SYSCALL(__NR_munlockall, sys_munlockall)
633#define __NR_mincore 232
634__SYSCALL(__NR_mincore, sys_mincore)
635#define __NR_madvise 233
636__SYSCALL(__NR_madvise, sys_madvise)
637#define __NR_remap_file_pages 234
638__SYSCALL(__NR_remap_file_pages, sys_remap_file_pages)
639#define __NR_mbind 235
640__SC_COMP(__NR_mbind, sys_mbind, compat_sys_mbind)
641#define __NR_get_mempolicy 236
642__SC_COMP(__NR_get_mempolicy, sys_get_mempolicy, compat_sys_get_mempolicy)
643#define __NR_set_mempolicy 237
644__SC_COMP(__NR_set_mempolicy, sys_set_mempolicy, compat_sys_set_mempolicy)
645#define __NR_migrate_pages 238
646__SC_COMP(__NR_migrate_pages, sys_migrate_pages, compat_sys_migrate_pages)
647#define __NR_move_pages 239
648__SC_COMP(__NR_move_pages, sys_move_pages, compat_sys_move_pages)
649#endif
650
651#define __NR_rt_tgsigqueueinfo 240
652__SC_COMP(__NR_rt_tgsigqueueinfo, sys_rt_tgsigqueueinfo, \
653 compat_sys_rt_tgsigqueueinfo)
654#define __NR_perf_event_open 241
655__SYSCALL(__NR_perf_event_open, sys_perf_event_open)
656#define __NR_accept4 242
657__SYSCALL(__NR_accept4, sys_accept4)
658#define __NR_recvmmsg 243
659__SC_COMP(__NR_recvmmsg, sys_recvmmsg, compat_sys_recvmmsg)
660
661/*
662 * Architectures may provide up to 16 syscalls of their own
663 * starting with this value.
664 */
665#define __NR_arch_specific_syscall 244
666
667#define __NR_wait4 260
668__SC_COMP(__NR_wait4, sys_wait4, compat_sys_wait4)
669#define __NR_prlimit64 261
670__SYSCALL(__NR_prlimit64, sys_prlimit64)
671#define __NR_fanotify_init 262
672__SYSCALL(__NR_fanotify_init, sys_fanotify_init)
673#define __NR_fanotify_mark 263
674__SYSCALL(__NR_fanotify_mark, sys_fanotify_mark)
675#define __NR_name_to_handle_at 264
676__SYSCALL(__NR_name_to_handle_at, sys_name_to_handle_at)
677#define __NR_open_by_handle_at 265
678__SC_COMP(__NR_open_by_handle_at, sys_open_by_handle_at, \
679 compat_sys_open_by_handle_at)
680#define __NR_clock_adjtime 266
681__SC_COMP(__NR_clock_adjtime, sys_clock_adjtime, compat_sys_clock_adjtime)
682#define __NR_syncfs 267
683__SYSCALL(__NR_syncfs, sys_syncfs)
684#define __NR_setns 268
685__SYSCALL(__NR_setns, sys_setns)
686#define __NR_sendmmsg 269
687__SC_COMP(__NR_sendmmsg, sys_sendmmsg, compat_sys_sendmmsg)
688#define __NR_process_vm_readv 270
689__SC_COMP(__NR_process_vm_readv, sys_process_vm_readv, \
690 compat_sys_process_vm_readv)
691#define __NR_process_vm_writev 271
692__SC_COMP(__NR_process_vm_writev, sys_process_vm_writev, \
693 compat_sys_process_vm_writev)
694
695#undef __NR_syscalls
696#define __NR_syscalls 272
697
698/*
699 * All syscalls below here should go away really,
700 * these are provided for both review and as a porting
701 * help for the C library version.
702*
703 * Last chance: are any of these important enough to
704 * enable by default?
705 */
706#ifdef __ARCH_WANT_SYSCALL_NO_AT
707#define __NR_open 1024
708__SYSCALL(__NR_open, sys_open)
709#define __NR_link 1025
710__SYSCALL(__NR_link, sys_link)
711#define __NR_unlink 1026
712__SYSCALL(__NR_unlink, sys_unlink)
713#define __NR_mknod 1027
714__SYSCALL(__NR_mknod, sys_mknod)
715#define __NR_chmod 1028
716__SYSCALL(__NR_chmod, sys_chmod)
717#define __NR_chown 1029
718__SYSCALL(__NR_chown, sys_chown)
719#define __NR_mkdir 1030
720__SYSCALL(__NR_mkdir, sys_mkdir)
721#define __NR_rmdir 1031
722__SYSCALL(__NR_rmdir, sys_rmdir)
723#define __NR_lchown 1032
724__SYSCALL(__NR_lchown, sys_lchown)
725#define __NR_access 1033
726__SYSCALL(__NR_access, sys_access)
727#define __NR_rename 1034
728__SYSCALL(__NR_rename, sys_rename)
729#define __NR_readlink 1035
730__SYSCALL(__NR_readlink, sys_readlink)
731#define __NR_symlink 1036
732__SYSCALL(__NR_symlink, sys_symlink)
733#define __NR_utimes 1037
734__SYSCALL(__NR_utimes, sys_utimes)
735#define __NR3264_stat 1038
736__SC_3264(__NR3264_stat, sys_stat64, sys_newstat)
737#define __NR3264_lstat 1039
738__SC_3264(__NR3264_lstat, sys_lstat64, sys_newlstat)
739
740#undef __NR_syscalls
741#define __NR_syscalls (__NR3264_lstat+1)
742#endif /* __ARCH_WANT_SYSCALL_NO_AT */
743
744#ifdef __ARCH_WANT_SYSCALL_NO_FLAGS
745#define __NR_pipe 1040
746__SYSCALL(__NR_pipe, sys_pipe)
747#define __NR_dup2 1041
748__SYSCALL(__NR_dup2, sys_dup2)
749#define __NR_epoll_create 1042
750__SYSCALL(__NR_epoll_create, sys_epoll_create)
751#define __NR_inotify_init 1043
752__SYSCALL(__NR_inotify_init, sys_inotify_init)
753#define __NR_eventfd 1044
754__SYSCALL(__NR_eventfd, sys_eventfd)
755#define __NR_signalfd 1045
756__SYSCALL(__NR_signalfd, sys_signalfd)
757
758#undef __NR_syscalls
759#define __NR_syscalls (__NR_signalfd+1)
760#endif /* __ARCH_WANT_SYSCALL_NO_FLAGS */
761
762#if (__BITS_PER_LONG == 32 || defined(__SYSCALL_COMPAT)) && \
763 defined(__ARCH_WANT_SYSCALL_OFF_T)
764#define __NR_sendfile 1046
765__SYSCALL(__NR_sendfile, sys_sendfile)
766#define __NR_ftruncate 1047
767__SYSCALL(__NR_ftruncate, sys_ftruncate)
768#define __NR_truncate 1048
769__SYSCALL(__NR_truncate, sys_truncate)
770#define __NR_stat 1049
771__SYSCALL(__NR_stat, sys_newstat)
772#define __NR_lstat 1050
773__SYSCALL(__NR_lstat, sys_newlstat)
774#define __NR_fstat 1051
775__SYSCALL(__NR_fstat, sys_newfstat)
776#define __NR_fcntl 1052
777__SYSCALL(__NR_fcntl, sys_fcntl)
778#define __NR_fadvise64 1053
779#define __ARCH_WANT_SYS_FADVISE64
780__SYSCALL(__NR_fadvise64, sys_fadvise64)
781#define __NR_newfstatat 1054
782#define __ARCH_WANT_SYS_NEWFSTATAT
783__SYSCALL(__NR_newfstatat, sys_newfstatat)
784#define __NR_fstatfs 1055
785__SYSCALL(__NR_fstatfs, sys_fstatfs)
786#define __NR_statfs 1056
787__SYSCALL(__NR_statfs, sys_statfs)
788#define __NR_lseek 1057
789__SYSCALL(__NR_lseek, sys_lseek)
790#define __NR_mmap 1058
791__SYSCALL(__NR_mmap, sys_mmap)
792
793#undef __NR_syscalls
794#define __NR_syscalls (__NR_mmap+1)
795#endif /* 32 bit off_t syscalls */
796
797#ifdef __ARCH_WANT_SYSCALL_DEPRECATED
798#define __NR_alarm 1059
799#define __ARCH_WANT_SYS_ALARM
800__SYSCALL(__NR_alarm, sys_alarm)
801#define __NR_getpgrp 1060
802#define __ARCH_WANT_SYS_GETPGRP
803__SYSCALL(__NR_getpgrp, sys_getpgrp)
804#define __NR_pause 1061
805#define __ARCH_WANT_SYS_PAUSE
806__SYSCALL(__NR_pause, sys_pause)
807#define __NR_time 1062
808#define __ARCH_WANT_SYS_TIME
809#define __ARCH_WANT_COMPAT_SYS_TIME
810__SYSCALL(__NR_time, sys_time)
811#define __NR_utime 1063
812#define __ARCH_WANT_SYS_UTIME
813__SYSCALL(__NR_utime, sys_utime)
814
815#define __NR_creat 1064
816__SYSCALL(__NR_creat, sys_creat)
817#define __NR_getdents 1065
818#define __ARCH_WANT_SYS_GETDENTS
819__SYSCALL(__NR_getdents, sys_getdents)
820#define __NR_futimesat 1066
821__SYSCALL(__NR_futimesat, sys_futimesat)
822#define __NR_select 1067
823#define __ARCH_WANT_SYS_SELECT
824__SYSCALL(__NR_select, sys_select)
825#define __NR_poll 1068
826__SYSCALL(__NR_poll, sys_poll)
827#define __NR_epoll_wait 1069
828__SYSCALL(__NR_epoll_wait, sys_epoll_wait)
829#define __NR_ustat 1070
830__SYSCALL(__NR_ustat, sys_ustat)
831#define __NR_vfork 1071
832__SYSCALL(__NR_vfork, sys_vfork)
833#define __NR_oldwait4 1072
834__SYSCALL(__NR_oldwait4, sys_wait4)
835#define __NR_recv 1073
836__SYSCALL(__NR_recv, sys_recv)
837#define __NR_send 1074
838__SYSCALL(__NR_send, sys_send)
839#define __NR_bdflush 1075
840__SYSCALL(__NR_bdflush, sys_bdflush)
841#define __NR_umount 1076
842__SYSCALL(__NR_umount, sys_oldumount)
843#define __ARCH_WANT_SYS_OLDUMOUNT
844#define __NR_uselib 1077
845__SYSCALL(__NR_uselib, sys_uselib)
846#define __NR__sysctl 1078
847__SYSCALL(__NR__sysctl, sys_sysctl)
848
849#define __NR_fork 1079
850#ifdef CONFIG_MMU
851__SYSCALL(__NR_fork, sys_fork)
852#else
853__SYSCALL(__NR_fork, sys_ni_syscall)
854#endif /* CONFIG_MMU */
855
856#undef __NR_syscalls
857#define __NR_syscalls (__NR_fork+1)
858
859#endif /* __ARCH_WANT_SYSCALL_DEPRECATED */
860
861/*
862 * 32 bit systems traditionally used different
863 * syscalls for off_t and loff_t arguments, while
864 * 64 bit systems only need the off_t version.
865 * For new 32 bit platforms, there is no need to
866 * implement the old 32 bit off_t syscalls, so
867 * they take different names.
868 * Here we map the numbers so that both versions
869 * use the same syscall table layout.
870 */
871#if __BITS_PER_LONG == 64 && !defined(__SYSCALL_COMPAT)
872#define __NR_fcntl __NR3264_fcntl
873#define __NR_statfs __NR3264_statfs
874#define __NR_fstatfs __NR3264_fstatfs
875#define __NR_truncate __NR3264_truncate
876#define __NR_ftruncate __NR3264_ftruncate
877#define __NR_lseek __NR3264_lseek
878#define __NR_sendfile __NR3264_sendfile
879#define __NR_newfstatat __NR3264_fstatat
880#define __NR_fstat __NR3264_fstat
881#define __NR_mmap __NR3264_mmap
882#define __NR_fadvise64 __NR3264_fadvise64
883#ifdef __NR3264_stat
884#define __NR_stat __NR3264_stat
885#define __NR_lstat __NR3264_lstat
886#endif
887#else
888#define __NR_fcntl64 __NR3264_fcntl
889#define __NR_statfs64 __NR3264_statfs
890#define __NR_fstatfs64 __NR3264_fstatfs
891#define __NR_truncate64 __NR3264_truncate
892#define __NR_ftruncate64 __NR3264_ftruncate
893#define __NR_llseek __NR3264_lseek
894#define __NR_sendfile64 __NR3264_sendfile
895#define __NR_fstatat64 __NR3264_fstatat
896#define __NR_fstat64 __NR3264_fstat
897#define __NR_mmap2 __NR3264_mmap
898#define __NR_fadvise64_64 __NR3264_fadvise64
899#ifdef __NR3264_stat
900#define __NR_stat64 __NR3264_stat
901#define __NR_lstat64 __NR3264_lstat
902#endif
903#endif
904
905#ifdef __KERNEL__
906 2
907/* 3/*
908 * These are required system calls, we should 4 * These are required system calls, we should
@@ -926,6 +22,3 @@ __SYSCALL(__NR_fork, sys_ni_syscall)
926#ifndef cond_syscall 22#ifndef cond_syscall
927#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall") 23#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall")
928#endif 24#endif
929
930#endif /* __KERNEL__ */
931#endif /* _ASM_GENERIC_UNISTD_H */
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index 4e2e1cc505ab..d1ea7ce0b4cb 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -530,9 +530,18 @@
530 *(.scommon) \ 530 *(.scommon) \
531 } 531 }
532 532
533/*
534 * Allow archectures to redefine BSS_FIRST_SECTIONS to add extra
535 * sections to the front of bss.
536 */
537#ifndef BSS_FIRST_SECTIONS
538#define BSS_FIRST_SECTIONS
539#endif
540
533#define BSS(bss_align) \ 541#define BSS(bss_align) \
534 . = ALIGN(bss_align); \ 542 . = ALIGN(bss_align); \
535 .bss : AT(ADDR(.bss) - LOAD_OFFSET) { \ 543 .bss : AT(ADDR(.bss) - LOAD_OFFSET) { \
544 BSS_FIRST_SECTIONS \
536 *(.bss..page_aligned) \ 545 *(.bss..page_aligned) \
537 *(.dynbss) \ 546 *(.dynbss) \
538 *(.bss) \ 547 *(.bss) \
diff --git a/include/asm-generic/xor.h b/include/asm-generic/xor.h
index 6028fb862254..b4d843225afd 100644
--- a/include/asm-generic/xor.h
+++ b/include/asm-generic/xor.h
@@ -693,7 +693,7 @@ static struct xor_block_template xor_block_32regs = {
693 .do_5 = xor_32regs_5, 693 .do_5 = xor_32regs_5,
694}; 694};
695 695
696static struct xor_block_template xor_block_8regs_p = { 696static struct xor_block_template xor_block_8regs_p __maybe_unused = {
697 .name = "8regs_prefetch", 697 .name = "8regs_prefetch",
698 .do_2 = xor_8regs_p_2, 698 .do_2 = xor_8regs_p_2,
699 .do_3 = xor_8regs_p_3, 699 .do_3 = xor_8regs_p_3,
@@ -701,7 +701,7 @@ static struct xor_block_template xor_block_8regs_p = {
701 .do_5 = xor_8regs_p_5, 701 .do_5 = xor_8regs_p_5,
702}; 702};
703 703
704static struct xor_block_template xor_block_32regs_p = { 704static struct xor_block_template xor_block_32regs_p __maybe_unused = {
705 .name = "32regs_prefetch", 705 .name = "32regs_prefetch",
706 .do_2 = xor_32regs_p_2, 706 .do_2 = xor_32regs_p_2,
707 .do_3 = xor_32regs_p_3, 707 .do_3 = xor_32regs_p_3,