diff options
74 files changed, 1844 insertions, 1730 deletions
diff --git a/arch/alpha/include/asm/Kbuild b/arch/alpha/include/asm/Kbuild index e423defed91e..d97d66334e6f 100644 --- a/arch/alpha/include/asm/Kbuild +++ b/arch/alpha/include/asm/Kbuild | |||
@@ -1,5 +1,7 @@ | |||
1 | include include/asm-generic/Kbuild.asm | 1 | include include/asm-generic/Kbuild.asm |
2 | 2 | ||
3 | generic-y += clkdev.h | ||
4 | |||
3 | header-y += compiler.h | 5 | header-y += compiler.h |
4 | header-y += console.h | 6 | header-y += console.h |
5 | header-y += fpu.h | 7 | header-y += fpu.h |
diff --git a/arch/avr32/include/asm/Kbuild b/arch/avr32/include/asm/Kbuild index 3136628ba8d2..e3ba7bca06fa 100644 --- a/arch/avr32/include/asm/Kbuild +++ b/arch/avr32/include/asm/Kbuild | |||
@@ -1,3 +1,5 @@ | |||
1 | include include/asm-generic/Kbuild.asm | 1 | include include/asm-generic/Kbuild.asm |
2 | 2 | ||
3 | generic-y += clkdev.h | ||
4 | |||
3 | header-y += cachectl.h | 5 | header-y += cachectl.h |
diff --git a/arch/cris/include/asm/Kbuild b/arch/cris/include/asm/Kbuild index 04d02a51c5e9..a8eab26a1ec7 100644 --- a/arch/cris/include/asm/Kbuild +++ b/arch/cris/include/asm/Kbuild | |||
@@ -7,3 +7,5 @@ header-y += ethernet.h | |||
7 | header-y += etraxgpio.h | 7 | header-y += etraxgpio.h |
8 | header-y += rs485.h | 8 | header-y += rs485.h |
9 | header-y += sync_serial.h | 9 | header-y += sync_serial.h |
10 | |||
11 | generic-y += clkdev.h | ||
diff --git a/arch/frv/include/asm/Kbuild b/arch/frv/include/asm/Kbuild index 5be6663cfee5..13cd044aabdf 100644 --- a/arch/frv/include/asm/Kbuild +++ b/arch/frv/include/asm/Kbuild | |||
@@ -2,3 +2,4 @@ include include/asm-generic/Kbuild.asm | |||
2 | 2 | ||
3 | header-y += registers.h | 3 | header-y += registers.h |
4 | header-y += termios.h | 4 | header-y += termios.h |
5 | generic-y += clkdev.h | ||
diff --git a/arch/h8300/include/asm/Kbuild b/arch/h8300/include/asm/Kbuild index c68e1680da01..0e152a93c125 100644 --- a/arch/h8300/include/asm/Kbuild +++ b/arch/h8300/include/asm/Kbuild | |||
@@ -1 +1,3 @@ | |||
1 | include include/asm-generic/Kbuild.asm | 1 | include include/asm-generic/Kbuild.asm |
2 | |||
3 | generic-y += clkdev.h | ||
diff --git a/arch/hexagon/include/asm/Kbuild b/arch/hexagon/include/asm/Kbuild index 06906427c0ac..3364b6966d26 100644 --- a/arch/hexagon/include/asm/Kbuild +++ b/arch/hexagon/include/asm/Kbuild | |||
@@ -7,6 +7,7 @@ header-y += user.h | |||
7 | generic-y += auxvec.h | 7 | generic-y += auxvec.h |
8 | generic-y += bug.h | 8 | generic-y += bug.h |
9 | generic-y += bugs.h | 9 | generic-y += bugs.h |
10 | generic-y += clkdev.h | ||
10 | generic-y += cputime.h | 11 | generic-y += cputime.h |
11 | generic-y += current.h | 12 | generic-y += current.h |
12 | generic-y += device.h | 13 | generic-y += device.h |
diff --git a/arch/ia64/include/asm/Kbuild b/arch/ia64/include/asm/Kbuild index d4eb9383f5f6..58f3d14a6cd4 100644 --- a/arch/ia64/include/asm/Kbuild +++ b/arch/ia64/include/asm/Kbuild | |||
@@ -13,3 +13,4 @@ header-y += ptrace_offsets.h | |||
13 | header-y += rse.h | 13 | header-y += rse.h |
14 | header-y += ucontext.h | 14 | header-y += ucontext.h |
15 | header-y += ustack.h | 15 | header-y += ustack.h |
16 | generic-y += clkdev.h | ||
diff --git a/arch/m32r/include/asm/Kbuild b/arch/m32r/include/asm/Kbuild index c68e1680da01..0e152a93c125 100644 --- a/arch/m32r/include/asm/Kbuild +++ b/arch/m32r/include/asm/Kbuild | |||
@@ -1 +1,3 @@ | |||
1 | include include/asm-generic/Kbuild.asm | 1 | include include/asm-generic/Kbuild.asm |
2 | |||
3 | generic-y += clkdev.h | ||
diff --git a/arch/m68k/include/asm/Kbuild b/arch/m68k/include/asm/Kbuild index a74e5d95c384..bfe675f0faee 100644 --- a/arch/m68k/include/asm/Kbuild +++ b/arch/m68k/include/asm/Kbuild | |||
@@ -2,6 +2,7 @@ include include/asm-generic/Kbuild.asm | |||
2 | header-y += cachectl.h | 2 | header-y += cachectl.h |
3 | 3 | ||
4 | generic-y += bitsperlong.h | 4 | generic-y += bitsperlong.h |
5 | generic-y += clkdev.h | ||
5 | generic-y += cputime.h | 6 | generic-y += cputime.h |
6 | generic-y += device.h | 7 | generic-y += device.h |
7 | generic-y += emergency-restart.h | 8 | generic-y += emergency-restart.h |
diff --git a/arch/microblaze/include/asm/Kbuild b/arch/microblaze/include/asm/Kbuild index db5294c30caf..48510f6cec8f 100644 --- a/arch/microblaze/include/asm/Kbuild +++ b/arch/microblaze/include/asm/Kbuild | |||
@@ -1,3 +1,4 @@ | |||
1 | include include/asm-generic/Kbuild.asm | 1 | include include/asm-generic/Kbuild.asm |
2 | 2 | ||
3 | header-y += elf.h | 3 | header-y += elf.h |
4 | generic-y += clkdev.h | ||
diff --git a/arch/mn10300/include/asm/Kbuild b/arch/mn10300/include/asm/Kbuild index c68e1680da01..0d20f5526dd8 100644 --- a/arch/mn10300/include/asm/Kbuild +++ b/arch/mn10300/include/asm/Kbuild | |||
@@ -1 +1,3 @@ | |||
1 | include include/asm-generic/Kbuild.asm | 1 | include include/asm-generic/Kbuild.asm |
2 | |||
3 | generic-y += clkdev.h | ||
diff --git a/arch/openrisc/include/asm/Kbuild b/arch/openrisc/include/asm/Kbuild index 0922959663a0..7140b6b26441 100644 --- a/arch/openrisc/include/asm/Kbuild +++ b/arch/openrisc/include/asm/Kbuild | |||
@@ -11,6 +11,7 @@ generic-y += bug.h | |||
11 | generic-y += bugs.h | 11 | generic-y += bugs.h |
12 | generic-y += cacheflush.h | 12 | generic-y += cacheflush.h |
13 | generic-y += checksum.h | 13 | generic-y += checksum.h |
14 | generic-y += clkdev.h | ||
14 | generic-y += cmpxchg.h | 15 | generic-y += cmpxchg.h |
15 | generic-y += cmpxchg-local.h | 16 | generic-y += cmpxchg-local.h |
16 | generic-y += cputime.h | 17 | generic-y += cputime.h |
diff --git a/arch/parisc/include/asm/Kbuild b/arch/parisc/include/asm/Kbuild index 4383707d9801..0587f62e5b76 100644 --- a/arch/parisc/include/asm/Kbuild +++ b/arch/parisc/include/asm/Kbuild | |||
@@ -1,4 +1,5 @@ | |||
1 | include include/asm-generic/Kbuild.asm | 1 | include include/asm-generic/Kbuild.asm |
2 | 2 | ||
3 | header-y += pdc.h | 3 | header-y += pdc.h |
4 | generic-y += clkdev.h | ||
4 | generic-y += word-at-a-time.h | 5 | generic-y += word-at-a-time.h |
diff --git a/arch/powerpc/include/asm/Kbuild b/arch/powerpc/include/asm/Kbuild index 7e313f1ed183..ace53dbde2cd 100644 --- a/arch/powerpc/include/asm/Kbuild +++ b/arch/powerpc/include/asm/Kbuild | |||
@@ -35,4 +35,5 @@ header-y += types.h | |||
35 | header-y += ucontext.h | 35 | header-y += ucontext.h |
36 | header-y += unistd.h | 36 | header-y += unistd.h |
37 | 37 | ||
38 | generic-y += clkdev.h | ||
38 | generic-y += rwsem.h | 39 | generic-y += rwsem.h |
diff --git a/arch/s390/include/asm/Kbuild b/arch/s390/include/asm/Kbuild index 287d7bbb6d36..f18fc796beef 100644 --- a/arch/s390/include/asm/Kbuild +++ b/arch/s390/include/asm/Kbuild | |||
@@ -13,3 +13,5 @@ header-y += tape390.h | |||
13 | header-y += ucontext.h | 13 | header-y += ucontext.h |
14 | header-y += vtoc.h | 14 | header-y += vtoc.h |
15 | header-y += zcrypt.h | 15 | header-y += zcrypt.h |
16 | |||
17 | generic-y += clkdev.h | ||
diff --git a/arch/score/include/asm/Kbuild b/arch/score/include/asm/Kbuild index b367abd4620f..ec697aeefd05 100644 --- a/arch/score/include/asm/Kbuild +++ b/arch/score/include/asm/Kbuild | |||
@@ -1,3 +1,5 @@ | |||
1 | include include/asm-generic/Kbuild.asm | 1 | include include/asm-generic/Kbuild.asm |
2 | 2 | ||
3 | header-y += | 3 | header-y += |
4 | |||
5 | generic-y += clkdev.h | ||
diff --git a/arch/sparc/include/asm/Kbuild b/arch/sparc/include/asm/Kbuild index 67f83e0a0d68..f80ff93f6f75 100644 --- a/arch/sparc/include/asm/Kbuild +++ b/arch/sparc/include/asm/Kbuild | |||
@@ -17,6 +17,7 @@ header-y += uctx.h | |||
17 | header-y += utrap.h | 17 | header-y += utrap.h |
18 | header-y += watchdog.h | 18 | header-y += watchdog.h |
19 | 19 | ||
20 | generic-y += clkdev.h | ||
20 | generic-y += div64.h | 21 | generic-y += div64.h |
21 | generic-y += local64.h | 22 | generic-y += local64.h |
22 | generic-y += irq_regs.h | 23 | generic-y += irq_regs.h |
diff --git a/arch/tile/include/asm/Kbuild b/arch/tile/include/asm/Kbuild index 5bd71994452d..ea2e8ea3eb61 100644 --- a/arch/tile/include/asm/Kbuild +++ b/arch/tile/include/asm/Kbuild | |||
@@ -8,6 +8,7 @@ header-y += hardwall.h | |||
8 | 8 | ||
9 | generic-y += bug.h | 9 | generic-y += bug.h |
10 | generic-y += bugs.h | 10 | generic-y += bugs.h |
11 | generic-y += clkdev.h | ||
11 | generic-y += cputime.h | 12 | generic-y += cputime.h |
12 | generic-y += div64.h | 13 | generic-y += div64.h |
13 | generic-y += emergency-restart.h | 14 | generic-y += emergency-restart.h |
diff --git a/arch/um/include/asm/Kbuild b/arch/um/include/asm/Kbuild index fff24352255d..0f6e7b328265 100644 --- a/arch/um/include/asm/Kbuild +++ b/arch/um/include/asm/Kbuild | |||
@@ -1,4 +1,4 @@ | |||
1 | generic-y += bug.h cputime.h device.h emergency-restart.h futex.h hardirq.h | 1 | generic-y += bug.h cputime.h device.h emergency-restart.h futex.h hardirq.h |
2 | generic-y += hw_irq.h irq_regs.h kdebug.h percpu.h sections.h topology.h xor.h | 2 | generic-y += hw_irq.h irq_regs.h kdebug.h percpu.h sections.h topology.h xor.h |
3 | generic-y += ftrace.h pci.h io.h param.h delay.h mutex.h current.h exec.h | 3 | generic-y += ftrace.h pci.h io.h param.h delay.h mutex.h current.h exec.h |
4 | generic-y += switch_to.h | 4 | generic-y += switch_to.h clkdev.h |
diff --git a/arch/unicore32/include/asm/Kbuild b/arch/unicore32/include/asm/Kbuild index 34b789b71115..123c59a06c14 100644 --- a/arch/unicore32/include/asm/Kbuild +++ b/arch/unicore32/include/asm/Kbuild | |||
@@ -4,6 +4,7 @@ generic-y += atomic.h | |||
4 | generic-y += auxvec.h | 4 | generic-y += auxvec.h |
5 | generic-y += bitsperlong.h | 5 | generic-y += bitsperlong.h |
6 | generic-y += bugs.h | 6 | generic-y += bugs.h |
7 | generic-y += clkdev.h | ||
7 | generic-y += cputime.h | 8 | generic-y += cputime.h |
8 | generic-y += current.h | 9 | generic-y += current.h |
9 | generic-y += device.h | 10 | generic-y += device.h |
diff --git a/arch/x86/include/asm/Kbuild b/arch/x86/include/asm/Kbuild index 1595d6813432..66e5f0ef0523 100644 --- a/arch/x86/include/asm/Kbuild +++ b/arch/x86/include/asm/Kbuild | |||
@@ -22,3 +22,9 @@ header-y += sigcontext32.h | |||
22 | header-y += ucontext.h | 22 | header-y += ucontext.h |
23 | header-y += vm86.h | 23 | header-y += vm86.h |
24 | header-y += vsyscall.h | 24 | header-y += vsyscall.h |
25 | |||
26 | genhdr-y += unistd_32.h | ||
27 | genhdr-y += unistd_64.h | ||
28 | genhdr-y += unistd_x32.h | ||
29 | |||
30 | generic-y += clkdev.h | ||
diff --git a/arch/xtensa/include/asm/Kbuild b/arch/xtensa/include/asm/Kbuild index c68e1680da01..0d20f5526dd8 100644 --- a/arch/xtensa/include/asm/Kbuild +++ b/arch/xtensa/include/asm/Kbuild | |||
@@ -1 +1,3 @@ | |||
1 | include include/asm-generic/Kbuild.asm | 1 | include include/asm-generic/Kbuild.asm |
2 | |||
3 | generic-y += clkdev.h | ||
diff --git a/include/asm-generic/Kbuild b/include/asm-generic/Kbuild index 2c85a0f647b7..e69de29bb2d1 100644 --- a/include/asm-generic/Kbuild +++ b/include/asm-generic/Kbuild | |||
@@ -1,35 +0,0 @@ | |||
1 | header-y += auxvec.h | ||
2 | header-y += bitsperlong.h | ||
3 | header-y += errno-base.h | ||
4 | header-y += errno.h | ||
5 | header-y += fcntl.h | ||
6 | header-y += int-l64.h | ||
7 | header-y += int-ll64.h | ||
8 | header-y += ioctl.h | ||
9 | header-y += ioctls.h | ||
10 | header-y += ipcbuf.h | ||
11 | header-y += kvm_para.h | ||
12 | header-y += mman-common.h | ||
13 | header-y += mman.h | ||
14 | header-y += msgbuf.h | ||
15 | header-y += param.h | ||
16 | header-y += poll.h | ||
17 | header-y += posix_types.h | ||
18 | header-y += resource.h | ||
19 | header-y += sembuf.h | ||
20 | header-y += setup.h | ||
21 | header-y += shmbuf.h | ||
22 | header-y += shmparam.h | ||
23 | header-y += siginfo.h | ||
24 | header-y += signal-defs.h | ||
25 | header-y += signal.h | ||
26 | header-y += socket.h | ||
27 | header-y += sockios.h | ||
28 | header-y += stat.h | ||
29 | header-y += statfs.h | ||
30 | header-y += swab.h | ||
31 | header-y += termbits.h | ||
32 | header-y += termios.h | ||
33 | header-y += types.h | ||
34 | header-y += ucontext.h | ||
35 | header-y += unistd.h | ||
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 | |||
18 | struct clk; | ||
19 | |||
20 | static inline int __clk_get(struct clk *clk) { return 1; } | ||
21 | static inline void __clk_put(struct clk *clk) { } | ||
22 | |||
23 | static 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/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 | |||
19 | typedef __signed__ char __s8; | ||
20 | typedef unsigned char __u8; | ||
21 | 11 | ||
22 | typedef __signed__ short __s16; | ||
23 | typedef unsigned short __u16; | ||
24 | |||
25 | typedef __signed__ int __s32; | ||
26 | typedef unsigned int __u32; | ||
27 | |||
28 | typedef __signed__ long __s64; | ||
29 | typedef 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 | |||
19 | typedef __signed__ char __s8; | ||
20 | typedef unsigned char __u8; | ||
21 | 11 | ||
22 | typedef __signed__ short __s16; | ||
23 | typedef unsigned short __u16; | ||
24 | |||
25 | typedef __signed__ int __s32; | ||
26 | typedef unsigned int __u32; | ||
27 | |||
28 | #ifdef __GNUC__ | ||
29 | __extension__ typedef __signed__ long long __s64; | ||
30 | __extension__ typedef unsigned long long __u64; | ||
31 | #else | ||
32 | typedef __signed__ long long __s64; | ||
33 | typedef 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 */ |
73 | extern unsigned int __invalid_size_argument_for_IOC; | 7 | extern 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/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/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/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/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 | ||
7 | typedef 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 | |||
48 | typedef 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 | |||
289 | typedef 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 | ||
310 | struct siginfo; | 17 | struct siginfo; |
311 | void do_schedule_next_timer(struct siginfo *info); | 18 | void do_schedule_next_timer(struct siginfo *info); |
@@ -327,6 +34,4 @@ static inline void copy_siginfo(struct siginfo *to, struct siginfo *from) | |||
327 | 34 | ||
328 | extern int copy_siginfo_to_user(struct siginfo __user *to, struct siginfo *from); | 35 | extern 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.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__ |
93 | typedef struct { | ||
94 | unsigned long sig[_NSIG_WORDS]; | ||
95 | } sigset_t; | ||
96 | |||
97 | /* not actually used, but required for linux/syscalls.h */ | ||
98 | typedef unsigned long old_sigset_t; | ||
99 | |||
100 | #include <asm-generic/signal-defs.h> | ||
101 | |||
102 | struct 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 | |||
111 | struct k_sigaction { | ||
112 | struct sigaction sa; | ||
113 | }; | ||
114 | |||
115 | typedef 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/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__ | ||
7 | typedef __kernel_fsid_t fsid_t; | 6 | typedef __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 | |||
25 | struct 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 | |||
48 | struct 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 | |||
71 | struct 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/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 | |||
14 | struct 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 | ||
22 | struct 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/unistd.h b/include/asm-generic/unistd.h index cf22fae8cae1..a36991ab334e 100644 --- a/include/asm-generic/unistd.h +++ b/include/asm-generic/unistd.h | |||
@@ -1,907 +1,4 @@ | |||
1 | #include <asm/bitsperlong.h> | 1 | #include <uapi/asm-generic/unistd.h> |
2 | |||
3 | /* | ||
4 | * This file contains the system call numbers, based on the | ||
5 | * layout of the x86-64 architecture, which embeds the | ||
6 | * pointer to the syscall in the table. | ||
7 | * | ||
8 | * As a basic principle, no duplication of functionality | ||
9 | * should be added, e.g. we don't use lseek when llseek | ||
10 | * is present. New architectures should use this file | ||
11 | * and implement the less feature-full calls in user space. | ||
12 | */ | ||
13 | |||
14 | #ifndef __SYSCALL | ||
15 | #define __SYSCALL(x, y) | ||
16 | #endif | ||
17 | |||
18 | #if __BITS_PER_LONG == 32 || defined(__SYSCALL_COMPAT) | ||
19 | #define __SC_3264(_nr, _32, _64) __SYSCALL(_nr, _32) | ||
20 | #else | ||
21 | #define __SC_3264(_nr, _32, _64) __SYSCALL(_nr, _64) | ||
22 | #endif | ||
23 | |||
24 | #ifdef __SYSCALL_COMPAT | ||
25 | #define __SC_COMP(_nr, _sys, _comp) __SYSCALL(_nr, _comp) | ||
26 | #define __SC_COMP_3264(_nr, _32, _64, _comp) __SYSCALL(_nr, _comp) | ||
27 | #else | ||
28 | #define __SC_COMP(_nr, _sys, _comp) __SYSCALL(_nr, _sys) | ||
29 | #define __SC_COMP_3264(_nr, _32, _64, _comp) __SC_3264(_nr, _32, _64) | ||
30 | #endif | ||
31 | |||
32 | #define __NR_io_setup 0 | ||
33 | __SC_COMP(__NR_io_setup, sys_io_setup, compat_sys_io_setup) | ||
34 | #define __NR_io_destroy 1 | ||
35 | __SYSCALL(__NR_io_destroy, sys_io_destroy) | ||
36 | #define __NR_io_submit 2 | ||
37 | __SC_COMP(__NR_io_submit, sys_io_submit, compat_sys_io_submit) | ||
38 | #define __NR_io_cancel 3 | ||
39 | __SYSCALL(__NR_io_cancel, sys_io_cancel) | ||
40 | #define __NR_io_getevents 4 | ||
41 | __SC_COMP(__NR_io_getevents, sys_io_getevents, compat_sys_io_getevents) | ||
42 | |||
43 | /* fs/xattr.c */ | ||
44 | #define __NR_setxattr 5 | ||
45 | __SYSCALL(__NR_setxattr, sys_setxattr) | ||
46 | #define __NR_lsetxattr 6 | ||
47 | __SYSCALL(__NR_lsetxattr, sys_lsetxattr) | ||
48 | #define __NR_fsetxattr 7 | ||
49 | __SYSCALL(__NR_fsetxattr, sys_fsetxattr) | ||
50 | #define __NR_getxattr 8 | ||
51 | __SYSCALL(__NR_getxattr, sys_getxattr) | ||
52 | #define __NR_lgetxattr 9 | ||
53 | __SYSCALL(__NR_lgetxattr, sys_lgetxattr) | ||
54 | #define __NR_fgetxattr 10 | ||
55 | __SYSCALL(__NR_fgetxattr, sys_fgetxattr) | ||
56 | #define __NR_listxattr 11 | ||
57 | __SYSCALL(__NR_listxattr, sys_listxattr) | ||
58 | #define __NR_llistxattr 12 | ||
59 | __SYSCALL(__NR_llistxattr, sys_llistxattr) | ||
60 | #define __NR_flistxattr 13 | ||
61 | __SYSCALL(__NR_flistxattr, sys_flistxattr) | ||
62 | #define __NR_removexattr 14 | ||
63 | __SYSCALL(__NR_removexattr, sys_removexattr) | ||
64 | #define __NR_lremovexattr 15 | ||
65 | __SYSCALL(__NR_lremovexattr, sys_lremovexattr) | ||
66 | #define __NR_fremovexattr 16 | ||
67 | __SYSCALL(__NR_fremovexattr, sys_fremovexattr) | ||
68 | |||
69 | /* fs/dcache.c */ | ||
70 | #define __NR_getcwd 17 | ||
71 | __SYSCALL(__NR_getcwd, sys_getcwd) | ||
72 | |||
73 | /* fs/cookies.c */ | ||
74 | #define __NR_lookup_dcookie 18 | ||
75 | __SC_COMP(__NR_lookup_dcookie, sys_lookup_dcookie, compat_sys_lookup_dcookie) | ||
76 | |||
77 | /* fs/eventfd.c */ | ||
78 | #define __NR_eventfd2 19 | ||
79 | __SYSCALL(__NR_eventfd2, sys_eventfd2) | ||
80 | |||
81 | /* fs/eventpoll.c */ | ||
82 | #define __NR_epoll_create1 20 | ||
83 | __SYSCALL(__NR_epoll_create1, sys_epoll_create1) | ||
84 | #define __NR_epoll_ctl 21 | ||
85 | __SYSCALL(__NR_epoll_ctl, sys_epoll_ctl) | ||
86 | #define __NR_epoll_pwait 22 | ||
87 | __SC_COMP(__NR_epoll_pwait, sys_epoll_pwait, compat_sys_epoll_pwait) | ||
88 | |||
89 | /* fs/fcntl.c */ | ||
90 | #define __NR_dup 23 | ||
91 | __SYSCALL(__NR_dup, sys_dup) | ||
92 | #define __NR_dup3 24 | ||
93 | __SYSCALL(__NR_dup3, sys_dup3) | ||
94 | #define __NR3264_fcntl 25 | ||
95 | __SC_COMP_3264(__NR3264_fcntl, sys_fcntl64, sys_fcntl, compat_sys_fcntl64) | ||
96 | |||
97 | /* fs/inotify_user.c */ | ||
98 | #define __NR_inotify_init1 26 | ||
99 | __SYSCALL(__NR_inotify_init1, sys_inotify_init1) | ||
100 | #define __NR_inotify_add_watch 27 | ||
101 | __SYSCALL(__NR_inotify_add_watch, sys_inotify_add_watch) | ||
102 | #define __NR_inotify_rm_watch 28 | ||
103 | __SYSCALL(__NR_inotify_rm_watch, sys_inotify_rm_watch) | ||
104 | |||
105 | /* fs/ioctl.c */ | ||
106 | #define __NR_ioctl 29 | ||
107 | __SC_COMP(__NR_ioctl, sys_ioctl, compat_sys_ioctl) | ||
108 | |||
109 | /* fs/ioprio.c */ | ||
110 | #define __NR_ioprio_set 30 | ||
111 | __SYSCALL(__NR_ioprio_set, sys_ioprio_set) | ||
112 | #define __NR_ioprio_get 31 | ||
113 | __SYSCALL(__NR_ioprio_get, sys_ioprio_get) | ||
114 | |||
115 | /* fs/locks.c */ | ||
116 | #define __NR_flock 32 | ||
117 | __SYSCALL(__NR_flock, sys_flock) | ||
118 | |||
119 | /* fs/namei.c */ | ||
120 | #define __NR_mknodat 33 | ||
121 | __SYSCALL(__NR_mknodat, sys_mknodat) | ||
122 | #define __NR_mkdirat 34 | ||
123 | __SYSCALL(__NR_mkdirat, sys_mkdirat) | ||
124 | #define __NR_unlinkat 35 | ||
125 | __SYSCALL(__NR_unlinkat, sys_unlinkat) | ||
126 | #define __NR_symlinkat 36 | ||
127 | __SYSCALL(__NR_symlinkat, sys_symlinkat) | ||
128 | #define __NR_linkat 37 | ||
129 | __SYSCALL(__NR_linkat, sys_linkat) | ||
130 | #define __NR_renameat 38 | ||
131 | __SYSCALL(__NR_renameat, sys_renameat) | ||
132 | |||
133 | /* fs/namespace.c */ | ||
134 | #define __NR_umount2 39 | ||
135 | __SYSCALL(__NR_umount2, sys_umount) | ||
136 | #define __NR_mount 40 | ||
137 | __SC_COMP(__NR_mount, sys_mount, compat_sys_mount) | ||
138 | #define __NR_pivot_root 41 | ||
139 | __SYSCALL(__NR_pivot_root, sys_pivot_root) | ||
140 | |||
141 | /* fs/nfsctl.c */ | ||
142 | #define __NR_nfsservctl 42 | ||
143 | __SYSCALL(__NR_nfsservctl, sys_ni_syscall) | ||
144 | |||
145 | /* fs/open.c */ | ||
146 | #define __NR3264_statfs 43 | ||
147 | __SC_COMP_3264(__NR3264_statfs, sys_statfs64, sys_statfs, \ | ||
148 | compat_sys_statfs64) | ||
149 | #define __NR3264_fstatfs 44 | ||
150 | __SC_COMP_3264(__NR3264_fstatfs, sys_fstatfs64, sys_fstatfs, \ | ||
151 | compat_sys_fstatfs64) | ||
152 | #define __NR3264_truncate 45 | ||
153 | __SC_COMP_3264(__NR3264_truncate, sys_truncate64, sys_truncate, \ | ||
154 | compat_sys_truncate64) | ||
155 | #define __NR3264_ftruncate 46 | ||
156 | __SC_COMP_3264(__NR3264_ftruncate, sys_ftruncate64, sys_ftruncate, \ | ||
157 | compat_sys_ftruncate64) | ||
158 | |||
159 | #define __NR_fallocate 47 | ||
160 | __SC_COMP(__NR_fallocate, sys_fallocate, compat_sys_fallocate) | ||
161 | #define __NR_faccessat 48 | ||
162 | __SYSCALL(__NR_faccessat, sys_faccessat) | ||
163 | #define __NR_chdir 49 | ||
164 | __SYSCALL(__NR_chdir, sys_chdir) | ||
165 | #define __NR_fchdir 50 | ||
166 | __SYSCALL(__NR_fchdir, sys_fchdir) | ||
167 | #define __NR_chroot 51 | ||
168 | __SYSCALL(__NR_chroot, sys_chroot) | ||
169 | #define __NR_fchmod 52 | ||
170 | __SYSCALL(__NR_fchmod, sys_fchmod) | ||
171 | #define __NR_fchmodat 53 | ||
172 | __SYSCALL(__NR_fchmodat, sys_fchmodat) | ||
173 | #define __NR_fchownat 54 | ||
174 | __SYSCALL(__NR_fchownat, sys_fchownat) | ||
175 | #define __NR_fchown 55 | ||
176 | __SYSCALL(__NR_fchown, sys_fchown) | ||
177 | #define __NR_openat 56 | ||
178 | __SC_COMP(__NR_openat, sys_openat, compat_sys_openat) | ||
179 | #define __NR_close 57 | ||
180 | __SYSCALL(__NR_close, sys_close) | ||
181 | #define __NR_vhangup 58 | ||
182 | __SYSCALL(__NR_vhangup, sys_vhangup) | ||
183 | |||
184 | /* fs/pipe.c */ | ||
185 | #define __NR_pipe2 59 | ||
186 | __SYSCALL(__NR_pipe2, sys_pipe2) | ||
187 | |||
188 | /* fs/quota.c */ | ||
189 | #define __NR_quotactl 60 | ||
190 | __SYSCALL(__NR_quotactl, sys_quotactl) | ||
191 | |||
192 | /* fs/readdir.c */ | ||
193 | #define __NR_getdents64 61 | ||
194 | __SC_COMP(__NR_getdents64, sys_getdents64, compat_sys_getdents64) | ||
195 | |||
196 | /* fs/read_write.c */ | ||
197 | #define __NR3264_lseek 62 | ||
198 | __SC_3264(__NR3264_lseek, sys_llseek, sys_lseek) | ||
199 | #define __NR_read 63 | ||
200 | __SYSCALL(__NR_read, sys_read) | ||
201 | #define __NR_write 64 | ||
202 | __SYSCALL(__NR_write, sys_write) | ||
203 | #define __NR_readv 65 | ||
204 | __SC_COMP(__NR_readv, sys_readv, compat_sys_readv) | ||
205 | #define __NR_writev 66 | ||
206 | __SC_COMP(__NR_writev, sys_writev, compat_sys_writev) | ||
207 | #define __NR_pread64 67 | ||
208 | __SC_COMP(__NR_pread64, sys_pread64, compat_sys_pread64) | ||
209 | #define __NR_pwrite64 68 | ||
210 | __SC_COMP(__NR_pwrite64, sys_pwrite64, compat_sys_pwrite64) | ||
211 | #define __NR_preadv 69 | ||
212 | __SC_COMP(__NR_preadv, sys_preadv, compat_sys_preadv) | ||
213 | #define __NR_pwritev 70 | ||
214 | __SC_COMP(__NR_pwritev, sys_pwritev, compat_sys_pwritev) | ||
215 | |||
216 | /* fs/sendfile.c */ | ||
217 | #define __NR3264_sendfile 71 | ||
218 | __SYSCALL(__NR3264_sendfile, sys_sendfile64) | ||
219 | |||
220 | /* fs/select.c */ | ||
221 | #define __NR_pselect6 72 | ||
222 | __SC_COMP(__NR_pselect6, sys_pselect6, compat_sys_pselect6) | ||
223 | #define __NR_ppoll 73 | ||
224 | __SC_COMP(__NR_ppoll, sys_ppoll, compat_sys_ppoll) | ||
225 | |||
226 | /* fs/signalfd.c */ | ||
227 | #define __NR_signalfd4 74 | ||
228 | __SC_COMP(__NR_signalfd4, sys_signalfd4, compat_sys_signalfd4) | ||
229 | |||
230 | /* fs/splice.c */ | ||
231 | #define __NR_vmsplice 75 | ||
232 | __SC_COMP(__NR_vmsplice, sys_vmsplice, compat_sys_vmsplice) | ||
233 | #define __NR_splice 76 | ||
234 | __SYSCALL(__NR_splice, sys_splice) | ||
235 | #define __NR_tee 77 | ||
236 | __SYSCALL(__NR_tee, sys_tee) | ||
237 | |||
238 | /* fs/stat.c */ | ||
239 | #define __NR_readlinkat 78 | ||
240 | __SYSCALL(__NR_readlinkat, sys_readlinkat) | ||
241 | #define __NR3264_fstatat 79 | ||
242 | __SC_3264(__NR3264_fstatat, sys_fstatat64, sys_newfstatat) | ||
243 | #define __NR3264_fstat 80 | ||
244 | __SC_3264(__NR3264_fstat, sys_fstat64, sys_newfstat) | ||
245 | |||
246 | /* fs/sync.c */ | ||
247 | #define __NR_sync 81 | ||
248 | __SYSCALL(__NR_sync, sys_sync) | ||
249 | #define __NR_fsync 82 | ||
250 | __SYSCALL(__NR_fsync, sys_fsync) | ||
251 | #define __NR_fdatasync 83 | ||
252 | __SYSCALL(__NR_fdatasync, sys_fdatasync) | ||
253 | #ifdef __ARCH_WANT_SYNC_FILE_RANGE2 | ||
254 | #define __NR_sync_file_range2 84 | ||
255 | __SC_COMP(__NR_sync_file_range2, sys_sync_file_range2, \ | ||
256 | compat_sys_sync_file_range2) | ||
257 | #else | ||
258 | #define __NR_sync_file_range 84 | ||
259 | __SC_COMP(__NR_sync_file_range, sys_sync_file_range, \ | ||
260 | compat_sys_sync_file_range) | ||
261 | #endif | ||
262 | |||
263 | /* fs/timerfd.c */ | ||
264 | #define __NR_timerfd_create 85 | ||
265 | __SYSCALL(__NR_timerfd_create, sys_timerfd_create) | ||
266 | #define __NR_timerfd_settime 86 | ||
267 | __SC_COMP(__NR_timerfd_settime, sys_timerfd_settime, \ | ||
268 | compat_sys_timerfd_settime) | ||
269 | #define __NR_timerfd_gettime 87 | ||
270 | __SC_COMP(__NR_timerfd_gettime, sys_timerfd_gettime, \ | ||
271 | compat_sys_timerfd_gettime) | ||
272 | |||
273 | /* fs/utimes.c */ | ||
274 | #define __NR_utimensat 88 | ||
275 | __SC_COMP(__NR_utimensat, sys_utimensat, compat_sys_utimensat) | ||
276 | |||
277 | /* kernel/acct.c */ | ||
278 | #define __NR_acct 89 | ||
279 | __SYSCALL(__NR_acct, sys_acct) | ||
280 | |||
281 | /* kernel/capability.c */ | ||
282 | #define __NR_capget 90 | ||
283 | __SYSCALL(__NR_capget, sys_capget) | ||
284 | #define __NR_capset 91 | ||
285 | __SYSCALL(__NR_capset, sys_capset) | ||
286 | |||
287 | /* kernel/exec_domain.c */ | ||
288 | #define __NR_personality 92 | ||
289 | __SYSCALL(__NR_personality, sys_personality) | ||
290 | |||
291 | /* kernel/exit.c */ | ||
292 | #define __NR_exit 93 | ||
293 | __SYSCALL(__NR_exit, sys_exit) | ||
294 | #define __NR_exit_group 94 | ||
295 | __SYSCALL(__NR_exit_group, sys_exit_group) | ||
296 | #define __NR_waitid 95 | ||
297 | __SC_COMP(__NR_waitid, sys_waitid, compat_sys_waitid) | ||
298 | |||
299 | /* kernel/fork.c */ | ||
300 | #define __NR_set_tid_address 96 | ||
301 | __SYSCALL(__NR_set_tid_address, sys_set_tid_address) | ||
302 | #define __NR_unshare 97 | ||
303 | __SYSCALL(__NR_unshare, sys_unshare) | ||
304 | |||
305 | /* kernel/futex.c */ | ||
306 | #define __NR_futex 98 | ||
307 | __SC_COMP(__NR_futex, sys_futex, compat_sys_futex) | ||
308 | #define __NR_set_robust_list 99 | ||
309 | __SC_COMP(__NR_set_robust_list, sys_set_robust_list, \ | ||
310 | compat_sys_set_robust_list) | ||
311 | #define __NR_get_robust_list 100 | ||
312 | __SC_COMP(__NR_get_robust_list, sys_get_robust_list, \ | ||
313 | compat_sys_get_robust_list) | ||
314 | |||
315 | /* kernel/hrtimer.c */ | ||
316 | #define __NR_nanosleep 101 | ||
317 | __SC_COMP(__NR_nanosleep, sys_nanosleep, compat_sys_nanosleep) | ||
318 | |||
319 | /* kernel/itimer.c */ | ||
320 | #define __NR_getitimer 102 | ||
321 | __SC_COMP(__NR_getitimer, sys_getitimer, compat_sys_getitimer) | ||
322 | #define __NR_setitimer 103 | ||
323 | __SC_COMP(__NR_setitimer, sys_setitimer, compat_sys_setitimer) | ||
324 | |||
325 | /* kernel/kexec.c */ | ||
326 | #define __NR_kexec_load 104 | ||
327 | __SC_COMP(__NR_kexec_load, sys_kexec_load, compat_sys_kexec_load) | ||
328 | |||
329 | /* kernel/module.c */ | ||
330 | #define __NR_init_module 105 | ||
331 | __SYSCALL(__NR_init_module, sys_init_module) | ||
332 | #define __NR_delete_module 106 | ||
333 | __SYSCALL(__NR_delete_module, sys_delete_module) | ||
334 | |||
335 | /* kernel/posix-timers.c */ | ||
336 | #define __NR_timer_create 107 | ||
337 | __SC_COMP(__NR_timer_create, sys_timer_create, compat_sys_timer_create) | ||
338 | #define __NR_timer_gettime 108 | ||
339 | __SC_COMP(__NR_timer_gettime, sys_timer_gettime, compat_sys_timer_gettime) | ||
340 | #define __NR_timer_getoverrun 109 | ||
341 | __SYSCALL(__NR_timer_getoverrun, sys_timer_getoverrun) | ||
342 | #define __NR_timer_settime 110 | ||
343 | __SC_COMP(__NR_timer_settime, sys_timer_settime, compat_sys_timer_settime) | ||
344 | #define __NR_timer_delete 111 | ||
345 | __SYSCALL(__NR_timer_delete, sys_timer_delete) | ||
346 | #define __NR_clock_settime 112 | ||
347 | __SC_COMP(__NR_clock_settime, sys_clock_settime, compat_sys_clock_settime) | ||
348 | #define __NR_clock_gettime 113 | ||
349 | __SC_COMP(__NR_clock_gettime, sys_clock_gettime, compat_sys_clock_gettime) | ||
350 | #define __NR_clock_getres 114 | ||
351 | __SC_COMP(__NR_clock_getres, sys_clock_getres, compat_sys_clock_getres) | ||
352 | #define __NR_clock_nanosleep 115 | ||
353 | __SC_COMP(__NR_clock_nanosleep, sys_clock_nanosleep, \ | ||
354 | compat_sys_clock_nanosleep) | ||
355 | |||
356 | /* kernel/printk.c */ | ||
357 | #define __NR_syslog 116 | ||
358 | __SYSCALL(__NR_syslog, sys_syslog) | ||
359 | |||
360 | /* kernel/ptrace.c */ | ||
361 | #define __NR_ptrace 117 | ||
362 | __SYSCALL(__NR_ptrace, sys_ptrace) | ||
363 | |||
364 | /* kernel/sched.c */ | ||
365 | #define __NR_sched_setparam 118 | ||
366 | __SYSCALL(__NR_sched_setparam, sys_sched_setparam) | ||
367 | #define __NR_sched_setscheduler 119 | ||
368 | __SYSCALL(__NR_sched_setscheduler, sys_sched_setscheduler) | ||
369 | #define __NR_sched_getscheduler 120 | ||
370 | __SYSCALL(__NR_sched_getscheduler, sys_sched_getscheduler) | ||
371 | #define __NR_sched_getparam 121 | ||
372 | __SYSCALL(__NR_sched_getparam, sys_sched_getparam) | ||
373 | #define __NR_sched_setaffinity 122 | ||
374 | __SC_COMP(__NR_sched_setaffinity, sys_sched_setaffinity, \ | ||
375 | compat_sys_sched_setaffinity) | ||
376 | #define __NR_sched_getaffinity 123 | ||
377 | __SC_COMP(__NR_sched_getaffinity, sys_sched_getaffinity, \ | ||
378 | compat_sys_sched_getaffinity) | ||
379 | #define __NR_sched_yield 124 | ||
380 | __SYSCALL(__NR_sched_yield, sys_sched_yield) | ||
381 | #define __NR_sched_get_priority_max 125 | ||
382 | __SYSCALL(__NR_sched_get_priority_max, sys_sched_get_priority_max) | ||
383 | #define __NR_sched_get_priority_min 126 | ||
384 | __SYSCALL(__NR_sched_get_priority_min, sys_sched_get_priority_min) | ||
385 | #define __NR_sched_rr_get_interval 127 | ||
386 | __SC_COMP(__NR_sched_rr_get_interval, sys_sched_rr_get_interval, \ | ||
387 | compat_sys_sched_rr_get_interval) | ||
388 | |||
389 | /* kernel/signal.c */ | ||
390 | #define __NR_restart_syscall 128 | ||
391 | __SYSCALL(__NR_restart_syscall, sys_restart_syscall) | ||
392 | #define __NR_kill 129 | ||
393 | __SYSCALL(__NR_kill, sys_kill) | ||
394 | #define __NR_tkill 130 | ||
395 | __SYSCALL(__NR_tkill, sys_tkill) | ||
396 | #define __NR_tgkill 131 | ||
397 | __SYSCALL(__NR_tgkill, sys_tgkill) | ||
398 | #define __NR_sigaltstack 132 | ||
399 | __SC_COMP(__NR_sigaltstack, sys_sigaltstack, compat_sys_sigaltstack) | ||
400 | #define __NR_rt_sigsuspend 133 | ||
401 | __SC_COMP(__NR_rt_sigsuspend, sys_rt_sigsuspend, compat_sys_rt_sigsuspend) | ||
402 | #define __NR_rt_sigaction 134 | ||
403 | __SC_COMP(__NR_rt_sigaction, sys_rt_sigaction, compat_sys_rt_sigaction) | ||
404 | #define __NR_rt_sigprocmask 135 | ||
405 | __SYSCALL(__NR_rt_sigprocmask, sys_rt_sigprocmask) | ||
406 | #define __NR_rt_sigpending 136 | ||
407 | __SYSCALL(__NR_rt_sigpending, sys_rt_sigpending) | ||
408 | #define __NR_rt_sigtimedwait 137 | ||
409 | __SC_COMP(__NR_rt_sigtimedwait, sys_rt_sigtimedwait, \ | ||
410 | compat_sys_rt_sigtimedwait) | ||
411 | #define __NR_rt_sigqueueinfo 138 | ||
412 | __SC_COMP(__NR_rt_sigqueueinfo, sys_rt_sigqueueinfo, \ | ||
413 | compat_sys_rt_sigqueueinfo) | ||
414 | #define __NR_rt_sigreturn 139 | ||
415 | __SC_COMP(__NR_rt_sigreturn, sys_rt_sigreturn, compat_sys_rt_sigreturn) | ||
416 | |||
417 | /* kernel/sys.c */ | ||
418 | #define __NR_setpriority 140 | ||
419 | __SYSCALL(__NR_setpriority, sys_setpriority) | ||
420 | #define __NR_getpriority 141 | ||
421 | __SYSCALL(__NR_getpriority, sys_getpriority) | ||
422 | #define __NR_reboot 142 | ||
423 | __SYSCALL(__NR_reboot, sys_reboot) | ||
424 | #define __NR_setregid 143 | ||
425 | __SYSCALL(__NR_setregid, sys_setregid) | ||
426 | #define __NR_setgid 144 | ||
427 | __SYSCALL(__NR_setgid, sys_setgid) | ||
428 | #define __NR_setreuid 145 | ||
429 | __SYSCALL(__NR_setreuid, sys_setreuid) | ||
430 | #define __NR_setuid 146 | ||
431 | __SYSCALL(__NR_setuid, sys_setuid) | ||
432 | #define __NR_setresuid 147 | ||
433 | __SYSCALL(__NR_setresuid, sys_setresuid) | ||
434 | #define __NR_getresuid 148 | ||
435 | __SYSCALL(__NR_getresuid, sys_getresuid) | ||
436 | #define __NR_setresgid 149 | ||
437 | __SYSCALL(__NR_setresgid, sys_setresgid) | ||
438 | #define __NR_getresgid 150 | ||
439 | __SYSCALL(__NR_getresgid, sys_getresgid) | ||
440 | #define __NR_setfsuid 151 | ||
441 | __SYSCALL(__NR_setfsuid, sys_setfsuid) | ||
442 | #define __NR_setfsgid 152 | ||
443 | __SYSCALL(__NR_setfsgid, sys_setfsgid) | ||
444 | #define __NR_times 153 | ||
445 | __SC_COMP(__NR_times, sys_times, compat_sys_times) | ||
446 | #define __NR_setpgid 154 | ||
447 | __SYSCALL(__NR_setpgid, sys_setpgid) | ||
448 | #define __NR_getpgid 155 | ||
449 | __SYSCALL(__NR_getpgid, sys_getpgid) | ||
450 | #define __NR_getsid 156 | ||
451 | __SYSCALL(__NR_getsid, sys_getsid) | ||
452 | #define __NR_setsid 157 | ||
453 | __SYSCALL(__NR_setsid, sys_setsid) | ||
454 | #define __NR_getgroups 158 | ||
455 | __SYSCALL(__NR_getgroups, sys_getgroups) | ||
456 | #define __NR_setgroups 159 | ||
457 | __SYSCALL(__NR_setgroups, sys_setgroups) | ||
458 | #define __NR_uname 160 | ||
459 | __SYSCALL(__NR_uname, sys_newuname) | ||
460 | #define __NR_sethostname 161 | ||
461 | __SYSCALL(__NR_sethostname, sys_sethostname) | ||
462 | #define __NR_setdomainname 162 | ||
463 | __SYSCALL(__NR_setdomainname, sys_setdomainname) | ||
464 | #define __NR_getrlimit 163 | ||
465 | __SC_COMP(__NR_getrlimit, sys_getrlimit, compat_sys_getrlimit) | ||
466 | #define __NR_setrlimit 164 | ||
467 | __SC_COMP(__NR_setrlimit, sys_setrlimit, compat_sys_setrlimit) | ||
468 | #define __NR_getrusage 165 | ||
469 | __SC_COMP(__NR_getrusage, sys_getrusage, compat_sys_getrusage) | ||
470 | #define __NR_umask 166 | ||
471 | __SYSCALL(__NR_umask, sys_umask) | ||
472 | #define __NR_prctl 167 | ||
473 | __SYSCALL(__NR_prctl, sys_prctl) | ||
474 | #define __NR_getcpu 168 | ||
475 | __SYSCALL(__NR_getcpu, sys_getcpu) | ||
476 | |||
477 | /* kernel/time.c */ | ||
478 | #define __NR_gettimeofday 169 | ||
479 | __SC_COMP(__NR_gettimeofday, sys_gettimeofday, compat_sys_gettimeofday) | ||
480 | #define __NR_settimeofday 170 | ||
481 | __SC_COMP(__NR_settimeofday, sys_settimeofday, compat_sys_settimeofday) | ||
482 | #define __NR_adjtimex 171 | ||
483 | __SC_COMP(__NR_adjtimex, sys_adjtimex, compat_sys_adjtimex) | ||
484 | |||
485 | /* kernel/timer.c */ | ||
486 | #define __NR_getpid 172 | ||
487 | __SYSCALL(__NR_getpid, sys_getpid) | ||
488 | #define __NR_getppid 173 | ||
489 | __SYSCALL(__NR_getppid, sys_getppid) | ||
490 | #define __NR_getuid 174 | ||
491 | __SYSCALL(__NR_getuid, sys_getuid) | ||
492 | #define __NR_geteuid 175 | ||
493 | __SYSCALL(__NR_geteuid, sys_geteuid) | ||
494 | #define __NR_getgid 176 | ||
495 | __SYSCALL(__NR_getgid, sys_getgid) | ||
496 | #define __NR_getegid 177 | ||
497 | __SYSCALL(__NR_getegid, sys_getegid) | ||
498 | #define __NR_gettid 178 | ||
499 | __SYSCALL(__NR_gettid, sys_gettid) | ||
500 | #define __NR_sysinfo 179 | ||
501 | __SC_COMP(__NR_sysinfo, sys_sysinfo, compat_sys_sysinfo) | ||
502 | |||
503 | /* ipc/mqueue.c */ | ||
504 | #define __NR_mq_open 180 | ||
505 | __SC_COMP(__NR_mq_open, sys_mq_open, compat_sys_mq_open) | ||
506 | #define __NR_mq_unlink 181 | ||
507 | __SYSCALL(__NR_mq_unlink, sys_mq_unlink) | ||
508 | #define __NR_mq_timedsend 182 | ||
509 | __SC_COMP(__NR_mq_timedsend, sys_mq_timedsend, compat_sys_mq_timedsend) | ||
510 | #define __NR_mq_timedreceive 183 | ||
511 | __SC_COMP(__NR_mq_timedreceive, sys_mq_timedreceive, \ | ||
512 | compat_sys_mq_timedreceive) | ||
513 | #define __NR_mq_notify 184 | ||
514 | __SC_COMP(__NR_mq_notify, sys_mq_notify, compat_sys_mq_notify) | ||
515 | #define __NR_mq_getsetattr 185 | ||
516 | __SC_COMP(__NR_mq_getsetattr, sys_mq_getsetattr, compat_sys_mq_getsetattr) | ||
517 | |||
518 | /* ipc/msg.c */ | ||
519 | #define __NR_msgget 186 | ||
520 | __SYSCALL(__NR_msgget, sys_msgget) | ||
521 | #define __NR_msgctl 187 | ||
522 | __SC_COMP(__NR_msgctl, sys_msgctl, compat_sys_msgctl) | ||
523 | #define __NR_msgrcv 188 | ||
524 | __SC_COMP(__NR_msgrcv, sys_msgrcv, compat_sys_msgrcv) | ||
525 | #define __NR_msgsnd 189 | ||
526 | __SC_COMP(__NR_msgsnd, sys_msgsnd, compat_sys_msgsnd) | ||
527 | |||
528 | /* ipc/sem.c */ | ||
529 | #define __NR_semget 190 | ||
530 | __SYSCALL(__NR_semget, sys_semget) | ||
531 | #define __NR_semctl 191 | ||
532 | __SC_COMP(__NR_semctl, sys_semctl, compat_sys_semctl) | ||
533 | #define __NR_semtimedop 192 | ||
534 | __SC_COMP(__NR_semtimedop, sys_semtimedop, compat_sys_semtimedop) | ||
535 | #define __NR_semop 193 | ||
536 | __SYSCALL(__NR_semop, sys_semop) | ||
537 | |||
538 | /* ipc/shm.c */ | ||
539 | #define __NR_shmget 194 | ||
540 | __SYSCALL(__NR_shmget, sys_shmget) | ||
541 | #define __NR_shmctl 195 | ||
542 | __SC_COMP(__NR_shmctl, sys_shmctl, compat_sys_shmctl) | ||
543 | #define __NR_shmat 196 | ||
544 | __SC_COMP(__NR_shmat, sys_shmat, compat_sys_shmat) | ||
545 | #define __NR_shmdt 197 | ||
546 | __SYSCALL(__NR_shmdt, sys_shmdt) | ||
547 | |||
548 | /* net/socket.c */ | ||
549 | #define __NR_socket 198 | ||
550 | __SYSCALL(__NR_socket, sys_socket) | ||
551 | #define __NR_socketpair 199 | ||
552 | __SYSCALL(__NR_socketpair, sys_socketpair) | ||
553 | #define __NR_bind 200 | ||
554 | __SYSCALL(__NR_bind, sys_bind) | ||
555 | #define __NR_listen 201 | ||
556 | __SYSCALL(__NR_listen, sys_listen) | ||
557 | #define __NR_accept 202 | ||
558 | __SYSCALL(__NR_accept, sys_accept) | ||
559 | #define __NR_connect 203 | ||
560 | __SYSCALL(__NR_connect, sys_connect) | ||
561 | #define __NR_getsockname 204 | ||
562 | __SYSCALL(__NR_getsockname, sys_getsockname) | ||
563 | #define __NR_getpeername 205 | ||
564 | __SYSCALL(__NR_getpeername, sys_getpeername) | ||
565 | #define __NR_sendto 206 | ||
566 | __SYSCALL(__NR_sendto, sys_sendto) | ||
567 | #define __NR_recvfrom 207 | ||
568 | __SC_COMP(__NR_recvfrom, sys_recvfrom, compat_sys_recvfrom) | ||
569 | #define __NR_setsockopt 208 | ||
570 | __SC_COMP(__NR_setsockopt, sys_setsockopt, compat_sys_setsockopt) | ||
571 | #define __NR_getsockopt 209 | ||
572 | __SC_COMP(__NR_getsockopt, sys_getsockopt, compat_sys_getsockopt) | ||
573 | #define __NR_shutdown 210 | ||
574 | __SYSCALL(__NR_shutdown, sys_shutdown) | ||
575 | #define __NR_sendmsg 211 | ||
576 | __SC_COMP(__NR_sendmsg, sys_sendmsg, compat_sys_sendmsg) | ||
577 | #define __NR_recvmsg 212 | ||
578 | __SC_COMP(__NR_recvmsg, sys_recvmsg, compat_sys_recvmsg) | ||
579 | |||
580 | /* mm/filemap.c */ | ||
581 | #define __NR_readahead 213 | ||
582 | __SC_COMP(__NR_readahead, sys_readahead, compat_sys_readahead) | ||
583 | |||
584 | /* mm/nommu.c, also with MMU */ | ||
585 | #define __NR_brk 214 | ||
586 | __SYSCALL(__NR_brk, sys_brk) | ||
587 | #define __NR_munmap 215 | ||
588 | __SYSCALL(__NR_munmap, sys_munmap) | ||
589 | #define __NR_mremap 216 | ||
590 | __SYSCALL(__NR_mremap, sys_mremap) | ||
591 | |||
592 | /* security/keys/keyctl.c */ | ||
593 | #define __NR_add_key 217 | ||
594 | __SYSCALL(__NR_add_key, sys_add_key) | ||
595 | #define __NR_request_key 218 | ||
596 | __SYSCALL(__NR_request_key, sys_request_key) | ||
597 | #define __NR_keyctl 219 | ||
598 | __SC_COMP(__NR_keyctl, sys_keyctl, compat_sys_keyctl) | ||
599 | |||
600 | /* arch/example/kernel/sys_example.c */ | ||
601 | #define __NR_clone 220 | ||
602 | __SYSCALL(__NR_clone, sys_clone) | ||
603 | #define __NR_execve 221 | ||
604 | __SC_COMP(__NR_execve, sys_execve, compat_sys_execve) | ||
605 | |||
606 | #define __NR3264_mmap 222 | ||
607 | __SC_3264(__NR3264_mmap, sys_mmap2, sys_mmap) | ||
608 | /* mm/fadvise.c */ | ||
609 | #define __NR3264_fadvise64 223 | ||
610 | __SC_COMP(__NR3264_fadvise64, sys_fadvise64_64, compat_sys_fadvise64_64) | ||
611 | |||
612 | /* mm/, CONFIG_MMU only */ | ||
613 | #ifndef __ARCH_NOMMU | ||
614 | #define __NR_swapon 224 | ||
615 | __SYSCALL(__NR_swapon, sys_swapon) | ||
616 | #define __NR_swapoff 225 | ||
617 | __SYSCALL(__NR_swapoff, sys_swapoff) | ||
618 | #define __NR_mprotect 226 | ||
619 | __SYSCALL(__NR_mprotect, sys_mprotect) | ||
620 | #define __NR_msync 227 | ||
621 | __SYSCALL(__NR_msync, sys_msync) | ||
622 | #define __NR_mlock 228 | ||
623 | __SYSCALL(__NR_mlock, sys_mlock) | ||
624 | #define __NR_munlock 229 | ||
625 | __SYSCALL(__NR_munlock, sys_munlock) | ||
626 | #define __NR_mlockall 230 | ||
627 | __SYSCALL(__NR_mlockall, sys_mlockall) | ||
628 | #define __NR_munlockall 231 | ||
629 | __SYSCALL(__NR_munlockall, sys_munlockall) | ||
630 | #define __NR_mincore 232 | ||
631 | __SYSCALL(__NR_mincore, sys_mincore) | ||
632 | #define __NR_madvise 233 | ||
633 | __SYSCALL(__NR_madvise, sys_madvise) | ||
634 | #define __NR_remap_file_pages 234 | ||
635 | __SYSCALL(__NR_remap_file_pages, sys_remap_file_pages) | ||
636 | #define __NR_mbind 235 | ||
637 | __SC_COMP(__NR_mbind, sys_mbind, compat_sys_mbind) | ||
638 | #define __NR_get_mempolicy 236 | ||
639 | __SC_COMP(__NR_get_mempolicy, sys_get_mempolicy, compat_sys_get_mempolicy) | ||
640 | #define __NR_set_mempolicy 237 | ||
641 | __SC_COMP(__NR_set_mempolicy, sys_set_mempolicy, compat_sys_set_mempolicy) | ||
642 | #define __NR_migrate_pages 238 | ||
643 | __SC_COMP(__NR_migrate_pages, sys_migrate_pages, compat_sys_migrate_pages) | ||
644 | #define __NR_move_pages 239 | ||
645 | __SC_COMP(__NR_move_pages, sys_move_pages, compat_sys_move_pages) | ||
646 | #endif | ||
647 | |||
648 | #define __NR_rt_tgsigqueueinfo 240 | ||
649 | __SC_COMP(__NR_rt_tgsigqueueinfo, sys_rt_tgsigqueueinfo, \ | ||
650 | compat_sys_rt_tgsigqueueinfo) | ||
651 | #define __NR_perf_event_open 241 | ||
652 | __SYSCALL(__NR_perf_event_open, sys_perf_event_open) | ||
653 | #define __NR_accept4 242 | ||
654 | __SYSCALL(__NR_accept4, sys_accept4) | ||
655 | #define __NR_recvmmsg 243 | ||
656 | __SC_COMP(__NR_recvmmsg, sys_recvmmsg, compat_sys_recvmmsg) | ||
657 | |||
658 | /* | ||
659 | * Architectures may provide up to 16 syscalls of their own | ||
660 | * starting with this value. | ||
661 | */ | ||
662 | #define __NR_arch_specific_syscall 244 | ||
663 | |||
664 | #define __NR_wait4 260 | ||
665 | __SC_COMP(__NR_wait4, sys_wait4, compat_sys_wait4) | ||
666 | #define __NR_prlimit64 261 | ||
667 | __SYSCALL(__NR_prlimit64, sys_prlimit64) | ||
668 | #define __NR_fanotify_init 262 | ||
669 | __SYSCALL(__NR_fanotify_init, sys_fanotify_init) | ||
670 | #define __NR_fanotify_mark 263 | ||
671 | __SYSCALL(__NR_fanotify_mark, sys_fanotify_mark) | ||
672 | #define __NR_name_to_handle_at 264 | ||
673 | __SYSCALL(__NR_name_to_handle_at, sys_name_to_handle_at) | ||
674 | #define __NR_open_by_handle_at 265 | ||
675 | __SC_COMP(__NR_open_by_handle_at, sys_open_by_handle_at, \ | ||
676 | compat_sys_open_by_handle_at) | ||
677 | #define __NR_clock_adjtime 266 | ||
678 | __SC_COMP(__NR_clock_adjtime, sys_clock_adjtime, compat_sys_clock_adjtime) | ||
679 | #define __NR_syncfs 267 | ||
680 | __SYSCALL(__NR_syncfs, sys_syncfs) | ||
681 | #define __NR_setns 268 | ||
682 | __SYSCALL(__NR_setns, sys_setns) | ||
683 | #define __NR_sendmmsg 269 | ||
684 | __SC_COMP(__NR_sendmmsg, sys_sendmmsg, compat_sys_sendmmsg) | ||
685 | #define __NR_process_vm_readv 270 | ||
686 | __SC_COMP(__NR_process_vm_readv, sys_process_vm_readv, \ | ||
687 | compat_sys_process_vm_readv) | ||
688 | #define __NR_process_vm_writev 271 | ||
689 | __SC_COMP(__NR_process_vm_writev, sys_process_vm_writev, \ | ||
690 | compat_sys_process_vm_writev) | ||
691 | #define __NR_kcmp 272 | ||
692 | __SYSCALL(__NR_kcmp, sys_kcmp) | ||
693 | |||
694 | #undef __NR_syscalls | ||
695 | #define __NR_syscalls 273 | ||
696 | |||
697 | /* | ||
698 | * All syscalls below here should go away really, | ||
699 | * these are provided for both review and as a porting | ||
700 | * help for the C library version. | ||
701 | * | ||
702 | * Last chance: are any of these important enough to | ||
703 | * enable by default? | ||
704 | */ | ||
705 | #ifdef __ARCH_WANT_SYSCALL_NO_AT | ||
706 | #define __NR_open 1024 | ||
707 | __SYSCALL(__NR_open, sys_open) | ||
708 | #define __NR_link 1025 | ||
709 | __SYSCALL(__NR_link, sys_link) | ||
710 | #define __NR_unlink 1026 | ||
711 | __SYSCALL(__NR_unlink, sys_unlink) | ||
712 | #define __NR_mknod 1027 | ||
713 | __SYSCALL(__NR_mknod, sys_mknod) | ||
714 | #define __NR_chmod 1028 | ||
715 | __SYSCALL(__NR_chmod, sys_chmod) | ||
716 | #define __NR_chown 1029 | ||
717 | __SYSCALL(__NR_chown, sys_chown) | ||
718 | #define __NR_mkdir 1030 | ||
719 | __SYSCALL(__NR_mkdir, sys_mkdir) | ||
720 | #define __NR_rmdir 1031 | ||
721 | __SYSCALL(__NR_rmdir, sys_rmdir) | ||
722 | #define __NR_lchown 1032 | ||
723 | __SYSCALL(__NR_lchown, sys_lchown) | ||
724 | #define __NR_access 1033 | ||
725 | __SYSCALL(__NR_access, sys_access) | ||
726 | #define __NR_rename 1034 | ||
727 | __SYSCALL(__NR_rename, sys_rename) | ||
728 | #define __NR_readlink 1035 | ||
729 | __SYSCALL(__NR_readlink, sys_readlink) | ||
730 | #define __NR_symlink 1036 | ||
731 | __SYSCALL(__NR_symlink, sys_symlink) | ||
732 | #define __NR_utimes 1037 | ||
733 | __SYSCALL(__NR_utimes, sys_utimes) | ||
734 | #define __NR3264_stat 1038 | ||
735 | __SC_3264(__NR3264_stat, sys_stat64, sys_newstat) | ||
736 | #define __NR3264_lstat 1039 | ||
737 | __SC_3264(__NR3264_lstat, sys_lstat64, sys_newlstat) | ||
738 | |||
739 | #undef __NR_syscalls | ||
740 | #define __NR_syscalls (__NR3264_lstat+1) | ||
741 | #endif /* __ARCH_WANT_SYSCALL_NO_AT */ | ||
742 | |||
743 | #ifdef __ARCH_WANT_SYSCALL_NO_FLAGS | ||
744 | #define __NR_pipe 1040 | ||
745 | __SYSCALL(__NR_pipe, sys_pipe) | ||
746 | #define __NR_dup2 1041 | ||
747 | __SYSCALL(__NR_dup2, sys_dup2) | ||
748 | #define __NR_epoll_create 1042 | ||
749 | __SYSCALL(__NR_epoll_create, sys_epoll_create) | ||
750 | #define __NR_inotify_init 1043 | ||
751 | __SYSCALL(__NR_inotify_init, sys_inotify_init) | ||
752 | #define __NR_eventfd 1044 | ||
753 | __SYSCALL(__NR_eventfd, sys_eventfd) | ||
754 | #define __NR_signalfd 1045 | ||
755 | __SYSCALL(__NR_signalfd, sys_signalfd) | ||
756 | |||
757 | #undef __NR_syscalls | ||
758 | #define __NR_syscalls (__NR_signalfd+1) | ||
759 | #endif /* __ARCH_WANT_SYSCALL_NO_FLAGS */ | ||
760 | |||
761 | #if (__BITS_PER_LONG == 32 || defined(__SYSCALL_COMPAT)) && \ | ||
762 | defined(__ARCH_WANT_SYSCALL_OFF_T) | ||
763 | #define __NR_sendfile 1046 | ||
764 | __SYSCALL(__NR_sendfile, sys_sendfile) | ||
765 | #define __NR_ftruncate 1047 | ||
766 | __SYSCALL(__NR_ftruncate, sys_ftruncate) | ||
767 | #define __NR_truncate 1048 | ||
768 | __SYSCALL(__NR_truncate, sys_truncate) | ||
769 | #define __NR_stat 1049 | ||
770 | __SYSCALL(__NR_stat, sys_newstat) | ||
771 | #define __NR_lstat 1050 | ||
772 | __SYSCALL(__NR_lstat, sys_newlstat) | ||
773 | #define __NR_fstat 1051 | ||
774 | __SYSCALL(__NR_fstat, sys_newfstat) | ||
775 | #define __NR_fcntl 1052 | ||
776 | __SYSCALL(__NR_fcntl, sys_fcntl) | ||
777 | #define __NR_fadvise64 1053 | ||
778 | #define __ARCH_WANT_SYS_FADVISE64 | ||
779 | __SYSCALL(__NR_fadvise64, sys_fadvise64) | ||
780 | #define __NR_newfstatat 1054 | ||
781 | #define __ARCH_WANT_SYS_NEWFSTATAT | ||
782 | __SYSCALL(__NR_newfstatat, sys_newfstatat) | ||
783 | #define __NR_fstatfs 1055 | ||
784 | __SYSCALL(__NR_fstatfs, sys_fstatfs) | ||
785 | #define __NR_statfs 1056 | ||
786 | __SYSCALL(__NR_statfs, sys_statfs) | ||
787 | #define __NR_lseek 1057 | ||
788 | __SYSCALL(__NR_lseek, sys_lseek) | ||
789 | #define __NR_mmap 1058 | ||
790 | __SYSCALL(__NR_mmap, sys_mmap) | ||
791 | |||
792 | #undef __NR_syscalls | ||
793 | #define __NR_syscalls (__NR_mmap+1) | ||
794 | #endif /* 32 bit off_t syscalls */ | ||
795 | |||
796 | #ifdef __ARCH_WANT_SYSCALL_DEPRECATED | ||
797 | #define __NR_alarm 1059 | ||
798 | #define __ARCH_WANT_SYS_ALARM | ||
799 | __SYSCALL(__NR_alarm, sys_alarm) | ||
800 | #define __NR_getpgrp 1060 | ||
801 | #define __ARCH_WANT_SYS_GETPGRP | ||
802 | __SYSCALL(__NR_getpgrp, sys_getpgrp) | ||
803 | #define __NR_pause 1061 | ||
804 | #define __ARCH_WANT_SYS_PAUSE | ||
805 | __SYSCALL(__NR_pause, sys_pause) | ||
806 | #define __NR_time 1062 | ||
807 | #define __ARCH_WANT_SYS_TIME | ||
808 | #define __ARCH_WANT_COMPAT_SYS_TIME | ||
809 | __SYSCALL(__NR_time, sys_time) | ||
810 | #define __NR_utime 1063 | ||
811 | #define __ARCH_WANT_SYS_UTIME | ||
812 | __SYSCALL(__NR_utime, sys_utime) | ||
813 | |||
814 | #define __NR_creat 1064 | ||
815 | __SYSCALL(__NR_creat, sys_creat) | ||
816 | #define __NR_getdents 1065 | ||
817 | #define __ARCH_WANT_SYS_GETDENTS | ||
818 | __SYSCALL(__NR_getdents, sys_getdents) | ||
819 | #define __NR_futimesat 1066 | ||
820 | __SYSCALL(__NR_futimesat, sys_futimesat) | ||
821 | #define __NR_select 1067 | ||
822 | #define __ARCH_WANT_SYS_SELECT | ||
823 | __SYSCALL(__NR_select, sys_select) | ||
824 | #define __NR_poll 1068 | ||
825 | __SYSCALL(__NR_poll, sys_poll) | ||
826 | #define __NR_epoll_wait 1069 | ||
827 | __SYSCALL(__NR_epoll_wait, sys_epoll_wait) | ||
828 | #define __NR_ustat 1070 | ||
829 | __SYSCALL(__NR_ustat, sys_ustat) | ||
830 | #define __NR_vfork 1071 | ||
831 | __SYSCALL(__NR_vfork, sys_vfork) | ||
832 | #define __NR_oldwait4 1072 | ||
833 | __SYSCALL(__NR_oldwait4, sys_wait4) | ||
834 | #define __NR_recv 1073 | ||
835 | __SYSCALL(__NR_recv, sys_recv) | ||
836 | #define __NR_send 1074 | ||
837 | __SYSCALL(__NR_send, sys_send) | ||
838 | #define __NR_bdflush 1075 | ||
839 | __SYSCALL(__NR_bdflush, sys_bdflush) | ||
840 | #define __NR_umount 1076 | ||
841 | __SYSCALL(__NR_umount, sys_oldumount) | ||
842 | #define __ARCH_WANT_SYS_OLDUMOUNT | ||
843 | #define __NR_uselib 1077 | ||
844 | __SYSCALL(__NR_uselib, sys_uselib) | ||
845 | #define __NR__sysctl 1078 | ||
846 | __SYSCALL(__NR__sysctl, sys_sysctl) | ||
847 | |||
848 | #define __NR_fork 1079 | ||
849 | #ifdef CONFIG_MMU | ||
850 | __SYSCALL(__NR_fork, sys_fork) | ||
851 | #else | ||
852 | __SYSCALL(__NR_fork, sys_ni_syscall) | ||
853 | #endif /* CONFIG_MMU */ | ||
854 | |||
855 | #undef __NR_syscalls | ||
856 | #define __NR_syscalls (__NR_fork+1) | ||
857 | |||
858 | #endif /* __ARCH_WANT_SYSCALL_DEPRECATED */ | ||
859 | |||
860 | /* | ||
861 | * 32 bit systems traditionally used different | ||
862 | * syscalls for off_t and loff_t arguments, while | ||
863 | * 64 bit systems only need the off_t version. | ||
864 | * For new 32 bit platforms, there is no need to | ||
865 | * implement the old 32 bit off_t syscalls, so | ||
866 | * they take different names. | ||
867 | * Here we map the numbers so that both versions | ||
868 | * use the same syscall table layout. | ||
869 | */ | ||
870 | #if __BITS_PER_LONG == 64 && !defined(__SYSCALL_COMPAT) | ||
871 | #define __NR_fcntl __NR3264_fcntl | ||
872 | #define __NR_statfs __NR3264_statfs | ||
873 | #define __NR_fstatfs __NR3264_fstatfs | ||
874 | #define __NR_truncate __NR3264_truncate | ||
875 | #define __NR_ftruncate __NR3264_ftruncate | ||
876 | #define __NR_lseek __NR3264_lseek | ||
877 | #define __NR_sendfile __NR3264_sendfile | ||
878 | #define __NR_newfstatat __NR3264_fstatat | ||
879 | #define __NR_fstat __NR3264_fstat | ||
880 | #define __NR_mmap __NR3264_mmap | ||
881 | #define __NR_fadvise64 __NR3264_fadvise64 | ||
882 | #ifdef __NR3264_stat | ||
883 | #define __NR_stat __NR3264_stat | ||
884 | #define __NR_lstat __NR3264_lstat | ||
885 | #endif | ||
886 | #else | ||
887 | #define __NR_fcntl64 __NR3264_fcntl | ||
888 | #define __NR_statfs64 __NR3264_statfs | ||
889 | #define __NR_fstatfs64 __NR3264_fstatfs | ||
890 | #define __NR_truncate64 __NR3264_truncate | ||
891 | #define __NR_ftruncate64 __NR3264_ftruncate | ||
892 | #define __NR_llseek __NR3264_lseek | ||
893 | #define __NR_sendfile64 __NR3264_sendfile | ||
894 | #define __NR_fstatat64 __NR3264_fstatat | ||
895 | #define __NR_fstat64 __NR3264_fstat | ||
896 | #define __NR_mmap2 __NR3264_mmap | ||
897 | #define __NR_fadvise64_64 __NR3264_fadvise64 | ||
898 | #ifdef __NR3264_stat | ||
899 | #define __NR_stat64 __NR3264_stat | ||
900 | #define __NR_lstat64 __NR3264_lstat | ||
901 | #endif | ||
902 | #endif | ||
903 | |||
904 | #ifdef __KERNEL__ | ||
905 | 2 | ||
906 | /* | 3 | /* |
907 | * These are required system calls, we should | 4 | * These are required system calls, we should |
@@ -925,5 +22,3 @@ __SYSCALL(__NR_fork, sys_ni_syscall) | |||
925 | #ifndef cond_syscall | 22 | #ifndef cond_syscall |
926 | #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") |
927 | #endif | 24 | #endif |
928 | |||
929 | #endif /* __KERNEL__ */ | ||
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 | ||
696 | static struct xor_block_template xor_block_8regs_p = { | 696 | static 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 | ||
704 | static struct xor_block_template xor_block_32regs_p = { | 704 | static 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, |
diff --git a/include/uapi/asm-generic/Kbuild b/include/uapi/asm-generic/Kbuild index aafaa5aa54d4..b73de7bb7a62 100644 --- a/include/uapi/asm-generic/Kbuild +++ b/include/uapi/asm-generic/Kbuild | |||
@@ -1 +1,36 @@ | |||
1 | # UAPI Header export list | 1 | # UAPI Header export list |
2 | header-y += auxvec.h | ||
3 | header-y += bitsperlong.h | ||
4 | header-y += errno-base.h | ||
5 | header-y += errno.h | ||
6 | header-y += fcntl.h | ||
7 | header-y += int-l64.h | ||
8 | header-y += int-ll64.h | ||
9 | header-y += ioctl.h | ||
10 | header-y += ioctls.h | ||
11 | header-y += ipcbuf.h | ||
12 | header-y += kvm_para.h | ||
13 | header-y += mman-common.h | ||
14 | header-y += mman.h | ||
15 | header-y += msgbuf.h | ||
16 | header-y += param.h | ||
17 | header-y += poll.h | ||
18 | header-y += posix_types.h | ||
19 | header-y += resource.h | ||
20 | header-y += sembuf.h | ||
21 | header-y += setup.h | ||
22 | header-y += shmbuf.h | ||
23 | header-y += shmparam.h | ||
24 | header-y += siginfo.h | ||
25 | header-y += signal-defs.h | ||
26 | header-y += signal.h | ||
27 | header-y += socket.h | ||
28 | header-y += sockios.h | ||
29 | header-y += stat.h | ||
30 | header-y += statfs.h | ||
31 | header-y += swab.h | ||
32 | header-y += termbits.h | ||
33 | header-y += termios.h | ||
34 | header-y += types.h | ||
35 | header-y += ucontext.h | ||
36 | header-y += unistd.h | ||
diff --git a/include/asm-generic/auxvec.h b/include/uapi/asm-generic/auxvec.h index b99573b0ad12..b99573b0ad12 100644 --- a/include/asm-generic/auxvec.h +++ b/include/uapi/asm-generic/auxvec.h | |||
diff --git a/include/uapi/asm-generic/bitsperlong.h b/include/uapi/asm-generic/bitsperlong.h new file mode 100644 index 000000000000..23e6c416b85f --- /dev/null +++ b/include/uapi/asm-generic/bitsperlong.h | |||
@@ -0,0 +1,15 @@ | |||
1 | #ifndef _UAPI__ASM_GENERIC_BITS_PER_LONG | ||
2 | #define _UAPI__ASM_GENERIC_BITS_PER_LONG | ||
3 | |||
4 | /* | ||
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 | |||
15 | #endif /* _UAPI__ASM_GENERIC_BITS_PER_LONG */ | ||
diff --git a/include/asm-generic/errno-base.h b/include/uapi/asm-generic/errno-base.h index 65115978510f..65115978510f 100644 --- a/include/asm-generic/errno-base.h +++ b/include/uapi/asm-generic/errno-base.h | |||
diff --git a/include/asm-generic/errno.h b/include/uapi/asm-generic/errno.h index a1331ce50445..a1331ce50445 100644 --- a/include/asm-generic/errno.h +++ b/include/uapi/asm-generic/errno.h | |||
diff --git a/include/asm-generic/fcntl.h b/include/uapi/asm-generic/fcntl.h index a48937d4a5ea..a48937d4a5ea 100644 --- a/include/asm-generic/fcntl.h +++ b/include/uapi/asm-generic/fcntl.h | |||
diff --git a/include/uapi/asm-generic/int-l64.h b/include/uapi/asm-generic/int-l64.h new file mode 100644 index 000000000000..978f21cae2f4 --- /dev/null +++ b/include/uapi/asm-generic/int-l64.h | |||
@@ -0,0 +1,34 @@ | |||
1 | /* | ||
2 | * asm-generic/int-l64.h | ||
3 | * | ||
4 | * Integer declarations for architectures which use "long" | ||
5 | * for 64-bit types. | ||
6 | */ | ||
7 | |||
8 | #ifndef _UAPI_ASM_GENERIC_INT_L64_H | ||
9 | #define _UAPI_ASM_GENERIC_INT_L64_H | ||
10 | |||
11 | #include <asm/bitsperlong.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 | |||
19 | typedef __signed__ char __s8; | ||
20 | typedef unsigned char __u8; | ||
21 | |||
22 | typedef __signed__ short __s16; | ||
23 | typedef unsigned short __u16; | ||
24 | |||
25 | typedef __signed__ int __s32; | ||
26 | typedef unsigned int __u32; | ||
27 | |||
28 | typedef __signed__ long __s64; | ||
29 | typedef unsigned long __u64; | ||
30 | |||
31 | #endif /* __ASSEMBLY__ */ | ||
32 | |||
33 | |||
34 | #endif /* _UAPI_ASM_GENERIC_INT_L64_H */ | ||
diff --git a/include/uapi/asm-generic/int-ll64.h b/include/uapi/asm-generic/int-ll64.h new file mode 100644 index 000000000000..a8658b2423ba --- /dev/null +++ b/include/uapi/asm-generic/int-ll64.h | |||
@@ -0,0 +1,39 @@ | |||
1 | /* | ||
2 | * asm-generic/int-ll64.h | ||
3 | * | ||
4 | * Integer declarations for architectures which use "long long" | ||
5 | * for 64-bit types. | ||
6 | */ | ||
7 | |||
8 | #ifndef _UAPI_ASM_GENERIC_INT_LL64_H | ||
9 | #define _UAPI_ASM_GENERIC_INT_LL64_H | ||
10 | |||
11 | #include <asm/bitsperlong.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 | |||
19 | typedef __signed__ char __s8; | ||
20 | typedef unsigned char __u8; | ||
21 | |||
22 | typedef __signed__ short __s16; | ||
23 | typedef unsigned short __u16; | ||
24 | |||
25 | typedef __signed__ int __s32; | ||
26 | typedef unsigned int __u32; | ||
27 | |||
28 | #ifdef __GNUC__ | ||
29 | __extension__ typedef __signed__ long long __s64; | ||
30 | __extension__ typedef unsigned long long __u64; | ||
31 | #else | ||
32 | typedef __signed__ long long __s64; | ||
33 | typedef unsigned long long __u64; | ||
34 | #endif | ||
35 | |||
36 | #endif /* __ASSEMBLY__ */ | ||
37 | |||
38 | |||
39 | #endif /* _UAPI_ASM_GENERIC_INT_LL64_H */ | ||
diff --git a/include/uapi/asm-generic/ioctl.h b/include/uapi/asm-generic/ioctl.h new file mode 100644 index 000000000000..7e7c11b52143 --- /dev/null +++ b/include/uapi/asm-generic/ioctl.h | |||
@@ -0,0 +1,98 @@ | |||
1 | #ifndef _UAPI_ASM_GENERIC_IOCTL_H | ||
2 | #define _UAPI_ASM_GENERIC_IOCTL_H | ||
3 | |||
4 | /* ioctl command encoding: 32 bits total, command in lower 16 bits, | ||
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 | |||
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 | #ifndef __KERNEL__ | ||
72 | #define _IOC_TYPECHECK(t) (sizeof(t)) | ||
73 | #endif | ||
74 | |||
75 | /* used to create numbers */ | ||
76 | #define _IO(type,nr) _IOC(_IOC_NONE,(type),(nr),0) | ||
77 | #define _IOR(type,nr,size) _IOC(_IOC_READ,(type),(nr),(_IOC_TYPECHECK(size))) | ||
78 | #define _IOW(type,nr,size) _IOC(_IOC_WRITE,(type),(nr),(_IOC_TYPECHECK(size))) | ||
79 | #define _IOWR(type,nr,size) _IOC(_IOC_READ|_IOC_WRITE,(type),(nr),(_IOC_TYPECHECK(size))) | ||
80 | #define _IOR_BAD(type,nr,size) _IOC(_IOC_READ,(type),(nr),sizeof(size)) | ||
81 | #define _IOW_BAD(type,nr,size) _IOC(_IOC_WRITE,(type),(nr),sizeof(size)) | ||
82 | #define _IOWR_BAD(type,nr,size) _IOC(_IOC_READ|_IOC_WRITE,(type),(nr),sizeof(size)) | ||
83 | |||
84 | /* used to decode ioctl numbers.. */ | ||
85 | #define _IOC_DIR(nr) (((nr) >> _IOC_DIRSHIFT) & _IOC_DIRMASK) | ||
86 | #define _IOC_TYPE(nr) (((nr) >> _IOC_TYPESHIFT) & _IOC_TYPEMASK) | ||
87 | #define _IOC_NR(nr) (((nr) >> _IOC_NRSHIFT) & _IOC_NRMASK) | ||
88 | #define _IOC_SIZE(nr) (((nr) >> _IOC_SIZESHIFT) & _IOC_SIZEMASK) | ||
89 | |||
90 | /* ...and for the drivers/sound files... */ | ||
91 | |||
92 | #define IOC_IN (_IOC_WRITE << _IOC_DIRSHIFT) | ||
93 | #define IOC_OUT (_IOC_READ << _IOC_DIRSHIFT) | ||
94 | #define IOC_INOUT ((_IOC_WRITE|_IOC_READ) << _IOC_DIRSHIFT) | ||
95 | #define IOCSIZE_MASK (_IOC_SIZEMASK << _IOC_SIZESHIFT) | ||
96 | #define IOCSIZE_SHIFT (_IOC_SIZESHIFT) | ||
97 | |||
98 | #endif /* _UAPI_ASM_GENERIC_IOCTL_H */ | ||
diff --git a/include/asm-generic/ioctls.h b/include/uapi/asm-generic/ioctls.h index 199975fac395..199975fac395 100644 --- a/include/asm-generic/ioctls.h +++ b/include/uapi/asm-generic/ioctls.h | |||
diff --git a/include/asm-generic/ipcbuf.h b/include/uapi/asm-generic/ipcbuf.h index 76982b2a1b58..76982b2a1b58 100644 --- a/include/asm-generic/ipcbuf.h +++ b/include/uapi/asm-generic/ipcbuf.h | |||
diff --git a/include/uapi/asm-generic/kvm_para.h b/include/uapi/asm-generic/kvm_para.h new file mode 100644 index 000000000000..e69de29bb2d1 --- /dev/null +++ b/include/uapi/asm-generic/kvm_para.h | |||
diff --git a/include/asm-generic/mman-common.h b/include/uapi/asm-generic/mman-common.h index d030d2c2647a..d030d2c2647a 100644 --- a/include/asm-generic/mman-common.h +++ b/include/uapi/asm-generic/mman-common.h | |||
diff --git a/include/asm-generic/mman.h b/include/uapi/asm-generic/mman.h index 32c8bd6a196d..32c8bd6a196d 100644 --- a/include/asm-generic/mman.h +++ b/include/uapi/asm-generic/mman.h | |||
diff --git a/include/asm-generic/msgbuf.h b/include/uapi/asm-generic/msgbuf.h index aec850d9159e..aec850d9159e 100644 --- a/include/asm-generic/msgbuf.h +++ b/include/uapi/asm-generic/msgbuf.h | |||
diff --git a/include/uapi/asm-generic/param.h b/include/uapi/asm-generic/param.h new file mode 100644 index 000000000000..5becc84396b8 --- /dev/null +++ b/include/uapi/asm-generic/param.h | |||
@@ -0,0 +1,19 @@ | |||
1 | #ifndef _UAPI__ASM_GENERIC_PARAM_H | ||
2 | #define _UAPI__ASM_GENERIC_PARAM_H | ||
3 | |||
4 | #ifndef HZ | ||
5 | #define HZ 100 | ||
6 | #endif | ||
7 | |||
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 | |||
19 | #endif /* _UAPI__ASM_GENERIC_PARAM_H */ | ||
diff --git a/include/asm-generic/poll.h b/include/uapi/asm-generic/poll.h index 9ce7f44aebd2..9ce7f44aebd2 100644 --- a/include/asm-generic/poll.h +++ b/include/uapi/asm-generic/poll.h | |||
diff --git a/include/asm-generic/posix_types.h b/include/uapi/asm-generic/posix_types.h index fe74fccf18db..fe74fccf18db 100644 --- a/include/asm-generic/posix_types.h +++ b/include/uapi/asm-generic/posix_types.h | |||
diff --git a/include/uapi/asm-generic/resource.h b/include/uapi/asm-generic/resource.h new file mode 100644 index 000000000000..f863428796d5 --- /dev/null +++ b/include/uapi/asm-generic/resource.h | |||
@@ -0,0 +1,68 @@ | |||
1 | #ifndef _UAPI_ASM_GENERIC_RESOURCE_H | ||
2 | #define _UAPI_ASM_GENERIC_RESOURCE_H | ||
3 | |||
4 | /* | ||
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 | |||
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 | |||
68 | #endif /* _UAPI_ASM_GENERIC_RESOURCE_H */ | ||
diff --git a/include/asm-generic/sembuf.h b/include/uapi/asm-generic/sembuf.h index 4cb2c13e5090..4cb2c13e5090 100644 --- a/include/asm-generic/sembuf.h +++ b/include/uapi/asm-generic/sembuf.h | |||
diff --git a/include/asm-generic/setup.h b/include/uapi/asm-generic/setup.h index 6fc26a51003c..6fc26a51003c 100644 --- a/include/asm-generic/setup.h +++ b/include/uapi/asm-generic/setup.h | |||
diff --git a/include/asm-generic/shmbuf.h b/include/uapi/asm-generic/shmbuf.h index 5768fa60ac82..5768fa60ac82 100644 --- a/include/asm-generic/shmbuf.h +++ b/include/uapi/asm-generic/shmbuf.h | |||
diff --git a/include/asm-generic/shmparam.h b/include/uapi/asm-generic/shmparam.h index 51a3852de733..51a3852de733 100644 --- a/include/asm-generic/shmparam.h +++ b/include/uapi/asm-generic/shmparam.h | |||
diff --git a/include/uapi/asm-generic/siginfo.h b/include/uapi/asm-generic/siginfo.h new file mode 100644 index 000000000000..ba5be7fdbdfe --- /dev/null +++ b/include/uapi/asm-generic/siginfo.h | |||
@@ -0,0 +1,298 @@ | |||
1 | #ifndef _UAPI_ASM_GENERIC_SIGINFO_H | ||
2 | #define _UAPI_ASM_GENERIC_SIGINFO_H | ||
3 | |||
4 | #include <linux/compiler.h> | ||
5 | #include <linux/types.h> | ||
6 | |||
7 | typedef 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 | |||
48 | typedef 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 | #ifndef __KERNEL__ | ||
143 | #define __SI_KILL 0 | ||
144 | #define __SI_TIMER 0 | ||
145 | #define __SI_POLL 0 | ||
146 | #define __SI_FAULT 0 | ||
147 | #define __SI_CHLD 0 | ||
148 | #define __SI_RT 0 | ||
149 | #define __SI_MESGQ 0 | ||
150 | #define __SI_SYS 0 | ||
151 | #define __SI_CODE(T,N) (N) | ||
152 | #endif | ||
153 | |||
154 | /* | ||
155 | * si_code values | ||
156 | * Digital reserves positive values for kernel-generated signals. | ||
157 | */ | ||
158 | #define SI_USER 0 /* sent by kill, sigsend, raise */ | ||
159 | #define SI_KERNEL 0x80 /* sent by the kernel from somewhere */ | ||
160 | #define SI_QUEUE -1 /* sent by sigqueue */ | ||
161 | #define SI_TIMER __SI_CODE(__SI_TIMER,-2) /* sent by timer expiration */ | ||
162 | #define SI_MESGQ __SI_CODE(__SI_MESGQ,-3) /* sent by real time mesq state change */ | ||
163 | #define SI_ASYNCIO -4 /* sent by AIO completion */ | ||
164 | #define SI_SIGIO -5 /* sent by queued SIGIO */ | ||
165 | #define SI_TKILL -6 /* sent by tkill system call */ | ||
166 | #define SI_DETHREAD -7 /* sent by execve() killing subsidiary threads */ | ||
167 | |||
168 | #define SI_FROMUSER(siptr) ((siptr)->si_code <= 0) | ||
169 | #define SI_FROMKERNEL(siptr) ((siptr)->si_code > 0) | ||
170 | |||
171 | /* | ||
172 | * SIGILL si_codes | ||
173 | */ | ||
174 | #define ILL_ILLOPC (__SI_FAULT|1) /* illegal opcode */ | ||
175 | #define ILL_ILLOPN (__SI_FAULT|2) /* illegal operand */ | ||
176 | #define ILL_ILLADR (__SI_FAULT|3) /* illegal addressing mode */ | ||
177 | #define ILL_ILLTRP (__SI_FAULT|4) /* illegal trap */ | ||
178 | #define ILL_PRVOPC (__SI_FAULT|5) /* privileged opcode */ | ||
179 | #define ILL_PRVREG (__SI_FAULT|6) /* privileged register */ | ||
180 | #define ILL_COPROC (__SI_FAULT|7) /* coprocessor error */ | ||
181 | #define ILL_BADSTK (__SI_FAULT|8) /* internal stack error */ | ||
182 | #define NSIGILL 8 | ||
183 | |||
184 | /* | ||
185 | * SIGFPE si_codes | ||
186 | */ | ||
187 | #define FPE_INTDIV (__SI_FAULT|1) /* integer divide by zero */ | ||
188 | #define FPE_INTOVF (__SI_FAULT|2) /* integer overflow */ | ||
189 | #define FPE_FLTDIV (__SI_FAULT|3) /* floating point divide by zero */ | ||
190 | #define FPE_FLTOVF (__SI_FAULT|4) /* floating point overflow */ | ||
191 | #define FPE_FLTUND (__SI_FAULT|5) /* floating point underflow */ | ||
192 | #define FPE_FLTRES (__SI_FAULT|6) /* floating point inexact result */ | ||
193 | #define FPE_FLTINV (__SI_FAULT|7) /* floating point invalid operation */ | ||
194 | #define FPE_FLTSUB (__SI_FAULT|8) /* subscript out of range */ | ||
195 | #define NSIGFPE 8 | ||
196 | |||
197 | /* | ||
198 | * SIGSEGV si_codes | ||
199 | */ | ||
200 | #define SEGV_MAPERR (__SI_FAULT|1) /* address not mapped to object */ | ||
201 | #define SEGV_ACCERR (__SI_FAULT|2) /* invalid permissions for mapped object */ | ||
202 | #define NSIGSEGV 2 | ||
203 | |||
204 | /* | ||
205 | * SIGBUS si_codes | ||
206 | */ | ||
207 | #define BUS_ADRALN (__SI_FAULT|1) /* invalid address alignment */ | ||
208 | #define BUS_ADRERR (__SI_FAULT|2) /* non-existent physical address */ | ||
209 | #define BUS_OBJERR (__SI_FAULT|3) /* object specific hardware error */ | ||
210 | /* hardware memory error consumed on a machine check: action required */ | ||
211 | #define BUS_MCEERR_AR (__SI_FAULT|4) | ||
212 | /* hardware memory error detected in process but not consumed: action optional*/ | ||
213 | #define BUS_MCEERR_AO (__SI_FAULT|5) | ||
214 | #define NSIGBUS 5 | ||
215 | |||
216 | /* | ||
217 | * SIGTRAP si_codes | ||
218 | */ | ||
219 | #define TRAP_BRKPT (__SI_FAULT|1) /* process breakpoint */ | ||
220 | #define TRAP_TRACE (__SI_FAULT|2) /* process trace trap */ | ||
221 | #define TRAP_BRANCH (__SI_FAULT|3) /* process taken branch trap */ | ||
222 | #define TRAP_HWBKPT (__SI_FAULT|4) /* hardware breakpoint/watchpoint */ | ||
223 | #define NSIGTRAP 4 | ||
224 | |||
225 | /* | ||
226 | * SIGCHLD si_codes | ||
227 | */ | ||
228 | #define CLD_EXITED (__SI_CHLD|1) /* child has exited */ | ||
229 | #define CLD_KILLED (__SI_CHLD|2) /* child was killed */ | ||
230 | #define CLD_DUMPED (__SI_CHLD|3) /* child terminated abnormally */ | ||
231 | #define CLD_TRAPPED (__SI_CHLD|4) /* traced child has trapped */ | ||
232 | #define CLD_STOPPED (__SI_CHLD|5) /* child has stopped */ | ||
233 | #define CLD_CONTINUED (__SI_CHLD|6) /* stopped child has continued */ | ||
234 | #define NSIGCHLD 6 | ||
235 | |||
236 | /* | ||
237 | * SIGPOLL si_codes | ||
238 | */ | ||
239 | #define POLL_IN (__SI_POLL|1) /* data input available */ | ||
240 | #define POLL_OUT (__SI_POLL|2) /* output buffers available */ | ||
241 | #define POLL_MSG (__SI_POLL|3) /* input message available */ | ||
242 | #define POLL_ERR (__SI_POLL|4) /* i/o error */ | ||
243 | #define POLL_PRI (__SI_POLL|5) /* high priority input available */ | ||
244 | #define POLL_HUP (__SI_POLL|6) /* device disconnected */ | ||
245 | #define NSIGPOLL 6 | ||
246 | |||
247 | /* | ||
248 | * SIGSYS si_codes | ||
249 | */ | ||
250 | #define SYS_SECCOMP (__SI_SYS|1) /* seccomp triggered */ | ||
251 | #define NSIGSYS 1 | ||
252 | |||
253 | /* | ||
254 | * sigevent definitions | ||
255 | * | ||
256 | * It seems likely that SIGEV_THREAD will have to be handled from | ||
257 | * userspace, libpthread transmuting it to SIGEV_SIGNAL, which the | ||
258 | * thread manager then catches and does the appropriate nonsense. | ||
259 | * However, everything is written out here so as to not get lost. | ||
260 | */ | ||
261 | #define SIGEV_SIGNAL 0 /* notify via signal */ | ||
262 | #define SIGEV_NONE 1 /* other notification: meaningless */ | ||
263 | #define SIGEV_THREAD 2 /* deliver via thread creation */ | ||
264 | #define SIGEV_THREAD_ID 4 /* deliver to thread */ | ||
265 | |||
266 | /* | ||
267 | * This works because the alignment is ok on all current architectures | ||
268 | * but we leave open this being overridden in the future | ||
269 | */ | ||
270 | #ifndef __ARCH_SIGEV_PREAMBLE_SIZE | ||
271 | #define __ARCH_SIGEV_PREAMBLE_SIZE (sizeof(int) * 2 + sizeof(sigval_t)) | ||
272 | #endif | ||
273 | |||
274 | #define SIGEV_MAX_SIZE 64 | ||
275 | #define SIGEV_PAD_SIZE ((SIGEV_MAX_SIZE - __ARCH_SIGEV_PREAMBLE_SIZE) \ | ||
276 | / sizeof(int)) | ||
277 | |||
278 | typedef struct sigevent { | ||
279 | sigval_t sigev_value; | ||
280 | int sigev_signo; | ||
281 | int sigev_notify; | ||
282 | union { | ||
283 | int _pad[SIGEV_PAD_SIZE]; | ||
284 | int _tid; | ||
285 | |||
286 | struct { | ||
287 | void (*_function)(sigval_t); | ||
288 | void *_attribute; /* really pthread_attr_t */ | ||
289 | } _sigev_thread; | ||
290 | } _sigev_un; | ||
291 | } sigevent_t; | ||
292 | |||
293 | #define sigev_notify_function _sigev_un._sigev_thread._function | ||
294 | #define sigev_notify_attributes _sigev_un._sigev_thread._attribute | ||
295 | #define sigev_notify_thread_id _sigev_un._tid | ||
296 | |||
297 | |||
298 | #endif /* _UAPI_ASM_GENERIC_SIGINFO_H */ | ||
diff --git a/include/asm-generic/signal-defs.h b/include/uapi/asm-generic/signal-defs.h index 00f95df54297..00f95df54297 100644 --- a/include/asm-generic/signal-defs.h +++ b/include/uapi/asm-generic/signal-defs.h | |||
diff --git a/include/uapi/asm-generic/signal.h b/include/uapi/asm-generic/signal.h new file mode 100644 index 000000000000..0a78028984de --- /dev/null +++ b/include/uapi/asm-generic/signal.h | |||
@@ -0,0 +1,123 @@ | |||
1 | #ifndef _UAPI__ASM_GENERIC_SIGNAL_H | ||
2 | #define _UAPI__ASM_GENERIC_SIGNAL_H | ||
3 | |||
4 | #include <linux/types.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 | |||
92 | #ifndef __ASSEMBLY__ | ||
93 | typedef struct { | ||
94 | unsigned long sig[_NSIG_WORDS]; | ||
95 | } sigset_t; | ||
96 | |||
97 | /* not actually used, but required for linux/syscalls.h */ | ||
98 | typedef unsigned long old_sigset_t; | ||
99 | |||
100 | #include <asm-generic/signal-defs.h> | ||
101 | |||
102 | struct sigaction { | ||
103 | __sighandler_t sa_handler; | ||
104 | unsigned long sa_flags; | ||
105 | #ifdef SA_RESTORER | ||
106 | __sigrestore_t sa_restorer; | ||
107 | #endif | ||
108 | sigset_t sa_mask; /* mask last for extensibility */ | ||
109 | }; | ||
110 | |||
111 | struct k_sigaction { | ||
112 | struct sigaction sa; | ||
113 | }; | ||
114 | |||
115 | typedef struct sigaltstack { | ||
116 | void __user *ss_sp; | ||
117 | int ss_flags; | ||
118 | size_t ss_size; | ||
119 | } stack_t; | ||
120 | |||
121 | #endif /* __ASSEMBLY__ */ | ||
122 | |||
123 | #endif /* _UAPI__ASM_GENERIC_SIGNAL_H */ | ||
diff --git a/include/asm-generic/socket.h b/include/uapi/asm-generic/socket.h index b1bea03274d5..b1bea03274d5 100644 --- a/include/asm-generic/socket.h +++ b/include/uapi/asm-generic/socket.h | |||
diff --git a/include/asm-generic/sockios.h b/include/uapi/asm-generic/sockios.h index 9a61a369b901..9a61a369b901 100644 --- a/include/asm-generic/sockios.h +++ b/include/uapi/asm-generic/sockios.h | |||
diff --git a/include/asm-generic/stat.h b/include/uapi/asm-generic/stat.h index bd8cad21998e..bd8cad21998e 100644 --- a/include/asm-generic/stat.h +++ b/include/uapi/asm-generic/stat.h | |||
diff --git a/include/uapi/asm-generic/statfs.h b/include/uapi/asm-generic/statfs.h new file mode 100644 index 000000000000..0999647fca13 --- /dev/null +++ b/include/uapi/asm-generic/statfs.h | |||
@@ -0,0 +1,83 @@ | |||
1 | #ifndef _UAPI_GENERIC_STATFS_H | ||
2 | #define _UAPI_GENERIC_STATFS_H | ||
3 | |||
4 | #include <linux/types.h> | ||
5 | |||
6 | |||
7 | /* | ||
8 | * Most 64-bit platforms use 'long', while most 32-bit platforms use '__u32'. | ||
9 | * Yes, they differ in signedness as well as size. | ||
10 | * Special cases can override it for themselves -- except for S390x, which | ||
11 | * is just a little too special for us. And MIPS, which I'm not touching | ||
12 | * with a 10' pole. | ||
13 | */ | ||
14 | #ifndef __statfs_word | ||
15 | #if __BITS_PER_LONG == 64 | ||
16 | #define __statfs_word long | ||
17 | #else | ||
18 | #define __statfs_word __u32 | ||
19 | #endif | ||
20 | #endif | ||
21 | |||
22 | struct statfs { | ||
23 | __statfs_word f_type; | ||
24 | __statfs_word f_bsize; | ||
25 | __statfs_word f_blocks; | ||
26 | __statfs_word f_bfree; | ||
27 | __statfs_word f_bavail; | ||
28 | __statfs_word f_files; | ||
29 | __statfs_word f_ffree; | ||
30 | __kernel_fsid_t f_fsid; | ||
31 | __statfs_word f_namelen; | ||
32 | __statfs_word f_frsize; | ||
33 | __statfs_word f_flags; | ||
34 | __statfs_word f_spare[4]; | ||
35 | }; | ||
36 | |||
37 | /* | ||
38 | * ARM needs to avoid the 32-bit padding at the end, for consistency | ||
39 | * between EABI and OABI | ||
40 | */ | ||
41 | #ifndef ARCH_PACK_STATFS64 | ||
42 | #define ARCH_PACK_STATFS64 | ||
43 | #endif | ||
44 | |||
45 | struct statfs64 { | ||
46 | __statfs_word f_type; | ||
47 | __statfs_word f_bsize; | ||
48 | __u64 f_blocks; | ||
49 | __u64 f_bfree; | ||
50 | __u64 f_bavail; | ||
51 | __u64 f_files; | ||
52 | __u64 f_ffree; | ||
53 | __kernel_fsid_t f_fsid; | ||
54 | __statfs_word f_namelen; | ||
55 | __statfs_word f_frsize; | ||
56 | __statfs_word f_flags; | ||
57 | __statfs_word f_spare[4]; | ||
58 | } ARCH_PACK_STATFS64; | ||
59 | |||
60 | /* | ||
61 | * IA64 and x86_64 need to avoid the 32-bit padding at the end, | ||
62 | * to be compatible with the i386 ABI | ||
63 | */ | ||
64 | #ifndef ARCH_PACK_COMPAT_STATFS64 | ||
65 | #define ARCH_PACK_COMPAT_STATFS64 | ||
66 | #endif | ||
67 | |||
68 | struct compat_statfs64 { | ||
69 | __u32 f_type; | ||
70 | __u32 f_bsize; | ||
71 | __u64 f_blocks; | ||
72 | __u64 f_bfree; | ||
73 | __u64 f_bavail; | ||
74 | __u64 f_files; | ||
75 | __u64 f_ffree; | ||
76 | __kernel_fsid_t f_fsid; | ||
77 | __u32 f_namelen; | ||
78 | __u32 f_frsize; | ||
79 | __u32 f_flags; | ||
80 | __u32 f_spare[4]; | ||
81 | } ARCH_PACK_COMPAT_STATFS64; | ||
82 | |||
83 | #endif /* _UAPI_GENERIC_STATFS_H */ | ||
diff --git a/include/asm-generic/swab.h b/include/uapi/asm-generic/swab.h index a8e9029d9eba..a8e9029d9eba 100644 --- a/include/asm-generic/swab.h +++ b/include/uapi/asm-generic/swab.h | |||
diff --git a/include/asm-generic/termbits.h b/include/uapi/asm-generic/termbits.h index 232b4781aef3..232b4781aef3 100644 --- a/include/asm-generic/termbits.h +++ b/include/uapi/asm-generic/termbits.h | |||
diff --git a/include/uapi/asm-generic/termios.h b/include/uapi/asm-generic/termios.h new file mode 100644 index 000000000000..088176062133 --- /dev/null +++ b/include/uapi/asm-generic/termios.h | |||
@@ -0,0 +1,50 @@ | |||
1 | #ifndef _UAPI_ASM_GENERIC_TERMIOS_H | ||
2 | #define _UAPI_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 | |||
11 | #include <asm/termbits.h> | ||
12 | #include <asm/ioctls.h> | ||
13 | |||
14 | struct 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 | ||
22 | struct 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 | |||
50 | #endif /* _UAPI_ASM_GENERIC_TERMIOS_H */ | ||
diff --git a/include/asm-generic/types.h b/include/uapi/asm-generic/types.h index bd39806013b5..bd39806013b5 100644 --- a/include/asm-generic/types.h +++ b/include/uapi/asm-generic/types.h | |||
diff --git a/include/asm-generic/ucontext.h b/include/uapi/asm-generic/ucontext.h index ad77343e8a9a..ad77343e8a9a 100644 --- a/include/asm-generic/ucontext.h +++ b/include/uapi/asm-generic/ucontext.h | |||
diff --git a/include/uapi/asm-generic/unistd.h b/include/uapi/asm-generic/unistd.h new file mode 100644 index 000000000000..6e595ba545f4 --- /dev/null +++ b/include/uapi/asm-generic/unistd.h | |||
@@ -0,0 +1,902 @@ | |||
1 | #include <asm/bitsperlong.h> | ||
2 | |||
3 | /* | ||
4 | * This file contains the system call numbers, based on the | ||
5 | * layout of the x86-64 architecture, which embeds the | ||
6 | * pointer to the syscall in the table. | ||
7 | * | ||
8 | * As a basic principle, no duplication of functionality | ||
9 | * should be added, e.g. we don't use lseek when llseek | ||
10 | * is present. New architectures should use this file | ||
11 | * and implement the less feature-full calls in user space. | ||
12 | */ | ||
13 | |||
14 | #ifndef __SYSCALL | ||
15 | #define __SYSCALL(x, y) | ||
16 | #endif | ||
17 | |||
18 | #if __BITS_PER_LONG == 32 || defined(__SYSCALL_COMPAT) | ||
19 | #define __SC_3264(_nr, _32, _64) __SYSCALL(_nr, _32) | ||
20 | #else | ||
21 | #define __SC_3264(_nr, _32, _64) __SYSCALL(_nr, _64) | ||
22 | #endif | ||
23 | |||
24 | #ifdef __SYSCALL_COMPAT | ||
25 | #define __SC_COMP(_nr, _sys, _comp) __SYSCALL(_nr, _comp) | ||
26 | #define __SC_COMP_3264(_nr, _32, _64, _comp) __SYSCALL(_nr, _comp) | ||
27 | #else | ||
28 | #define __SC_COMP(_nr, _sys, _comp) __SYSCALL(_nr, _sys) | ||
29 | #define __SC_COMP_3264(_nr, _32, _64, _comp) __SC_3264(_nr, _32, _64) | ||
30 | #endif | ||
31 | |||
32 | #define __NR_io_setup 0 | ||
33 | __SC_COMP(__NR_io_setup, sys_io_setup, compat_sys_io_setup) | ||
34 | #define __NR_io_destroy 1 | ||
35 | __SYSCALL(__NR_io_destroy, sys_io_destroy) | ||
36 | #define __NR_io_submit 2 | ||
37 | __SC_COMP(__NR_io_submit, sys_io_submit, compat_sys_io_submit) | ||
38 | #define __NR_io_cancel 3 | ||
39 | __SYSCALL(__NR_io_cancel, sys_io_cancel) | ||
40 | #define __NR_io_getevents 4 | ||
41 | __SC_COMP(__NR_io_getevents, sys_io_getevents, compat_sys_io_getevents) | ||
42 | |||
43 | /* fs/xattr.c */ | ||
44 | #define __NR_setxattr 5 | ||
45 | __SYSCALL(__NR_setxattr, sys_setxattr) | ||
46 | #define __NR_lsetxattr 6 | ||
47 | __SYSCALL(__NR_lsetxattr, sys_lsetxattr) | ||
48 | #define __NR_fsetxattr 7 | ||
49 | __SYSCALL(__NR_fsetxattr, sys_fsetxattr) | ||
50 | #define __NR_getxattr 8 | ||
51 | __SYSCALL(__NR_getxattr, sys_getxattr) | ||
52 | #define __NR_lgetxattr 9 | ||
53 | __SYSCALL(__NR_lgetxattr, sys_lgetxattr) | ||
54 | #define __NR_fgetxattr 10 | ||
55 | __SYSCALL(__NR_fgetxattr, sys_fgetxattr) | ||
56 | #define __NR_listxattr 11 | ||
57 | __SYSCALL(__NR_listxattr, sys_listxattr) | ||
58 | #define __NR_llistxattr 12 | ||
59 | __SYSCALL(__NR_llistxattr, sys_llistxattr) | ||
60 | #define __NR_flistxattr 13 | ||
61 | __SYSCALL(__NR_flistxattr, sys_flistxattr) | ||
62 | #define __NR_removexattr 14 | ||
63 | __SYSCALL(__NR_removexattr, sys_removexattr) | ||
64 | #define __NR_lremovexattr 15 | ||
65 | __SYSCALL(__NR_lremovexattr, sys_lremovexattr) | ||
66 | #define __NR_fremovexattr 16 | ||
67 | __SYSCALL(__NR_fremovexattr, sys_fremovexattr) | ||
68 | |||
69 | /* fs/dcache.c */ | ||
70 | #define __NR_getcwd 17 | ||
71 | __SYSCALL(__NR_getcwd, sys_getcwd) | ||
72 | |||
73 | /* fs/cookies.c */ | ||
74 | #define __NR_lookup_dcookie 18 | ||
75 | __SC_COMP(__NR_lookup_dcookie, sys_lookup_dcookie, compat_sys_lookup_dcookie) | ||
76 | |||
77 | /* fs/eventfd.c */ | ||
78 | #define __NR_eventfd2 19 | ||
79 | __SYSCALL(__NR_eventfd2, sys_eventfd2) | ||
80 | |||
81 | /* fs/eventpoll.c */ | ||
82 | #define __NR_epoll_create1 20 | ||
83 | __SYSCALL(__NR_epoll_create1, sys_epoll_create1) | ||
84 | #define __NR_epoll_ctl 21 | ||
85 | __SYSCALL(__NR_epoll_ctl, sys_epoll_ctl) | ||
86 | #define __NR_epoll_pwait 22 | ||
87 | __SC_COMP(__NR_epoll_pwait, sys_epoll_pwait, compat_sys_epoll_pwait) | ||
88 | |||
89 | /* fs/fcntl.c */ | ||
90 | #define __NR_dup 23 | ||
91 | __SYSCALL(__NR_dup, sys_dup) | ||
92 | #define __NR_dup3 24 | ||
93 | __SYSCALL(__NR_dup3, sys_dup3) | ||
94 | #define __NR3264_fcntl 25 | ||
95 | __SC_COMP_3264(__NR3264_fcntl, sys_fcntl64, sys_fcntl, compat_sys_fcntl64) | ||
96 | |||
97 | /* fs/inotify_user.c */ | ||
98 | #define __NR_inotify_init1 26 | ||
99 | __SYSCALL(__NR_inotify_init1, sys_inotify_init1) | ||
100 | #define __NR_inotify_add_watch 27 | ||
101 | __SYSCALL(__NR_inotify_add_watch, sys_inotify_add_watch) | ||
102 | #define __NR_inotify_rm_watch 28 | ||
103 | __SYSCALL(__NR_inotify_rm_watch, sys_inotify_rm_watch) | ||
104 | |||
105 | /* fs/ioctl.c */ | ||
106 | #define __NR_ioctl 29 | ||
107 | __SC_COMP(__NR_ioctl, sys_ioctl, compat_sys_ioctl) | ||
108 | |||
109 | /* fs/ioprio.c */ | ||
110 | #define __NR_ioprio_set 30 | ||
111 | __SYSCALL(__NR_ioprio_set, sys_ioprio_set) | ||
112 | #define __NR_ioprio_get 31 | ||
113 | __SYSCALL(__NR_ioprio_get, sys_ioprio_get) | ||
114 | |||
115 | /* fs/locks.c */ | ||
116 | #define __NR_flock 32 | ||
117 | __SYSCALL(__NR_flock, sys_flock) | ||
118 | |||
119 | /* fs/namei.c */ | ||
120 | #define __NR_mknodat 33 | ||
121 | __SYSCALL(__NR_mknodat, sys_mknodat) | ||
122 | #define __NR_mkdirat 34 | ||
123 | __SYSCALL(__NR_mkdirat, sys_mkdirat) | ||
124 | #define __NR_unlinkat 35 | ||
125 | __SYSCALL(__NR_unlinkat, sys_unlinkat) | ||
126 | #define __NR_symlinkat 36 | ||
127 | __SYSCALL(__NR_symlinkat, sys_symlinkat) | ||
128 | #define __NR_linkat 37 | ||
129 | __SYSCALL(__NR_linkat, sys_linkat) | ||
130 | #define __NR_renameat 38 | ||
131 | __SYSCALL(__NR_renameat, sys_renameat) | ||
132 | |||
133 | /* fs/namespace.c */ | ||
134 | #define __NR_umount2 39 | ||
135 | __SYSCALL(__NR_umount2, sys_umount) | ||
136 | #define __NR_mount 40 | ||
137 | __SC_COMP(__NR_mount, sys_mount, compat_sys_mount) | ||
138 | #define __NR_pivot_root 41 | ||
139 | __SYSCALL(__NR_pivot_root, sys_pivot_root) | ||
140 | |||
141 | /* fs/nfsctl.c */ | ||
142 | #define __NR_nfsservctl 42 | ||
143 | __SYSCALL(__NR_nfsservctl, sys_ni_syscall) | ||
144 | |||
145 | /* fs/open.c */ | ||
146 | #define __NR3264_statfs 43 | ||
147 | __SC_COMP_3264(__NR3264_statfs, sys_statfs64, sys_statfs, \ | ||
148 | compat_sys_statfs64) | ||
149 | #define __NR3264_fstatfs 44 | ||
150 | __SC_COMP_3264(__NR3264_fstatfs, sys_fstatfs64, sys_fstatfs, \ | ||
151 | compat_sys_fstatfs64) | ||
152 | #define __NR3264_truncate 45 | ||
153 | __SC_COMP_3264(__NR3264_truncate, sys_truncate64, sys_truncate, \ | ||
154 | compat_sys_truncate64) | ||
155 | #define __NR3264_ftruncate 46 | ||
156 | __SC_COMP_3264(__NR3264_ftruncate, sys_ftruncate64, sys_ftruncate, \ | ||
157 | compat_sys_ftruncate64) | ||
158 | |||
159 | #define __NR_fallocate 47 | ||
160 | __SC_COMP(__NR_fallocate, sys_fallocate, compat_sys_fallocate) | ||
161 | #define __NR_faccessat 48 | ||
162 | __SYSCALL(__NR_faccessat, sys_faccessat) | ||
163 | #define __NR_chdir 49 | ||
164 | __SYSCALL(__NR_chdir, sys_chdir) | ||
165 | #define __NR_fchdir 50 | ||
166 | __SYSCALL(__NR_fchdir, sys_fchdir) | ||
167 | #define __NR_chroot 51 | ||
168 | __SYSCALL(__NR_chroot, sys_chroot) | ||
169 | #define __NR_fchmod 52 | ||
170 | __SYSCALL(__NR_fchmod, sys_fchmod) | ||
171 | #define __NR_fchmodat 53 | ||
172 | __SYSCALL(__NR_fchmodat, sys_fchmodat) | ||
173 | #define __NR_fchownat 54 | ||
174 | __SYSCALL(__NR_fchownat, sys_fchownat) | ||
175 | #define __NR_fchown 55 | ||
176 | __SYSCALL(__NR_fchown, sys_fchown) | ||
177 | #define __NR_openat 56 | ||
178 | __SC_COMP(__NR_openat, sys_openat, compat_sys_openat) | ||
179 | #define __NR_close 57 | ||
180 | __SYSCALL(__NR_close, sys_close) | ||
181 | #define __NR_vhangup 58 | ||
182 | __SYSCALL(__NR_vhangup, sys_vhangup) | ||
183 | |||
184 | /* fs/pipe.c */ | ||
185 | #define __NR_pipe2 59 | ||
186 | __SYSCALL(__NR_pipe2, sys_pipe2) | ||
187 | |||
188 | /* fs/quota.c */ | ||
189 | #define __NR_quotactl 60 | ||
190 | __SYSCALL(__NR_quotactl, sys_quotactl) | ||
191 | |||
192 | /* fs/readdir.c */ | ||
193 | #define __NR_getdents64 61 | ||
194 | __SC_COMP(__NR_getdents64, sys_getdents64, compat_sys_getdents64) | ||
195 | |||
196 | /* fs/read_write.c */ | ||
197 | #define __NR3264_lseek 62 | ||
198 | __SC_3264(__NR3264_lseek, sys_llseek, sys_lseek) | ||
199 | #define __NR_read 63 | ||
200 | __SYSCALL(__NR_read, sys_read) | ||
201 | #define __NR_write 64 | ||
202 | __SYSCALL(__NR_write, sys_write) | ||
203 | #define __NR_readv 65 | ||
204 | __SC_COMP(__NR_readv, sys_readv, compat_sys_readv) | ||
205 | #define __NR_writev 66 | ||
206 | __SC_COMP(__NR_writev, sys_writev, compat_sys_writev) | ||
207 | #define __NR_pread64 67 | ||
208 | __SC_COMP(__NR_pread64, sys_pread64, compat_sys_pread64) | ||
209 | #define __NR_pwrite64 68 | ||
210 | __SC_COMP(__NR_pwrite64, sys_pwrite64, compat_sys_pwrite64) | ||
211 | #define __NR_preadv 69 | ||
212 | __SC_COMP(__NR_preadv, sys_preadv, compat_sys_preadv) | ||
213 | #define __NR_pwritev 70 | ||
214 | __SC_COMP(__NR_pwritev, sys_pwritev, compat_sys_pwritev) | ||
215 | |||
216 | /* fs/sendfile.c */ | ||
217 | #define __NR3264_sendfile 71 | ||
218 | __SYSCALL(__NR3264_sendfile, sys_sendfile64) | ||
219 | |||
220 | /* fs/select.c */ | ||
221 | #define __NR_pselect6 72 | ||
222 | __SC_COMP(__NR_pselect6, sys_pselect6, compat_sys_pselect6) | ||
223 | #define __NR_ppoll 73 | ||
224 | __SC_COMP(__NR_ppoll, sys_ppoll, compat_sys_ppoll) | ||
225 | |||
226 | /* fs/signalfd.c */ | ||
227 | #define __NR_signalfd4 74 | ||
228 | __SC_COMP(__NR_signalfd4, sys_signalfd4, compat_sys_signalfd4) | ||
229 | |||
230 | /* fs/splice.c */ | ||
231 | #define __NR_vmsplice 75 | ||
232 | __SC_COMP(__NR_vmsplice, sys_vmsplice, compat_sys_vmsplice) | ||
233 | #define __NR_splice 76 | ||
234 | __SYSCALL(__NR_splice, sys_splice) | ||
235 | #define __NR_tee 77 | ||
236 | __SYSCALL(__NR_tee, sys_tee) | ||
237 | |||
238 | /* fs/stat.c */ | ||
239 | #define __NR_readlinkat 78 | ||
240 | __SYSCALL(__NR_readlinkat, sys_readlinkat) | ||
241 | #define __NR3264_fstatat 79 | ||
242 | __SC_3264(__NR3264_fstatat, sys_fstatat64, sys_newfstatat) | ||
243 | #define __NR3264_fstat 80 | ||
244 | __SC_3264(__NR3264_fstat, sys_fstat64, sys_newfstat) | ||
245 | |||
246 | /* fs/sync.c */ | ||
247 | #define __NR_sync 81 | ||
248 | __SYSCALL(__NR_sync, sys_sync) | ||
249 | #define __NR_fsync 82 | ||
250 | __SYSCALL(__NR_fsync, sys_fsync) | ||
251 | #define __NR_fdatasync 83 | ||
252 | __SYSCALL(__NR_fdatasync, sys_fdatasync) | ||
253 | #ifdef __ARCH_WANT_SYNC_FILE_RANGE2 | ||
254 | #define __NR_sync_file_range2 84 | ||
255 | __SC_COMP(__NR_sync_file_range2, sys_sync_file_range2, \ | ||
256 | compat_sys_sync_file_range2) | ||
257 | #else | ||
258 | #define __NR_sync_file_range 84 | ||
259 | __SC_COMP(__NR_sync_file_range, sys_sync_file_range, \ | ||
260 | compat_sys_sync_file_range) | ||
261 | #endif | ||
262 | |||
263 | /* fs/timerfd.c */ | ||
264 | #define __NR_timerfd_create 85 | ||
265 | __SYSCALL(__NR_timerfd_create, sys_timerfd_create) | ||
266 | #define __NR_timerfd_settime 86 | ||
267 | __SC_COMP(__NR_timerfd_settime, sys_timerfd_settime, \ | ||
268 | compat_sys_timerfd_settime) | ||
269 | #define __NR_timerfd_gettime 87 | ||
270 | __SC_COMP(__NR_timerfd_gettime, sys_timerfd_gettime, \ | ||
271 | compat_sys_timerfd_gettime) | ||
272 | |||
273 | /* fs/utimes.c */ | ||
274 | #define __NR_utimensat 88 | ||
275 | __SC_COMP(__NR_utimensat, sys_utimensat, compat_sys_utimensat) | ||
276 | |||
277 | /* kernel/acct.c */ | ||
278 | #define __NR_acct 89 | ||
279 | __SYSCALL(__NR_acct, sys_acct) | ||
280 | |||
281 | /* kernel/capability.c */ | ||
282 | #define __NR_capget 90 | ||
283 | __SYSCALL(__NR_capget, sys_capget) | ||
284 | #define __NR_capset 91 | ||
285 | __SYSCALL(__NR_capset, sys_capset) | ||
286 | |||
287 | /* kernel/exec_domain.c */ | ||
288 | #define __NR_personality 92 | ||
289 | __SYSCALL(__NR_personality, sys_personality) | ||
290 | |||
291 | /* kernel/exit.c */ | ||
292 | #define __NR_exit 93 | ||
293 | __SYSCALL(__NR_exit, sys_exit) | ||
294 | #define __NR_exit_group 94 | ||
295 | __SYSCALL(__NR_exit_group, sys_exit_group) | ||
296 | #define __NR_waitid 95 | ||
297 | __SC_COMP(__NR_waitid, sys_waitid, compat_sys_waitid) | ||
298 | |||
299 | /* kernel/fork.c */ | ||
300 | #define __NR_set_tid_address 96 | ||
301 | __SYSCALL(__NR_set_tid_address, sys_set_tid_address) | ||
302 | #define __NR_unshare 97 | ||
303 | __SYSCALL(__NR_unshare, sys_unshare) | ||
304 | |||
305 | /* kernel/futex.c */ | ||
306 | #define __NR_futex 98 | ||
307 | __SC_COMP(__NR_futex, sys_futex, compat_sys_futex) | ||
308 | #define __NR_set_robust_list 99 | ||
309 | __SC_COMP(__NR_set_robust_list, sys_set_robust_list, \ | ||
310 | compat_sys_set_robust_list) | ||
311 | #define __NR_get_robust_list 100 | ||
312 | __SC_COMP(__NR_get_robust_list, sys_get_robust_list, \ | ||
313 | compat_sys_get_robust_list) | ||
314 | |||
315 | /* kernel/hrtimer.c */ | ||
316 | #define __NR_nanosleep 101 | ||
317 | __SC_COMP(__NR_nanosleep, sys_nanosleep, compat_sys_nanosleep) | ||
318 | |||
319 | /* kernel/itimer.c */ | ||
320 | #define __NR_getitimer 102 | ||
321 | __SC_COMP(__NR_getitimer, sys_getitimer, compat_sys_getitimer) | ||
322 | #define __NR_setitimer 103 | ||
323 | __SC_COMP(__NR_setitimer, sys_setitimer, compat_sys_setitimer) | ||
324 | |||
325 | /* kernel/kexec.c */ | ||
326 | #define __NR_kexec_load 104 | ||
327 | __SC_COMP(__NR_kexec_load, sys_kexec_load, compat_sys_kexec_load) | ||
328 | |||
329 | /* kernel/module.c */ | ||
330 | #define __NR_init_module 105 | ||
331 | __SYSCALL(__NR_init_module, sys_init_module) | ||
332 | #define __NR_delete_module 106 | ||
333 | __SYSCALL(__NR_delete_module, sys_delete_module) | ||
334 | |||
335 | /* kernel/posix-timers.c */ | ||
336 | #define __NR_timer_create 107 | ||
337 | __SC_COMP(__NR_timer_create, sys_timer_create, compat_sys_timer_create) | ||
338 | #define __NR_timer_gettime 108 | ||
339 | __SC_COMP(__NR_timer_gettime, sys_timer_gettime, compat_sys_timer_gettime) | ||
340 | #define __NR_timer_getoverrun 109 | ||
341 | __SYSCALL(__NR_timer_getoverrun, sys_timer_getoverrun) | ||
342 | #define __NR_timer_settime 110 | ||
343 | __SC_COMP(__NR_timer_settime, sys_timer_settime, compat_sys_timer_settime) | ||
344 | #define __NR_timer_delete 111 | ||
345 | __SYSCALL(__NR_timer_delete, sys_timer_delete) | ||
346 | #define __NR_clock_settime 112 | ||
347 | __SC_COMP(__NR_clock_settime, sys_clock_settime, compat_sys_clock_settime) | ||
348 | #define __NR_clock_gettime 113 | ||
349 | __SC_COMP(__NR_clock_gettime, sys_clock_gettime, compat_sys_clock_gettime) | ||
350 | #define __NR_clock_getres 114 | ||
351 | __SC_COMP(__NR_clock_getres, sys_clock_getres, compat_sys_clock_getres) | ||
352 | #define __NR_clock_nanosleep 115 | ||
353 | __SC_COMP(__NR_clock_nanosleep, sys_clock_nanosleep, \ | ||
354 | compat_sys_clock_nanosleep) | ||
355 | |||
356 | /* kernel/printk.c */ | ||
357 | #define __NR_syslog 116 | ||
358 | __SYSCALL(__NR_syslog, sys_syslog) | ||
359 | |||
360 | /* kernel/ptrace.c */ | ||
361 | #define __NR_ptrace 117 | ||
362 | __SYSCALL(__NR_ptrace, sys_ptrace) | ||
363 | |||
364 | /* kernel/sched.c */ | ||
365 | #define __NR_sched_setparam 118 | ||
366 | __SYSCALL(__NR_sched_setparam, sys_sched_setparam) | ||
367 | #define __NR_sched_setscheduler 119 | ||
368 | __SYSCALL(__NR_sched_setscheduler, sys_sched_setscheduler) | ||
369 | #define __NR_sched_getscheduler 120 | ||
370 | __SYSCALL(__NR_sched_getscheduler, sys_sched_getscheduler) | ||
371 | #define __NR_sched_getparam 121 | ||
372 | __SYSCALL(__NR_sched_getparam, sys_sched_getparam) | ||
373 | #define __NR_sched_setaffinity 122 | ||
374 | __SC_COMP(__NR_sched_setaffinity, sys_sched_setaffinity, \ | ||
375 | compat_sys_sched_setaffinity) | ||
376 | #define __NR_sched_getaffinity 123 | ||
377 | __SC_COMP(__NR_sched_getaffinity, sys_sched_getaffinity, \ | ||
378 | compat_sys_sched_getaffinity) | ||
379 | #define __NR_sched_yield 124 | ||
380 | __SYSCALL(__NR_sched_yield, sys_sched_yield) | ||
381 | #define __NR_sched_get_priority_max 125 | ||
382 | __SYSCALL(__NR_sched_get_priority_max, sys_sched_get_priority_max) | ||
383 | #define __NR_sched_get_priority_min 126 | ||
384 | __SYSCALL(__NR_sched_get_priority_min, sys_sched_get_priority_min) | ||
385 | #define __NR_sched_rr_get_interval 127 | ||
386 | __SC_COMP(__NR_sched_rr_get_interval, sys_sched_rr_get_interval, \ | ||
387 | compat_sys_sched_rr_get_interval) | ||
388 | |||
389 | /* kernel/signal.c */ | ||
390 | #define __NR_restart_syscall 128 | ||
391 | __SYSCALL(__NR_restart_syscall, sys_restart_syscall) | ||
392 | #define __NR_kill 129 | ||
393 | __SYSCALL(__NR_kill, sys_kill) | ||
394 | #define __NR_tkill 130 | ||
395 | __SYSCALL(__NR_tkill, sys_tkill) | ||
396 | #define __NR_tgkill 131 | ||
397 | __SYSCALL(__NR_tgkill, sys_tgkill) | ||
398 | #define __NR_sigaltstack 132 | ||
399 | __SC_COMP(__NR_sigaltstack, sys_sigaltstack, compat_sys_sigaltstack) | ||
400 | #define __NR_rt_sigsuspend 133 | ||
401 | __SC_COMP(__NR_rt_sigsuspend, sys_rt_sigsuspend, compat_sys_rt_sigsuspend) | ||
402 | #define __NR_rt_sigaction 134 | ||
403 | __SC_COMP(__NR_rt_sigaction, sys_rt_sigaction, compat_sys_rt_sigaction) | ||
404 | #define __NR_rt_sigprocmask 135 | ||
405 | __SYSCALL(__NR_rt_sigprocmask, sys_rt_sigprocmask) | ||
406 | #define __NR_rt_sigpending 136 | ||
407 | __SYSCALL(__NR_rt_sigpending, sys_rt_sigpending) | ||
408 | #define __NR_rt_sigtimedwait 137 | ||
409 | __SC_COMP(__NR_rt_sigtimedwait, sys_rt_sigtimedwait, \ | ||
410 | compat_sys_rt_sigtimedwait) | ||
411 | #define __NR_rt_sigqueueinfo 138 | ||
412 | __SC_COMP(__NR_rt_sigqueueinfo, sys_rt_sigqueueinfo, \ | ||
413 | compat_sys_rt_sigqueueinfo) | ||
414 | #define __NR_rt_sigreturn 139 | ||
415 | __SC_COMP(__NR_rt_sigreturn, sys_rt_sigreturn, compat_sys_rt_sigreturn) | ||
416 | |||
417 | /* kernel/sys.c */ | ||
418 | #define __NR_setpriority 140 | ||
419 | __SYSCALL(__NR_setpriority, sys_setpriority) | ||
420 | #define __NR_getpriority 141 | ||
421 | __SYSCALL(__NR_getpriority, sys_getpriority) | ||
422 | #define __NR_reboot 142 | ||
423 | __SYSCALL(__NR_reboot, sys_reboot) | ||
424 | #define __NR_setregid 143 | ||
425 | __SYSCALL(__NR_setregid, sys_setregid) | ||
426 | #define __NR_setgid 144 | ||
427 | __SYSCALL(__NR_setgid, sys_setgid) | ||
428 | #define __NR_setreuid 145 | ||
429 | __SYSCALL(__NR_setreuid, sys_setreuid) | ||
430 | #define __NR_setuid 146 | ||
431 | __SYSCALL(__NR_setuid, sys_setuid) | ||
432 | #define __NR_setresuid 147 | ||
433 | __SYSCALL(__NR_setresuid, sys_setresuid) | ||
434 | #define __NR_getresuid 148 | ||
435 | __SYSCALL(__NR_getresuid, sys_getresuid) | ||
436 | #define __NR_setresgid 149 | ||
437 | __SYSCALL(__NR_setresgid, sys_setresgid) | ||
438 | #define __NR_getresgid 150 | ||
439 | __SYSCALL(__NR_getresgid, sys_getresgid) | ||
440 | #define __NR_setfsuid 151 | ||
441 | __SYSCALL(__NR_setfsuid, sys_setfsuid) | ||
442 | #define __NR_setfsgid 152 | ||
443 | __SYSCALL(__NR_setfsgid, sys_setfsgid) | ||
444 | #define __NR_times 153 | ||
445 | __SC_COMP(__NR_times, sys_times, compat_sys_times) | ||
446 | #define __NR_setpgid 154 | ||
447 | __SYSCALL(__NR_setpgid, sys_setpgid) | ||
448 | #define __NR_getpgid 155 | ||
449 | __SYSCALL(__NR_getpgid, sys_getpgid) | ||
450 | #define __NR_getsid 156 | ||
451 | __SYSCALL(__NR_getsid, sys_getsid) | ||
452 | #define __NR_setsid 157 | ||
453 | __SYSCALL(__NR_setsid, sys_setsid) | ||
454 | #define __NR_getgroups 158 | ||
455 | __SYSCALL(__NR_getgroups, sys_getgroups) | ||
456 | #define __NR_setgroups 159 | ||
457 | __SYSCALL(__NR_setgroups, sys_setgroups) | ||
458 | #define __NR_uname 160 | ||
459 | __SYSCALL(__NR_uname, sys_newuname) | ||
460 | #define __NR_sethostname 161 | ||
461 | __SYSCALL(__NR_sethostname, sys_sethostname) | ||
462 | #define __NR_setdomainname 162 | ||
463 | __SYSCALL(__NR_setdomainname, sys_setdomainname) | ||
464 | #define __NR_getrlimit 163 | ||
465 | __SC_COMP(__NR_getrlimit, sys_getrlimit, compat_sys_getrlimit) | ||
466 | #define __NR_setrlimit 164 | ||
467 | __SC_COMP(__NR_setrlimit, sys_setrlimit, compat_sys_setrlimit) | ||
468 | #define __NR_getrusage 165 | ||
469 | __SC_COMP(__NR_getrusage, sys_getrusage, compat_sys_getrusage) | ||
470 | #define __NR_umask 166 | ||
471 | __SYSCALL(__NR_umask, sys_umask) | ||
472 | #define __NR_prctl 167 | ||
473 | __SYSCALL(__NR_prctl, sys_prctl) | ||
474 | #define __NR_getcpu 168 | ||
475 | __SYSCALL(__NR_getcpu, sys_getcpu) | ||
476 | |||
477 | /* kernel/time.c */ | ||
478 | #define __NR_gettimeofday 169 | ||
479 | __SC_COMP(__NR_gettimeofday, sys_gettimeofday, compat_sys_gettimeofday) | ||
480 | #define __NR_settimeofday 170 | ||
481 | __SC_COMP(__NR_settimeofday, sys_settimeofday, compat_sys_settimeofday) | ||
482 | #define __NR_adjtimex 171 | ||
483 | __SC_COMP(__NR_adjtimex, sys_adjtimex, compat_sys_adjtimex) | ||
484 | |||
485 | /* kernel/timer.c */ | ||
486 | #define __NR_getpid 172 | ||
487 | __SYSCALL(__NR_getpid, sys_getpid) | ||
488 | #define __NR_getppid 173 | ||
489 | __SYSCALL(__NR_getppid, sys_getppid) | ||
490 | #define __NR_getuid 174 | ||
491 | __SYSCALL(__NR_getuid, sys_getuid) | ||
492 | #define __NR_geteuid 175 | ||
493 | __SYSCALL(__NR_geteuid, sys_geteuid) | ||
494 | #define __NR_getgid 176 | ||
495 | __SYSCALL(__NR_getgid, sys_getgid) | ||
496 | #define __NR_getegid 177 | ||
497 | __SYSCALL(__NR_getegid, sys_getegid) | ||
498 | #define __NR_gettid 178 | ||
499 | __SYSCALL(__NR_gettid, sys_gettid) | ||
500 | #define __NR_sysinfo 179 | ||
501 | __SC_COMP(__NR_sysinfo, sys_sysinfo, compat_sys_sysinfo) | ||
502 | |||
503 | /* ipc/mqueue.c */ | ||
504 | #define __NR_mq_open 180 | ||
505 | __SC_COMP(__NR_mq_open, sys_mq_open, compat_sys_mq_open) | ||
506 | #define __NR_mq_unlink 181 | ||
507 | __SYSCALL(__NR_mq_unlink, sys_mq_unlink) | ||
508 | #define __NR_mq_timedsend 182 | ||
509 | __SC_COMP(__NR_mq_timedsend, sys_mq_timedsend, compat_sys_mq_timedsend) | ||
510 | #define __NR_mq_timedreceive 183 | ||
511 | __SC_COMP(__NR_mq_timedreceive, sys_mq_timedreceive, \ | ||
512 | compat_sys_mq_timedreceive) | ||
513 | #define __NR_mq_notify 184 | ||
514 | __SC_COMP(__NR_mq_notify, sys_mq_notify, compat_sys_mq_notify) | ||
515 | #define __NR_mq_getsetattr 185 | ||
516 | __SC_COMP(__NR_mq_getsetattr, sys_mq_getsetattr, compat_sys_mq_getsetattr) | ||
517 | |||
518 | /* ipc/msg.c */ | ||
519 | #define __NR_msgget 186 | ||
520 | __SYSCALL(__NR_msgget, sys_msgget) | ||
521 | #define __NR_msgctl 187 | ||
522 | __SC_COMP(__NR_msgctl, sys_msgctl, compat_sys_msgctl) | ||
523 | #define __NR_msgrcv 188 | ||
524 | __SC_COMP(__NR_msgrcv, sys_msgrcv, compat_sys_msgrcv) | ||
525 | #define __NR_msgsnd 189 | ||
526 | __SC_COMP(__NR_msgsnd, sys_msgsnd, compat_sys_msgsnd) | ||
527 | |||
528 | /* ipc/sem.c */ | ||
529 | #define __NR_semget 190 | ||
530 | __SYSCALL(__NR_semget, sys_semget) | ||
531 | #define __NR_semctl 191 | ||
532 | __SC_COMP(__NR_semctl, sys_semctl, compat_sys_semctl) | ||
533 | #define __NR_semtimedop 192 | ||
534 | __SC_COMP(__NR_semtimedop, sys_semtimedop, compat_sys_semtimedop) | ||
535 | #define __NR_semop 193 | ||
536 | __SYSCALL(__NR_semop, sys_semop) | ||
537 | |||
538 | /* ipc/shm.c */ | ||
539 | #define __NR_shmget 194 | ||
540 | __SYSCALL(__NR_shmget, sys_shmget) | ||
541 | #define __NR_shmctl 195 | ||
542 | __SC_COMP(__NR_shmctl, sys_shmctl, compat_sys_shmctl) | ||
543 | #define __NR_shmat 196 | ||
544 | __SC_COMP(__NR_shmat, sys_shmat, compat_sys_shmat) | ||
545 | #define __NR_shmdt 197 | ||
546 | __SYSCALL(__NR_shmdt, sys_shmdt) | ||
547 | |||
548 | /* net/socket.c */ | ||
549 | #define __NR_socket 198 | ||
550 | __SYSCALL(__NR_socket, sys_socket) | ||
551 | #define __NR_socketpair 199 | ||
552 | __SYSCALL(__NR_socketpair, sys_socketpair) | ||
553 | #define __NR_bind 200 | ||
554 | __SYSCALL(__NR_bind, sys_bind) | ||
555 | #define __NR_listen 201 | ||
556 | __SYSCALL(__NR_listen, sys_listen) | ||
557 | #define __NR_accept 202 | ||
558 | __SYSCALL(__NR_accept, sys_accept) | ||
559 | #define __NR_connect 203 | ||
560 | __SYSCALL(__NR_connect, sys_connect) | ||
561 | #define __NR_getsockname 204 | ||
562 | __SYSCALL(__NR_getsockname, sys_getsockname) | ||
563 | #define __NR_getpeername 205 | ||
564 | __SYSCALL(__NR_getpeername, sys_getpeername) | ||
565 | #define __NR_sendto 206 | ||
566 | __SYSCALL(__NR_sendto, sys_sendto) | ||
567 | #define __NR_recvfrom 207 | ||
568 | __SC_COMP(__NR_recvfrom, sys_recvfrom, compat_sys_recvfrom) | ||
569 | #define __NR_setsockopt 208 | ||
570 | __SC_COMP(__NR_setsockopt, sys_setsockopt, compat_sys_setsockopt) | ||
571 | #define __NR_getsockopt 209 | ||
572 | __SC_COMP(__NR_getsockopt, sys_getsockopt, compat_sys_getsockopt) | ||
573 | #define __NR_shutdown 210 | ||
574 | __SYSCALL(__NR_shutdown, sys_shutdown) | ||
575 | #define __NR_sendmsg 211 | ||
576 | __SC_COMP(__NR_sendmsg, sys_sendmsg, compat_sys_sendmsg) | ||
577 | #define __NR_recvmsg 212 | ||
578 | __SC_COMP(__NR_recvmsg, sys_recvmsg, compat_sys_recvmsg) | ||
579 | |||
580 | /* mm/filemap.c */ | ||
581 | #define __NR_readahead 213 | ||
582 | __SC_COMP(__NR_readahead, sys_readahead, compat_sys_readahead) | ||
583 | |||
584 | /* mm/nommu.c, also with MMU */ | ||
585 | #define __NR_brk 214 | ||
586 | __SYSCALL(__NR_brk, sys_brk) | ||
587 | #define __NR_munmap 215 | ||
588 | __SYSCALL(__NR_munmap, sys_munmap) | ||
589 | #define __NR_mremap 216 | ||
590 | __SYSCALL(__NR_mremap, sys_mremap) | ||
591 | |||
592 | /* security/keys/keyctl.c */ | ||
593 | #define __NR_add_key 217 | ||
594 | __SYSCALL(__NR_add_key, sys_add_key) | ||
595 | #define __NR_request_key 218 | ||
596 | __SYSCALL(__NR_request_key, sys_request_key) | ||
597 | #define __NR_keyctl 219 | ||
598 | __SC_COMP(__NR_keyctl, sys_keyctl, compat_sys_keyctl) | ||
599 | |||
600 | /* arch/example/kernel/sys_example.c */ | ||
601 | #define __NR_clone 220 | ||
602 | __SYSCALL(__NR_clone, sys_clone) | ||
603 | #define __NR_execve 221 | ||
604 | __SC_COMP(__NR_execve, sys_execve, compat_sys_execve) | ||
605 | |||
606 | #define __NR3264_mmap 222 | ||
607 | __SC_3264(__NR3264_mmap, sys_mmap2, sys_mmap) | ||
608 | /* mm/fadvise.c */ | ||
609 | #define __NR3264_fadvise64 223 | ||
610 | __SC_COMP(__NR3264_fadvise64, sys_fadvise64_64, compat_sys_fadvise64_64) | ||
611 | |||
612 | /* mm/, CONFIG_MMU only */ | ||
613 | #ifndef __ARCH_NOMMU | ||
614 | #define __NR_swapon 224 | ||
615 | __SYSCALL(__NR_swapon, sys_swapon) | ||
616 | #define __NR_swapoff 225 | ||
617 | __SYSCALL(__NR_swapoff, sys_swapoff) | ||
618 | #define __NR_mprotect 226 | ||
619 | __SYSCALL(__NR_mprotect, sys_mprotect) | ||
620 | #define __NR_msync 227 | ||
621 | __SYSCALL(__NR_msync, sys_msync) | ||
622 | #define __NR_mlock 228 | ||
623 | __SYSCALL(__NR_mlock, sys_mlock) | ||
624 | #define __NR_munlock 229 | ||
625 | __SYSCALL(__NR_munlock, sys_munlock) | ||
626 | #define __NR_mlockall 230 | ||
627 | __SYSCALL(__NR_mlockall, sys_mlockall) | ||
628 | #define __NR_munlockall 231 | ||
629 | __SYSCALL(__NR_munlockall, sys_munlockall) | ||
630 | #define __NR_mincore 232 | ||
631 | __SYSCALL(__NR_mincore, sys_mincore) | ||
632 | #define __NR_madvise 233 | ||
633 | __SYSCALL(__NR_madvise, sys_madvise) | ||
634 | #define __NR_remap_file_pages 234 | ||
635 | __SYSCALL(__NR_remap_file_pages, sys_remap_file_pages) | ||
636 | #define __NR_mbind 235 | ||
637 | __SC_COMP(__NR_mbind, sys_mbind, compat_sys_mbind) | ||
638 | #define __NR_get_mempolicy 236 | ||
639 | __SC_COMP(__NR_get_mempolicy, sys_get_mempolicy, compat_sys_get_mempolicy) | ||
640 | #define __NR_set_mempolicy 237 | ||
641 | __SC_COMP(__NR_set_mempolicy, sys_set_mempolicy, compat_sys_set_mempolicy) | ||
642 | #define __NR_migrate_pages 238 | ||
643 | __SC_COMP(__NR_migrate_pages, sys_migrate_pages, compat_sys_migrate_pages) | ||
644 | #define __NR_move_pages 239 | ||
645 | __SC_COMP(__NR_move_pages, sys_move_pages, compat_sys_move_pages) | ||
646 | #endif | ||
647 | |||
648 | #define __NR_rt_tgsigqueueinfo 240 | ||
649 | __SC_COMP(__NR_rt_tgsigqueueinfo, sys_rt_tgsigqueueinfo, \ | ||
650 | compat_sys_rt_tgsigqueueinfo) | ||
651 | #define __NR_perf_event_open 241 | ||
652 | __SYSCALL(__NR_perf_event_open, sys_perf_event_open) | ||
653 | #define __NR_accept4 242 | ||
654 | __SYSCALL(__NR_accept4, sys_accept4) | ||
655 | #define __NR_recvmmsg 243 | ||
656 | __SC_COMP(__NR_recvmmsg, sys_recvmmsg, compat_sys_recvmmsg) | ||
657 | |||
658 | /* | ||
659 | * Architectures may provide up to 16 syscalls of their own | ||
660 | * starting with this value. | ||
661 | */ | ||
662 | #define __NR_arch_specific_syscall 244 | ||
663 | |||
664 | #define __NR_wait4 260 | ||
665 | __SC_COMP(__NR_wait4, sys_wait4, compat_sys_wait4) | ||
666 | #define __NR_prlimit64 261 | ||
667 | __SYSCALL(__NR_prlimit64, sys_prlimit64) | ||
668 | #define __NR_fanotify_init 262 | ||
669 | __SYSCALL(__NR_fanotify_init, sys_fanotify_init) | ||
670 | #define __NR_fanotify_mark 263 | ||
671 | __SYSCALL(__NR_fanotify_mark, sys_fanotify_mark) | ||
672 | #define __NR_name_to_handle_at 264 | ||
673 | __SYSCALL(__NR_name_to_handle_at, sys_name_to_handle_at) | ||
674 | #define __NR_open_by_handle_at 265 | ||
675 | __SC_COMP(__NR_open_by_handle_at, sys_open_by_handle_at, \ | ||
676 | compat_sys_open_by_handle_at) | ||
677 | #define __NR_clock_adjtime 266 | ||
678 | __SC_COMP(__NR_clock_adjtime, sys_clock_adjtime, compat_sys_clock_adjtime) | ||
679 | #define __NR_syncfs 267 | ||
680 | __SYSCALL(__NR_syncfs, sys_syncfs) | ||
681 | #define __NR_setns 268 | ||
682 | __SYSCALL(__NR_setns, sys_setns) | ||
683 | #define __NR_sendmmsg 269 | ||
684 | __SC_COMP(__NR_sendmmsg, sys_sendmmsg, compat_sys_sendmmsg) | ||
685 | #define __NR_process_vm_readv 270 | ||
686 | __SC_COMP(__NR_process_vm_readv, sys_process_vm_readv, \ | ||
687 | compat_sys_process_vm_readv) | ||
688 | #define __NR_process_vm_writev 271 | ||
689 | __SC_COMP(__NR_process_vm_writev, sys_process_vm_writev, \ | ||
690 | compat_sys_process_vm_writev) | ||
691 | #define __NR_kcmp 272 | ||
692 | __SYSCALL(__NR_kcmp, sys_kcmp) | ||
693 | |||
694 | #undef __NR_syscalls | ||
695 | #define __NR_syscalls 273 | ||
696 | |||
697 | /* | ||
698 | * All syscalls below here should go away really, | ||
699 | * these are provided for both review and as a porting | ||
700 | * help for the C library version. | ||
701 | * | ||
702 | * Last chance: are any of these important enough to | ||
703 | * enable by default? | ||
704 | */ | ||
705 | #ifdef __ARCH_WANT_SYSCALL_NO_AT | ||
706 | #define __NR_open 1024 | ||
707 | __SYSCALL(__NR_open, sys_open) | ||
708 | #define __NR_link 1025 | ||
709 | __SYSCALL(__NR_link, sys_link) | ||
710 | #define __NR_unlink 1026 | ||
711 | __SYSCALL(__NR_unlink, sys_unlink) | ||
712 | #define __NR_mknod 1027 | ||
713 | __SYSCALL(__NR_mknod, sys_mknod) | ||
714 | #define __NR_chmod 1028 | ||
715 | __SYSCALL(__NR_chmod, sys_chmod) | ||
716 | #define __NR_chown 1029 | ||
717 | __SYSCALL(__NR_chown, sys_chown) | ||
718 | #define __NR_mkdir 1030 | ||
719 | __SYSCALL(__NR_mkdir, sys_mkdir) | ||
720 | #define __NR_rmdir 1031 | ||
721 | __SYSCALL(__NR_rmdir, sys_rmdir) | ||
722 | #define __NR_lchown 1032 | ||
723 | __SYSCALL(__NR_lchown, sys_lchown) | ||
724 | #define __NR_access 1033 | ||
725 | __SYSCALL(__NR_access, sys_access) | ||
726 | #define __NR_rename 1034 | ||
727 | __SYSCALL(__NR_rename, sys_rename) | ||
728 | #define __NR_readlink 1035 | ||
729 | __SYSCALL(__NR_readlink, sys_readlink) | ||
730 | #define __NR_symlink 1036 | ||
731 | __SYSCALL(__NR_symlink, sys_symlink) | ||
732 | #define __NR_utimes 1037 | ||
733 | __SYSCALL(__NR_utimes, sys_utimes) | ||
734 | #define __NR3264_stat 1038 | ||
735 | __SC_3264(__NR3264_stat, sys_stat64, sys_newstat) | ||
736 | #define __NR3264_lstat 1039 | ||
737 | __SC_3264(__NR3264_lstat, sys_lstat64, sys_newlstat) | ||
738 | |||
739 | #undef __NR_syscalls | ||
740 | #define __NR_syscalls (__NR3264_lstat+1) | ||
741 | #endif /* __ARCH_WANT_SYSCALL_NO_AT */ | ||
742 | |||
743 | #ifdef __ARCH_WANT_SYSCALL_NO_FLAGS | ||
744 | #define __NR_pipe 1040 | ||
745 | __SYSCALL(__NR_pipe, sys_pipe) | ||
746 | #define __NR_dup2 1041 | ||
747 | __SYSCALL(__NR_dup2, sys_dup2) | ||
748 | #define __NR_epoll_create 1042 | ||
749 | __SYSCALL(__NR_epoll_create, sys_epoll_create) | ||
750 | #define __NR_inotify_init 1043 | ||
751 | __SYSCALL(__NR_inotify_init, sys_inotify_init) | ||
752 | #define __NR_eventfd 1044 | ||
753 | __SYSCALL(__NR_eventfd, sys_eventfd) | ||
754 | #define __NR_signalfd 1045 | ||
755 | __SYSCALL(__NR_signalfd, sys_signalfd) | ||
756 | |||
757 | #undef __NR_syscalls | ||
758 | #define __NR_syscalls (__NR_signalfd+1) | ||
759 | #endif /* __ARCH_WANT_SYSCALL_NO_FLAGS */ | ||
760 | |||
761 | #if (__BITS_PER_LONG == 32 || defined(__SYSCALL_COMPAT)) && \ | ||
762 | defined(__ARCH_WANT_SYSCALL_OFF_T) | ||
763 | #define __NR_sendfile 1046 | ||
764 | __SYSCALL(__NR_sendfile, sys_sendfile) | ||
765 | #define __NR_ftruncate 1047 | ||
766 | __SYSCALL(__NR_ftruncate, sys_ftruncate) | ||
767 | #define __NR_truncate 1048 | ||
768 | __SYSCALL(__NR_truncate, sys_truncate) | ||
769 | #define __NR_stat 1049 | ||
770 | __SYSCALL(__NR_stat, sys_newstat) | ||
771 | #define __NR_lstat 1050 | ||
772 | __SYSCALL(__NR_lstat, sys_newlstat) | ||
773 | #define __NR_fstat 1051 | ||
774 | __SYSCALL(__NR_fstat, sys_newfstat) | ||
775 | #define __NR_fcntl 1052 | ||
776 | __SYSCALL(__NR_fcntl, sys_fcntl) | ||
777 | #define __NR_fadvise64 1053 | ||
778 | #define __ARCH_WANT_SYS_FADVISE64 | ||
779 | __SYSCALL(__NR_fadvise64, sys_fadvise64) | ||
780 | #define __NR_newfstatat 1054 | ||
781 | #define __ARCH_WANT_SYS_NEWFSTATAT | ||
782 | __SYSCALL(__NR_newfstatat, sys_newfstatat) | ||
783 | #define __NR_fstatfs 1055 | ||
784 | __SYSCALL(__NR_fstatfs, sys_fstatfs) | ||
785 | #define __NR_statfs 1056 | ||
786 | __SYSCALL(__NR_statfs, sys_statfs) | ||
787 | #define __NR_lseek 1057 | ||
788 | __SYSCALL(__NR_lseek, sys_lseek) | ||
789 | #define __NR_mmap 1058 | ||
790 | __SYSCALL(__NR_mmap, sys_mmap) | ||
791 | |||
792 | #undef __NR_syscalls | ||
793 | #define __NR_syscalls (__NR_mmap+1) | ||
794 | #endif /* 32 bit off_t syscalls */ | ||
795 | |||
796 | #ifdef __ARCH_WANT_SYSCALL_DEPRECATED | ||
797 | #define __NR_alarm 1059 | ||
798 | #define __ARCH_WANT_SYS_ALARM | ||
799 | __SYSCALL(__NR_alarm, sys_alarm) | ||
800 | #define __NR_getpgrp 1060 | ||
801 | #define __ARCH_WANT_SYS_GETPGRP | ||
802 | __SYSCALL(__NR_getpgrp, sys_getpgrp) | ||
803 | #define __NR_pause 1061 | ||
804 | #define __ARCH_WANT_SYS_PAUSE | ||
805 | __SYSCALL(__NR_pause, sys_pause) | ||
806 | #define __NR_time 1062 | ||
807 | #define __ARCH_WANT_SYS_TIME | ||
808 | #define __ARCH_WANT_COMPAT_SYS_TIME | ||
809 | __SYSCALL(__NR_time, sys_time) | ||
810 | #define __NR_utime 1063 | ||
811 | #define __ARCH_WANT_SYS_UTIME | ||
812 | __SYSCALL(__NR_utime, sys_utime) | ||
813 | |||
814 | #define __NR_creat 1064 | ||
815 | __SYSCALL(__NR_creat, sys_creat) | ||
816 | #define __NR_getdents 1065 | ||
817 | #define __ARCH_WANT_SYS_GETDENTS | ||
818 | __SYSCALL(__NR_getdents, sys_getdents) | ||
819 | #define __NR_futimesat 1066 | ||
820 | __SYSCALL(__NR_futimesat, sys_futimesat) | ||
821 | #define __NR_select 1067 | ||
822 | #define __ARCH_WANT_SYS_SELECT | ||
823 | __SYSCALL(__NR_select, sys_select) | ||
824 | #define __NR_poll 1068 | ||
825 | __SYSCALL(__NR_poll, sys_poll) | ||
826 | #define __NR_epoll_wait 1069 | ||
827 | __SYSCALL(__NR_epoll_wait, sys_epoll_wait) | ||
828 | #define __NR_ustat 1070 | ||
829 | __SYSCALL(__NR_ustat, sys_ustat) | ||
830 | #define __NR_vfork 1071 | ||
831 | __SYSCALL(__NR_vfork, sys_vfork) | ||
832 | #define __NR_oldwait4 1072 | ||
833 | __SYSCALL(__NR_oldwait4, sys_wait4) | ||
834 | #define __NR_recv 1073 | ||
835 | __SYSCALL(__NR_recv, sys_recv) | ||
836 | #define __NR_send 1074 | ||
837 | __SYSCALL(__NR_send, sys_send) | ||
838 | #define __NR_bdflush 1075 | ||
839 | __SYSCALL(__NR_bdflush, sys_bdflush) | ||
840 | #define __NR_umount 1076 | ||
841 | __SYSCALL(__NR_umount, sys_oldumount) | ||
842 | #define __ARCH_WANT_SYS_OLDUMOUNT | ||
843 | #define __NR_uselib 1077 | ||
844 | __SYSCALL(__NR_uselib, sys_uselib) | ||
845 | #define __NR__sysctl 1078 | ||
846 | __SYSCALL(__NR__sysctl, sys_sysctl) | ||
847 | |||
848 | #define __NR_fork 1079 | ||
849 | #ifdef CONFIG_MMU | ||
850 | __SYSCALL(__NR_fork, sys_fork) | ||
851 | #else | ||
852 | __SYSCALL(__NR_fork, sys_ni_syscall) | ||
853 | #endif /* CONFIG_MMU */ | ||
854 | |||
855 | #undef __NR_syscalls | ||
856 | #define __NR_syscalls (__NR_fork+1) | ||
857 | |||
858 | #endif /* __ARCH_WANT_SYSCALL_DEPRECATED */ | ||
859 | |||
860 | /* | ||
861 | * 32 bit systems traditionally used different | ||
862 | * syscalls for off_t and loff_t arguments, while | ||
863 | * 64 bit systems only need the off_t version. | ||
864 | * For new 32 bit platforms, there is no need to | ||
865 | * implement the old 32 bit off_t syscalls, so | ||
866 | * they take different names. | ||
867 | * Here we map the numbers so that both versions | ||
868 | * use the same syscall table layout. | ||
869 | */ | ||
870 | #if __BITS_PER_LONG == 64 && !defined(__SYSCALL_COMPAT) | ||
871 | #define __NR_fcntl __NR3264_fcntl | ||
872 | #define __NR_statfs __NR3264_statfs | ||
873 | #define __NR_fstatfs __NR3264_fstatfs | ||
874 | #define __NR_truncate __NR3264_truncate | ||
875 | #define __NR_ftruncate __NR3264_ftruncate | ||
876 | #define __NR_lseek __NR3264_lseek | ||
877 | #define __NR_sendfile __NR3264_sendfile | ||
878 | #define __NR_newfstatat __NR3264_fstatat | ||
879 | #define __NR_fstat __NR3264_fstat | ||
880 | #define __NR_mmap __NR3264_mmap | ||
881 | #define __NR_fadvise64 __NR3264_fadvise64 | ||
882 | #ifdef __NR3264_stat | ||
883 | #define __NR_stat __NR3264_stat | ||
884 | #define __NR_lstat __NR3264_lstat | ||
885 | #endif | ||
886 | #else | ||
887 | #define __NR_fcntl64 __NR3264_fcntl | ||
888 | #define __NR_statfs64 __NR3264_statfs | ||
889 | #define __NR_fstatfs64 __NR3264_fstatfs | ||
890 | #define __NR_truncate64 __NR3264_truncate | ||
891 | #define __NR_ftruncate64 __NR3264_ftruncate | ||
892 | #define __NR_llseek __NR3264_lseek | ||
893 | #define __NR_sendfile64 __NR3264_sendfile | ||
894 | #define __NR_fstatat64 __NR3264_fstatat | ||
895 | #define __NR_fstat64 __NR3264_fstat | ||
896 | #define __NR_mmap2 __NR3264_mmap | ||
897 | #define __NR_fadvise64_64 __NR3264_fadvise64 | ||
898 | #ifdef __NR3264_stat | ||
899 | #define __NR_stat64 __NR3264_stat | ||
900 | #define __NR_lstat64 __NR3264_lstat | ||
901 | #endif | ||
902 | #endif | ||
diff --git a/security/apparmor/Makefile b/security/apparmor/Makefile index 806bd19af7f2..7b3021cebbea 100644 --- a/security/apparmor/Makefile +++ b/security/apparmor/Makefile | |||
@@ -60,6 +60,6 @@ $(obj)/resource.o : $(obj)/rlim_names.h | |||
60 | $(obj)/capability_names.h : $(srctree)/include/linux/capability.h \ | 60 | $(obj)/capability_names.h : $(srctree)/include/linux/capability.h \ |
61 | $(src)/Makefile | 61 | $(src)/Makefile |
62 | $(call cmd,make-caps) | 62 | $(call cmd,make-caps) |
63 | $(obj)/rlim_names.h : $(srctree)/include/asm-generic/resource.h \ | 63 | $(obj)/rlim_names.h : $(srctree)/include/uapi/asm-generic/resource.h \ |
64 | $(src)/Makefile | 64 | $(src)/Makefile |
65 | $(call cmd,make-rlim) | 65 | $(call cmd,make-rlim) |