aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/alpha/include/asm/Kbuild2
-rw-r--r--arch/avr32/include/asm/Kbuild2
-rw-r--r--arch/cris/include/asm/Kbuild2
-rw-r--r--arch/frv/include/asm/Kbuild1
-rw-r--r--arch/h8300/include/asm/Kbuild2
-rw-r--r--arch/hexagon/include/asm/Kbuild1
-rw-r--r--arch/ia64/include/asm/Kbuild1
-rw-r--r--arch/m32r/include/asm/Kbuild2
-rw-r--r--arch/m68k/include/asm/Kbuild1
-rw-r--r--arch/microblaze/include/asm/Kbuild1
-rw-r--r--arch/mn10300/include/asm/Kbuild2
-rw-r--r--arch/openrisc/include/asm/Kbuild1
-rw-r--r--arch/parisc/include/asm/Kbuild1
-rw-r--r--arch/powerpc/include/asm/Kbuild1
-rw-r--r--arch/s390/include/asm/Kbuild2
-rw-r--r--arch/score/include/asm/Kbuild2
-rw-r--r--arch/sparc/include/asm/Kbuild1
-rw-r--r--arch/tile/include/asm/Kbuild1
-rw-r--r--arch/um/include/asm/Kbuild2
-rw-r--r--arch/unicore32/include/asm/Kbuild1
-rw-r--r--arch/x86/include/asm/Kbuild6
-rw-r--r--arch/xtensa/include/asm/Kbuild2
-rw-r--r--include/asm-generic/Kbuild35
-rw-r--r--include/asm-generic/bitsperlong.h13
-rw-r--r--include/asm-generic/clkdev.h28
-rw-r--r--include/asm-generic/int-l64.h26
-rw-r--r--include/asm-generic/int-ll64.h31
-rw-r--r--include/asm-generic/ioctl.h95
-rw-r--r--include/asm-generic/kvm_para.h5
-rw-r--r--include/asm-generic/param.h17
-rw-r--r--include/asm-generic/resource.h66
-rw-r--r--include/asm-generic/siginfo.h297
-rw-r--r--include/asm-generic/signal.h117
-rw-r--r--include/asm-generic/statfs.h81
-rw-r--r--include/asm-generic/termios.h49
-rw-r--r--include/asm-generic/unistd.h907
-rw-r--r--include/asm-generic/xor.h4
-rw-r--r--include/uapi/asm-generic/Kbuild35
-rw-r--r--include/uapi/asm-generic/auxvec.h (renamed from include/asm-generic/auxvec.h)0
-rw-r--r--include/uapi/asm-generic/bitsperlong.h15
-rw-r--r--include/uapi/asm-generic/errno-base.h (renamed from include/asm-generic/errno-base.h)0
-rw-r--r--include/uapi/asm-generic/errno.h (renamed from include/asm-generic/errno.h)0
-rw-r--r--include/uapi/asm-generic/fcntl.h (renamed from include/asm-generic/fcntl.h)0
-rw-r--r--include/uapi/asm-generic/int-l64.h34
-rw-r--r--include/uapi/asm-generic/int-ll64.h39
-rw-r--r--include/uapi/asm-generic/ioctl.h98
-rw-r--r--include/uapi/asm-generic/ioctls.h (renamed from include/asm-generic/ioctls.h)0
-rw-r--r--include/uapi/asm-generic/ipcbuf.h (renamed from include/asm-generic/ipcbuf.h)0
-rw-r--r--include/uapi/asm-generic/kvm_para.h0
-rw-r--r--include/uapi/asm-generic/mman-common.h (renamed from include/asm-generic/mman-common.h)0
-rw-r--r--include/uapi/asm-generic/mman.h (renamed from include/asm-generic/mman.h)0
-rw-r--r--include/uapi/asm-generic/msgbuf.h (renamed from include/asm-generic/msgbuf.h)0
-rw-r--r--include/uapi/asm-generic/param.h19
-rw-r--r--include/uapi/asm-generic/poll.h (renamed from include/asm-generic/poll.h)0
-rw-r--r--include/uapi/asm-generic/posix_types.h (renamed from include/asm-generic/posix_types.h)0
-rw-r--r--include/uapi/asm-generic/resource.h68
-rw-r--r--include/uapi/asm-generic/sembuf.h (renamed from include/asm-generic/sembuf.h)0
-rw-r--r--include/uapi/asm-generic/setup.h (renamed from include/asm-generic/setup.h)0
-rw-r--r--include/uapi/asm-generic/shmbuf.h (renamed from include/asm-generic/shmbuf.h)0
-rw-r--r--include/uapi/asm-generic/shmparam.h (renamed from include/asm-generic/shmparam.h)0
-rw-r--r--include/uapi/asm-generic/siginfo.h298
-rw-r--r--include/uapi/asm-generic/signal-defs.h (renamed from include/asm-generic/signal-defs.h)0
-rw-r--r--include/uapi/asm-generic/signal.h123
-rw-r--r--include/uapi/asm-generic/socket.h (renamed from include/asm-generic/socket.h)0
-rw-r--r--include/uapi/asm-generic/sockios.h (renamed from include/asm-generic/sockios.h)0
-rw-r--r--include/uapi/asm-generic/stat.h (renamed from include/asm-generic/stat.h)0
-rw-r--r--include/uapi/asm-generic/statfs.h83
-rw-r--r--include/uapi/asm-generic/swab.h (renamed from include/asm-generic/swab.h)0
-rw-r--r--include/uapi/asm-generic/termbits.h (renamed from include/asm-generic/termbits.h)0
-rw-r--r--include/uapi/asm-generic/termios.h50
-rw-r--r--include/uapi/asm-generic/types.h (renamed from include/asm-generic/types.h)0
-rw-r--r--include/uapi/asm-generic/ucontext.h (renamed from include/asm-generic/ucontext.h)0
-rw-r--r--include/uapi/asm-generic/unistd.h902
-rw-r--r--security/apparmor/Makefile2
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 @@
1include include/asm-generic/Kbuild.asm 1include include/asm-generic/Kbuild.asm
2 2
3generic-y += clkdev.h
4
3header-y += compiler.h 5header-y += compiler.h
4header-y += console.h 6header-y += console.h
5header-y += fpu.h 7header-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 @@
1include include/asm-generic/Kbuild.asm 1include include/asm-generic/Kbuild.asm
2 2
3generic-y += clkdev.h
4
3header-y += cachectl.h 5header-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
7header-y += etraxgpio.h 7header-y += etraxgpio.h
8header-y += rs485.h 8header-y += rs485.h
9header-y += sync_serial.h 9header-y += sync_serial.h
10
11generic-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
3header-y += registers.h 3header-y += registers.h
4header-y += termios.h 4header-y += termios.h
5generic-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 @@
1include include/asm-generic/Kbuild.asm 1include include/asm-generic/Kbuild.asm
2
3generic-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
7generic-y += auxvec.h 7generic-y += auxvec.h
8generic-y += bug.h 8generic-y += bug.h
9generic-y += bugs.h 9generic-y += bugs.h
10generic-y += clkdev.h
10generic-y += cputime.h 11generic-y += cputime.h
11generic-y += current.h 12generic-y += current.h
12generic-y += device.h 13generic-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
13header-y += rse.h 13header-y += rse.h
14header-y += ucontext.h 14header-y += ucontext.h
15header-y += ustack.h 15header-y += ustack.h
16generic-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 @@
1include include/asm-generic/Kbuild.asm 1include include/asm-generic/Kbuild.asm
2
3generic-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
2header-y += cachectl.h 2header-y += cachectl.h
3 3
4generic-y += bitsperlong.h 4generic-y += bitsperlong.h
5generic-y += clkdev.h
5generic-y += cputime.h 6generic-y += cputime.h
6generic-y += device.h 7generic-y += device.h
7generic-y += emergency-restart.h 8generic-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 @@
1include include/asm-generic/Kbuild.asm 1include include/asm-generic/Kbuild.asm
2 2
3header-y += elf.h 3header-y += elf.h
4generic-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 @@
1include include/asm-generic/Kbuild.asm 1include include/asm-generic/Kbuild.asm
2
3generic-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
11generic-y += bugs.h 11generic-y += bugs.h
12generic-y += cacheflush.h 12generic-y += cacheflush.h
13generic-y += checksum.h 13generic-y += checksum.h
14generic-y += clkdev.h
14generic-y += cmpxchg.h 15generic-y += cmpxchg.h
15generic-y += cmpxchg-local.h 16generic-y += cmpxchg-local.h
16generic-y += cputime.h 17generic-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 @@
1include include/asm-generic/Kbuild.asm 1include include/asm-generic/Kbuild.asm
2 2
3header-y += pdc.h 3header-y += pdc.h
4generic-y += clkdev.h
4generic-y += word-at-a-time.h 5generic-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
35header-y += ucontext.h 35header-y += ucontext.h
36header-y += unistd.h 36header-y += unistd.h
37 37
38generic-y += clkdev.h
38generic-y += rwsem.h 39generic-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
13header-y += ucontext.h 13header-y += ucontext.h
14header-y += vtoc.h 14header-y += vtoc.h
15header-y += zcrypt.h 15header-y += zcrypt.h
16
17generic-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 @@
1include include/asm-generic/Kbuild.asm 1include include/asm-generic/Kbuild.asm
2 2
3header-y += 3header-y +=
4
5generic-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
17header-y += utrap.h 17header-y += utrap.h
18header-y += watchdog.h 18header-y += watchdog.h
19 19
20generic-y += clkdev.h
20generic-y += div64.h 21generic-y += div64.h
21generic-y += local64.h 22generic-y += local64.h
22generic-y += irq_regs.h 23generic-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
9generic-y += bug.h 9generic-y += bug.h
10generic-y += bugs.h 10generic-y += bugs.h
11generic-y += clkdev.h
11generic-y += cputime.h 12generic-y += cputime.h
12generic-y += div64.h 13generic-y += div64.h
13generic-y += emergency-restart.h 14generic-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 @@
1generic-y += bug.h cputime.h device.h emergency-restart.h futex.h hardirq.h 1generic-y += bug.h cputime.h device.h emergency-restart.h futex.h hardirq.h
2generic-y += hw_irq.h irq_regs.h kdebug.h percpu.h sections.h topology.h xor.h 2generic-y += hw_irq.h irq_regs.h kdebug.h percpu.h sections.h topology.h xor.h
3generic-y += ftrace.h pci.h io.h param.h delay.h mutex.h current.h exec.h 3generic-y += ftrace.h pci.h io.h param.h delay.h mutex.h current.h exec.h
4generic-y += switch_to.h 4generic-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
4generic-y += auxvec.h 4generic-y += auxvec.h
5generic-y += bitsperlong.h 5generic-y += bitsperlong.h
6generic-y += bugs.h 6generic-y += bugs.h
7generic-y += clkdev.h
7generic-y += cputime.h 8generic-y += cputime.h
8generic-y += current.h 9generic-y += current.h
9generic-y += device.h 10generic-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
22header-y += ucontext.h 22header-y += ucontext.h
23header-y += vm86.h 23header-y += vm86.h
24header-y += vsyscall.h 24header-y += vsyscall.h
25
26genhdr-y += unistd_32.h
27genhdr-y += unistd_64.h
28genhdr-y += unistd_x32.h
29
30generic-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 @@
1include include/asm-generic/Kbuild.asm 1include include/asm-generic/Kbuild.asm
2
3generic-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 @@
1header-y += auxvec.h
2header-y += bitsperlong.h
3header-y += errno-base.h
4header-y += errno.h
5header-y += fcntl.h
6header-y += int-l64.h
7header-y += int-ll64.h
8header-y += ioctl.h
9header-y += ioctls.h
10header-y += ipcbuf.h
11header-y += kvm_para.h
12header-y += mman-common.h
13header-y += mman.h
14header-y += msgbuf.h
15header-y += param.h
16header-y += poll.h
17header-y += posix_types.h
18header-y += resource.h
19header-y += sembuf.h
20header-y += setup.h
21header-y += shmbuf.h
22header-y += shmparam.h
23header-y += siginfo.h
24header-y += signal-defs.h
25header-y += signal.h
26header-y += socket.h
27header-y += sockios.h
28header-y += stat.h
29header-y += statfs.h
30header-y += swab.h
31header-y += termbits.h
32header-y += termios.h
33header-y += types.h
34header-y += ucontext.h
35header-y += unistd.h
diff --git a/include/asm-generic/bitsperlong.h b/include/asm-generic/bitsperlong.h
index a7b0914348fd..d1d70aa19021 100644
--- a/include/asm-generic/bitsperlong.h
+++ b/include/asm-generic/bitsperlong.h
@@ -1,18 +1,8 @@
1#ifndef __ASM_GENERIC_BITS_PER_LONG 1#ifndef __ASM_GENERIC_BITS_PER_LONG
2#define __ASM_GENERIC_BITS_PER_LONG 2#define __ASM_GENERIC_BITS_PER_LONG
3 3
4/* 4#include <uapi/asm-generic/bitsperlong.h>
5 * There seems to be no way of detecting this automatically from user
6 * space, so 64 bit architectures should override this in their
7 * bitsperlong.h. In particular, an architecture that supports
8 * both 32 and 64 bit user space must not rely on CONFIG_64BIT
9 * to decide it, but rather check a compiler provided macro.
10 */
11#ifndef __BITS_PER_LONG
12#define __BITS_PER_LONG 32
13#endif
14 5
15#ifdef __KERNEL__
16 6
17#ifdef CONFIG_64BIT 7#ifdef CONFIG_64BIT
18#define BITS_PER_LONG 64 8#define BITS_PER_LONG 64
@@ -32,5 +22,4 @@
32#define BITS_PER_LONG_LONG 64 22#define BITS_PER_LONG_LONG 64
33#endif 23#endif
34 24
35#endif /* __KERNEL__ */
36#endif /* __ASM_GENERIC_BITS_PER_LONG */ 25#endif /* __ASM_GENERIC_BITS_PER_LONG */
diff --git a/include/asm-generic/clkdev.h b/include/asm-generic/clkdev.h
new file mode 100644
index 000000000000..90a32a61dd21
--- /dev/null
+++ b/include/asm-generic/clkdev.h
@@ -0,0 +1,28 @@
1/*
2 * include/asm-generic/clkdev.h
3 *
4 * Based on the ARM clkdev.h:
5 * Copyright (C) 2008 Russell King.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 *
11 * Helper for the clk API to assist looking up a struct clk.
12 */
13#ifndef __ASM_CLKDEV_H
14#define __ASM_CLKDEV_H
15
16#include <linux/slab.h>
17
18struct clk;
19
20static inline int __clk_get(struct clk *clk) { return 1; }
21static inline void __clk_put(struct clk *clk) { }
22
23static inline struct clk_lookup_alloc *__clkdev_alloc(size_t size)
24{
25 return kzalloc(size, GFP_KERNEL);
26}
27
28#endif
diff --git a/include/asm-generic/int-l64.h b/include/asm-generic/int-l64.h
index 1ca3efc976cc..27d4ec0dfce0 100644
--- a/include/asm-generic/int-l64.h
+++ b/include/asm-generic/int-l64.h
@@ -4,33 +4,11 @@
4 * Integer declarations for architectures which use "long" 4 * Integer declarations for architectures which use "long"
5 * for 64-bit types. 5 * for 64-bit types.
6 */ 6 */
7
8#ifndef _ASM_GENERIC_INT_L64_H 7#ifndef _ASM_GENERIC_INT_L64_H
9#define _ASM_GENERIC_INT_L64_H 8#define _ASM_GENERIC_INT_L64_H
10 9
11#include <asm/bitsperlong.h> 10#include <uapi/asm-generic/int-l64.h>
12
13#ifndef __ASSEMBLY__
14/*
15 * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the
16 * header files exported to user space
17 */
18
19typedef __signed__ char __s8;
20typedef unsigned char __u8;
21 11
22typedef __signed__ short __s16;
23typedef unsigned short __u16;
24
25typedef __signed__ int __s32;
26typedef unsigned int __u32;
27
28typedef __signed__ long __s64;
29typedef unsigned long __u64;
30
31#endif /* __ASSEMBLY__ */
32
33#ifdef __KERNEL__
34 12
35#ifndef __ASSEMBLY__ 13#ifndef __ASSEMBLY__
36 14
@@ -68,6 +46,4 @@ typedef unsigned long u64;
68 46
69#endif /* __ASSEMBLY__ */ 47#endif /* __ASSEMBLY__ */
70 48
71#endif /* __KERNEL__ */
72
73#endif /* _ASM_GENERIC_INT_L64_H */ 49#endif /* _ASM_GENERIC_INT_L64_H */
diff --git a/include/asm-generic/int-ll64.h b/include/asm-generic/int-ll64.h
index f394147c0739..4cd84855cb46 100644
--- a/include/asm-generic/int-ll64.h
+++ b/include/asm-generic/int-ll64.h
@@ -4,38 +4,11 @@
4 * Integer declarations for architectures which use "long long" 4 * Integer declarations for architectures which use "long long"
5 * for 64-bit types. 5 * for 64-bit types.
6 */ 6 */
7
8#ifndef _ASM_GENERIC_INT_LL64_H 7#ifndef _ASM_GENERIC_INT_LL64_H
9#define _ASM_GENERIC_INT_LL64_H 8#define _ASM_GENERIC_INT_LL64_H
10 9
11#include <asm/bitsperlong.h> 10#include <uapi/asm-generic/int-ll64.h>
12
13#ifndef __ASSEMBLY__
14/*
15 * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the
16 * header files exported to user space
17 */
18
19typedef __signed__ char __s8;
20typedef unsigned char __u8;
21 11
22typedef __signed__ short __s16;
23typedef unsigned short __u16;
24
25typedef __signed__ int __s32;
26typedef unsigned int __u32;
27
28#ifdef __GNUC__
29__extension__ typedef __signed__ long long __s64;
30__extension__ typedef unsigned long long __u64;
31#else
32typedef __signed__ long long __s64;
33typedef unsigned long long __u64;
34#endif
35
36#endif /* __ASSEMBLY__ */
37
38#ifdef __KERNEL__
39 12
40#ifndef __ASSEMBLY__ 13#ifndef __ASSEMBLY__
41 14
@@ -73,6 +46,4 @@ typedef unsigned long long u64;
73 46
74#endif /* __ASSEMBLY__ */ 47#endif /* __ASSEMBLY__ */
75 48
76#endif /* __KERNEL__ */
77
78#endif /* _ASM_GENERIC_INT_LL64_H */ 49#endif /* _ASM_GENERIC_INT_LL64_H */
diff --git a/include/asm-generic/ioctl.h b/include/asm-generic/ioctl.h
index 15828b2d663c..d17295b290fa 100644
--- a/include/asm-generic/ioctl.h
+++ b/include/asm-generic/ioctl.h
@@ -1,105 +1,12 @@
1#ifndef _ASM_GENERIC_IOCTL_H 1#ifndef _ASM_GENERIC_IOCTL_H
2#define _ASM_GENERIC_IOCTL_H 2#define _ASM_GENERIC_IOCTL_H
3 3
4/* ioctl command encoding: 32 bits total, command in lower 16 bits, 4#include <uapi/asm-generic/ioctl.h>
5 * size of the parameter structure in the lower 14 bits of the
6 * upper 16 bits.
7 * Encoding the size of the parameter structure in the ioctl request
8 * is useful for catching programs compiled with old versions
9 * and to avoid overwriting user space outside the user buffer area.
10 * The highest 2 bits are reserved for indicating the ``access mode''.
11 * NOTE: This limits the max parameter size to 16kB -1 !
12 */
13 5
14/*
15 * The following is for compatibility across the various Linux
16 * platforms. The generic ioctl numbering scheme doesn't really enforce
17 * a type field. De facto, however, the top 8 bits of the lower 16
18 * bits are indeed used as a type field, so we might just as well make
19 * this explicit here. Please be sure to use the decoding macros
20 * below from now on.
21 */
22#define _IOC_NRBITS 8
23#define _IOC_TYPEBITS 8
24
25/*
26 * Let any architecture override either of the following before
27 * including this file.
28 */
29
30#ifndef _IOC_SIZEBITS
31# define _IOC_SIZEBITS 14
32#endif
33
34#ifndef _IOC_DIRBITS
35# define _IOC_DIRBITS 2
36#endif
37
38#define _IOC_NRMASK ((1 << _IOC_NRBITS)-1)
39#define _IOC_TYPEMASK ((1 << _IOC_TYPEBITS)-1)
40#define _IOC_SIZEMASK ((1 << _IOC_SIZEBITS)-1)
41#define _IOC_DIRMASK ((1 << _IOC_DIRBITS)-1)
42
43#define _IOC_NRSHIFT 0
44#define _IOC_TYPESHIFT (_IOC_NRSHIFT+_IOC_NRBITS)
45#define _IOC_SIZESHIFT (_IOC_TYPESHIFT+_IOC_TYPEBITS)
46#define _IOC_DIRSHIFT (_IOC_SIZESHIFT+_IOC_SIZEBITS)
47
48/*
49 * Direction bits, which any architecture can choose to override
50 * before including this file.
51 */
52
53#ifndef _IOC_NONE
54# define _IOC_NONE 0U
55#endif
56
57#ifndef _IOC_WRITE
58# define _IOC_WRITE 1U
59#endif
60
61#ifndef _IOC_READ
62# define _IOC_READ 2U
63#endif
64
65#define _IOC(dir,type,nr,size) \
66 (((dir) << _IOC_DIRSHIFT) | \
67 ((type) << _IOC_TYPESHIFT) | \
68 ((nr) << _IOC_NRSHIFT) | \
69 ((size) << _IOC_SIZESHIFT))
70
71#ifdef __KERNEL__
72/* provoke compile error for invalid uses of size argument */ 6/* provoke compile error for invalid uses of size argument */
73extern unsigned int __invalid_size_argument_for_IOC; 7extern unsigned int __invalid_size_argument_for_IOC;
74#define _IOC_TYPECHECK(t) \ 8#define _IOC_TYPECHECK(t) \
75 ((sizeof(t) == sizeof(t[1]) && \ 9 ((sizeof(t) == sizeof(t[1]) && \
76 sizeof(t) < (1 << _IOC_SIZEBITS)) ? \ 10 sizeof(t) < (1 << _IOC_SIZEBITS)) ? \
77 sizeof(t) : __invalid_size_argument_for_IOC) 11 sizeof(t) : __invalid_size_argument_for_IOC)
78#else
79#define _IOC_TYPECHECK(t) (sizeof(t))
80#endif
81
82/* used to create numbers */
83#define _IO(type,nr) _IOC(_IOC_NONE,(type),(nr),0)
84#define _IOR(type,nr,size) _IOC(_IOC_READ,(type),(nr),(_IOC_TYPECHECK(size)))
85#define _IOW(type,nr,size) _IOC(_IOC_WRITE,(type),(nr),(_IOC_TYPECHECK(size)))
86#define _IOWR(type,nr,size) _IOC(_IOC_READ|_IOC_WRITE,(type),(nr),(_IOC_TYPECHECK(size)))
87#define _IOR_BAD(type,nr,size) _IOC(_IOC_READ,(type),(nr),sizeof(size))
88#define _IOW_BAD(type,nr,size) _IOC(_IOC_WRITE,(type),(nr),sizeof(size))
89#define _IOWR_BAD(type,nr,size) _IOC(_IOC_READ|_IOC_WRITE,(type),(nr),sizeof(size))
90
91/* used to decode ioctl numbers.. */
92#define _IOC_DIR(nr) (((nr) >> _IOC_DIRSHIFT) & _IOC_DIRMASK)
93#define _IOC_TYPE(nr) (((nr) >> _IOC_TYPESHIFT) & _IOC_TYPEMASK)
94#define _IOC_NR(nr) (((nr) >> _IOC_NRSHIFT) & _IOC_NRMASK)
95#define _IOC_SIZE(nr) (((nr) >> _IOC_SIZESHIFT) & _IOC_SIZEMASK)
96
97/* ...and for the drivers/sound files... */
98
99#define IOC_IN (_IOC_WRITE << _IOC_DIRSHIFT)
100#define IOC_OUT (_IOC_READ << _IOC_DIRSHIFT)
101#define IOC_INOUT ((_IOC_WRITE|_IOC_READ) << _IOC_DIRSHIFT)
102#define IOCSIZE_MASK (_IOC_SIZEMASK << _IOC_SIZESHIFT)
103#define IOCSIZE_SHIFT (_IOC_SIZESHIFT)
104
105#endif /* _ASM_GENERIC_IOCTL_H */ 12#endif /* _ASM_GENERIC_IOCTL_H */
diff --git a/include/asm-generic/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
7typedef union sigval {
8 int sival_int;
9 void __user *sival_ptr;
10} sigval_t;
11
12/*
13 * This is the size (including padding) of the part of the
14 * struct siginfo that is before the union.
15 */
16#ifndef __ARCH_SI_PREAMBLE_SIZE
17#define __ARCH_SI_PREAMBLE_SIZE (3 * sizeof(int))
18#endif
19
20#define SI_MAX_SIZE 128
21#ifndef SI_PAD_SIZE
22#define SI_PAD_SIZE ((SI_MAX_SIZE - __ARCH_SI_PREAMBLE_SIZE) / sizeof(int))
23#endif
24
25#ifndef __ARCH_SI_UID_T
26#define __ARCH_SI_UID_T __kernel_uid32_t
27#endif
28
29/*
30 * The default "si_band" type is "long", as specified by POSIX.
31 * However, some architectures want to override this to "int"
32 * for historical compatibility reasons, so we allow that.
33 */
34#ifndef __ARCH_SI_BAND_T
35#define __ARCH_SI_BAND_T long
36#endif
37
38#ifndef __ARCH_SI_CLOCK_T
39#define __ARCH_SI_CLOCK_T __kernel_clock_t
40#endif
41
42#ifndef __ARCH_SI_ATTRIBUTES
43#define __ARCH_SI_ATTRIBUTES
44#endif
45
46#ifndef HAVE_ARCH_SIGINFO_T
47
48typedef struct siginfo {
49 int si_signo;
50 int si_errno;
51 int si_code;
52
53 union {
54 int _pad[SI_PAD_SIZE];
55
56 /* kill() */
57 struct {
58 __kernel_pid_t _pid; /* sender's pid */
59 __ARCH_SI_UID_T _uid; /* sender's uid */
60 } _kill;
61
62 /* POSIX.1b timers */
63 struct {
64 __kernel_timer_t _tid; /* timer id */
65 int _overrun; /* overrun count */
66 char _pad[sizeof( __ARCH_SI_UID_T) - sizeof(int)];
67 sigval_t _sigval; /* same as below */
68 int _sys_private; /* not to be passed to user */
69 } _timer;
70
71 /* POSIX.1b signals */
72 struct {
73 __kernel_pid_t _pid; /* sender's pid */
74 __ARCH_SI_UID_T _uid; /* sender's uid */
75 sigval_t _sigval;
76 } _rt;
77
78 /* SIGCHLD */
79 struct {
80 __kernel_pid_t _pid; /* which child */
81 __ARCH_SI_UID_T _uid; /* sender's uid */
82 int _status; /* exit code */
83 __ARCH_SI_CLOCK_T _utime;
84 __ARCH_SI_CLOCK_T _stime;
85 } _sigchld;
86
87 /* SIGILL, SIGFPE, SIGSEGV, SIGBUS */
88 struct {
89 void __user *_addr; /* faulting insn/memory ref. */
90#ifdef __ARCH_SI_TRAPNO
91 int _trapno; /* TRAP # which caused the signal */
92#endif
93 short _addr_lsb; /* LSB of the reported address */
94 } _sigfault;
95
96 /* SIGPOLL */
97 struct {
98 __ARCH_SI_BAND_T _band; /* POLL_IN, POLL_OUT, POLL_MSG */
99 int _fd;
100 } _sigpoll;
101
102 /* SIGSYS */
103 struct {
104 void __user *_call_addr; /* calling user insn */
105 int _syscall; /* triggering system call number */
106 unsigned int _arch; /* AUDIT_ARCH_* of syscall */
107 } _sigsys;
108 } _sifields;
109} __ARCH_SI_ATTRIBUTES siginfo_t;
110
111/* If the arch shares siginfo, then it has SIGSYS. */
112#define __ARCH_SIGSYS
113#endif
114
115/*
116 * How these fields are to be accessed.
117 */
118#define si_pid _sifields._kill._pid
119#define si_uid _sifields._kill._uid
120#define si_tid _sifields._timer._tid
121#define si_overrun _sifields._timer._overrun
122#define si_sys_private _sifields._timer._sys_private
123#define si_status _sifields._sigchld._status
124#define si_utime _sifields._sigchld._utime
125#define si_stime _sifields._sigchld._stime
126#define si_value _sifields._rt._sigval
127#define si_int _sifields._rt._sigval.sival_int
128#define si_ptr _sifields._rt._sigval.sival_ptr
129#define si_addr _sifields._sigfault._addr
130#ifdef __ARCH_SI_TRAPNO
131#define si_trapno _sifields._sigfault._trapno
132#endif
133#define si_addr_lsb _sifields._sigfault._addr_lsb
134#define si_band _sifields._sigpoll._band
135#define si_fd _sifields._sigpoll._fd
136#ifdef __ARCH_SIGSYS
137#define si_call_addr _sifields._sigsys._call_addr
138#define si_syscall _sifields._sigsys._syscall
139#define si_arch _sifields._sigsys._arch
140#endif
141
142#ifdef __KERNEL__
143#define __SI_MASK 0xffff0000u 6#define __SI_MASK 0xffff0000u
144#define __SI_KILL (0 << 16) 7#define __SI_KILL (0 << 16)
145#define __SI_TIMER (1 << 16) 8#define __SI_TIMER (1 << 16)
@@ -150,162 +13,6 @@ typedef struct siginfo {
150#define __SI_MESGQ (6 << 16) 13#define __SI_MESGQ (6 << 16)
151#define __SI_SYS (7 << 16) 14#define __SI_SYS (7 << 16)
152#define __SI_CODE(T,N) ((T) | ((N) & 0xffff)) 15#define __SI_CODE(T,N) ((T) | ((N) & 0xffff))
153#else
154#define __SI_KILL 0
155#define __SI_TIMER 0
156#define __SI_POLL 0
157#define __SI_FAULT 0
158#define __SI_CHLD 0
159#define __SI_RT 0
160#define __SI_MESGQ 0
161#define __SI_SYS 0
162#define __SI_CODE(T,N) (N)
163#endif
164
165/*
166 * si_code values
167 * Digital reserves positive values for kernel-generated signals.
168 */
169#define SI_USER 0 /* sent by kill, sigsend, raise */
170#define SI_KERNEL 0x80 /* sent by the kernel from somewhere */
171#define SI_QUEUE -1 /* sent by sigqueue */
172#define SI_TIMER __SI_CODE(__SI_TIMER,-2) /* sent by timer expiration */
173#define SI_MESGQ __SI_CODE(__SI_MESGQ,-3) /* sent by real time mesq state change */
174#define SI_ASYNCIO -4 /* sent by AIO completion */
175#define SI_SIGIO -5 /* sent by queued SIGIO */
176#define SI_TKILL -6 /* sent by tkill system call */
177#define SI_DETHREAD -7 /* sent by execve() killing subsidiary threads */
178
179#define SI_FROMUSER(siptr) ((siptr)->si_code <= 0)
180#define SI_FROMKERNEL(siptr) ((siptr)->si_code > 0)
181
182/*
183 * SIGILL si_codes
184 */
185#define ILL_ILLOPC (__SI_FAULT|1) /* illegal opcode */
186#define ILL_ILLOPN (__SI_FAULT|2) /* illegal operand */
187#define ILL_ILLADR (__SI_FAULT|3) /* illegal addressing mode */
188#define ILL_ILLTRP (__SI_FAULT|4) /* illegal trap */
189#define ILL_PRVOPC (__SI_FAULT|5) /* privileged opcode */
190#define ILL_PRVREG (__SI_FAULT|6) /* privileged register */
191#define ILL_COPROC (__SI_FAULT|7) /* coprocessor error */
192#define ILL_BADSTK (__SI_FAULT|8) /* internal stack error */
193#define NSIGILL 8
194
195/*
196 * SIGFPE si_codes
197 */
198#define FPE_INTDIV (__SI_FAULT|1) /* integer divide by zero */
199#define FPE_INTOVF (__SI_FAULT|2) /* integer overflow */
200#define FPE_FLTDIV (__SI_FAULT|3) /* floating point divide by zero */
201#define FPE_FLTOVF (__SI_FAULT|4) /* floating point overflow */
202#define FPE_FLTUND (__SI_FAULT|5) /* floating point underflow */
203#define FPE_FLTRES (__SI_FAULT|6) /* floating point inexact result */
204#define FPE_FLTINV (__SI_FAULT|7) /* floating point invalid operation */
205#define FPE_FLTSUB (__SI_FAULT|8) /* subscript out of range */
206#define NSIGFPE 8
207
208/*
209 * SIGSEGV si_codes
210 */
211#define SEGV_MAPERR (__SI_FAULT|1) /* address not mapped to object */
212#define SEGV_ACCERR (__SI_FAULT|2) /* invalid permissions for mapped object */
213#define NSIGSEGV 2
214
215/*
216 * SIGBUS si_codes
217 */
218#define BUS_ADRALN (__SI_FAULT|1) /* invalid address alignment */
219#define BUS_ADRERR (__SI_FAULT|2) /* non-existent physical address */
220#define BUS_OBJERR (__SI_FAULT|3) /* object specific hardware error */
221/* hardware memory error consumed on a machine check: action required */
222#define BUS_MCEERR_AR (__SI_FAULT|4)
223/* hardware memory error detected in process but not consumed: action optional*/
224#define BUS_MCEERR_AO (__SI_FAULT|5)
225#define NSIGBUS 5
226
227/*
228 * SIGTRAP si_codes
229 */
230#define TRAP_BRKPT (__SI_FAULT|1) /* process breakpoint */
231#define TRAP_TRACE (__SI_FAULT|2) /* process trace trap */
232#define TRAP_BRANCH (__SI_FAULT|3) /* process taken branch trap */
233#define TRAP_HWBKPT (__SI_FAULT|4) /* hardware breakpoint/watchpoint */
234#define NSIGTRAP 4
235
236/*
237 * SIGCHLD si_codes
238 */
239#define CLD_EXITED (__SI_CHLD|1) /* child has exited */
240#define CLD_KILLED (__SI_CHLD|2) /* child was killed */
241#define CLD_DUMPED (__SI_CHLD|3) /* child terminated abnormally */
242#define CLD_TRAPPED (__SI_CHLD|4) /* traced child has trapped */
243#define CLD_STOPPED (__SI_CHLD|5) /* child has stopped */
244#define CLD_CONTINUED (__SI_CHLD|6) /* stopped child has continued */
245#define NSIGCHLD 6
246
247/*
248 * SIGPOLL si_codes
249 */
250#define POLL_IN (__SI_POLL|1) /* data input available */
251#define POLL_OUT (__SI_POLL|2) /* output buffers available */
252#define POLL_MSG (__SI_POLL|3) /* input message available */
253#define POLL_ERR (__SI_POLL|4) /* i/o error */
254#define POLL_PRI (__SI_POLL|5) /* high priority input available */
255#define POLL_HUP (__SI_POLL|6) /* device disconnected */
256#define NSIGPOLL 6
257
258/*
259 * SIGSYS si_codes
260 */
261#define SYS_SECCOMP (__SI_SYS|1) /* seccomp triggered */
262#define NSIGSYS 1
263
264/*
265 * sigevent definitions
266 *
267 * It seems likely that SIGEV_THREAD will have to be handled from
268 * userspace, libpthread transmuting it to SIGEV_SIGNAL, which the
269 * thread manager then catches and does the appropriate nonsense.
270 * However, everything is written out here so as to not get lost.
271 */
272#define SIGEV_SIGNAL 0 /* notify via signal */
273#define SIGEV_NONE 1 /* other notification: meaningless */
274#define SIGEV_THREAD 2 /* deliver via thread creation */
275#define SIGEV_THREAD_ID 4 /* deliver to thread */
276
277/*
278 * This works because the alignment is ok on all current architectures
279 * but we leave open this being overridden in the future
280 */
281#ifndef __ARCH_SIGEV_PREAMBLE_SIZE
282#define __ARCH_SIGEV_PREAMBLE_SIZE (sizeof(int) * 2 + sizeof(sigval_t))
283#endif
284
285#define SIGEV_MAX_SIZE 64
286#define SIGEV_PAD_SIZE ((SIGEV_MAX_SIZE - __ARCH_SIGEV_PREAMBLE_SIZE) \
287 / sizeof(int))
288
289typedef struct sigevent {
290 sigval_t sigev_value;
291 int sigev_signo;
292 int sigev_notify;
293 union {
294 int _pad[SIGEV_PAD_SIZE];
295 int _tid;
296
297 struct {
298 void (*_function)(sigval_t);
299 void *_attribute; /* really pthread_attr_t */
300 } _sigev_thread;
301 } _sigev_un;
302} sigevent_t;
303
304#define sigev_notify_function _sigev_un._sigev_thread._function
305#define sigev_notify_attributes _sigev_un._sigev_thread._attribute
306#define sigev_notify_thread_id _sigev_un._tid
307
308#ifdef __KERNEL__
309 16
310struct siginfo; 17struct siginfo;
311void do_schedule_next_timer(struct siginfo *info); 18void do_schedule_next_timer(struct siginfo *info);
@@ -327,6 +34,4 @@ static inline void copy_siginfo(struct siginfo *to, struct siginfo *from)
327 34
328extern int copy_siginfo_to_user(struct siginfo __user *to, struct siginfo *from); 35extern int copy_siginfo_to_user(struct siginfo __user *to, struct siginfo *from);
329 36
330#endif /* __KERNEL__ */
331
332#endif 37#endif
diff --git a/include/asm-generic/signal.h b/include/asm-generic/signal.h
index 555c0aee8a47..98caa306122a 100644
--- a/include/asm-generic/signal.h
+++ b/include/asm-generic/signal.h
@@ -1,131 +1,16 @@
1#ifndef __ASM_GENERIC_SIGNAL_H 1#ifndef __ASM_GENERIC_SIGNAL_H
2#define __ASM_GENERIC_SIGNAL_H 2#define __ASM_GENERIC_SIGNAL_H
3 3
4#include <linux/types.h> 4#include <uapi/asm-generic/signal.h>
5
6#define _NSIG 64
7#define _NSIG_BPW __BITS_PER_LONG
8#define _NSIG_WORDS (_NSIG / _NSIG_BPW)
9
10#define SIGHUP 1
11#define SIGINT 2
12#define SIGQUIT 3
13#define SIGILL 4
14#define SIGTRAP 5
15#define SIGABRT 6
16#define SIGIOT 6
17#define SIGBUS 7
18#define SIGFPE 8
19#define SIGKILL 9
20#define SIGUSR1 10
21#define SIGSEGV 11
22#define SIGUSR2 12
23#define SIGPIPE 13
24#define SIGALRM 14
25#define SIGTERM 15
26#define SIGSTKFLT 16
27#define SIGCHLD 17
28#define SIGCONT 18
29#define SIGSTOP 19
30#define SIGTSTP 20
31#define SIGTTIN 21
32#define SIGTTOU 22
33#define SIGURG 23
34#define SIGXCPU 24
35#define SIGXFSZ 25
36#define SIGVTALRM 26
37#define SIGPROF 27
38#define SIGWINCH 28
39#define SIGIO 29
40#define SIGPOLL SIGIO
41/*
42#define SIGLOST 29
43*/
44#define SIGPWR 30
45#define SIGSYS 31
46#define SIGUNUSED 31
47
48/* These should not be considered constants from userland. */
49#define SIGRTMIN 32
50#ifndef SIGRTMAX
51#define SIGRTMAX _NSIG
52#endif
53
54/*
55 * SA_FLAGS values:
56 *
57 * SA_ONSTACK indicates that a registered stack_t will be used.
58 * SA_RESTART flag to get restarting signals (which were the default long ago)
59 * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop.
60 * SA_RESETHAND clears the handler when the signal is delivered.
61 * SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies.
62 * SA_NODEFER prevents the current signal from being masked in the handler.
63 *
64 * SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single
65 * Unix names RESETHAND and NODEFER respectively.
66 */
67#define SA_NOCLDSTOP 0x00000001
68#define SA_NOCLDWAIT 0x00000002
69#define SA_SIGINFO 0x00000004
70#define SA_ONSTACK 0x08000000
71#define SA_RESTART 0x10000000
72#define SA_NODEFER 0x40000000
73#define SA_RESETHAND 0x80000000
74
75#define SA_NOMASK SA_NODEFER
76#define SA_ONESHOT SA_RESETHAND
77
78/*
79 * New architectures should not define the obsolete
80 * SA_RESTORER 0x04000000
81 */
82
83/*
84 * sigaltstack controls
85 */
86#define SS_ONSTACK 1
87#define SS_DISABLE 2
88
89#define MINSIGSTKSZ 2048
90#define SIGSTKSZ 8192
91 5
92#ifndef __ASSEMBLY__ 6#ifndef __ASSEMBLY__
93typedef struct {
94 unsigned long sig[_NSIG_WORDS];
95} sigset_t;
96
97/* not actually used, but required for linux/syscalls.h */
98typedef unsigned long old_sigset_t;
99
100#include <asm-generic/signal-defs.h>
101
102struct sigaction {
103 __sighandler_t sa_handler;
104 unsigned long sa_flags;
105#ifdef SA_RESTORER 7#ifdef SA_RESTORER
106 __sigrestore_t sa_restorer;
107#endif 8#endif
108 sigset_t sa_mask; /* mask last for extensibility */
109};
110
111struct k_sigaction {
112 struct sigaction sa;
113};
114
115typedef struct sigaltstack {
116 void __user *ss_sp;
117 int ss_flags;
118 size_t ss_size;
119} stack_t;
120
121#ifdef __KERNEL__
122 9
123#include <asm/sigcontext.h> 10#include <asm/sigcontext.h>
124#undef __HAVE_ARCH_SIG_BITOPS 11#undef __HAVE_ARCH_SIG_BITOPS
125 12
126#define ptrace_signal_deliver(regs, cookie) do { } while (0) 13#define ptrace_signal_deliver(regs, cookie) do { } while (0)
127 14
128#endif /* __KERNEL__ */
129#endif /* __ASSEMBLY__ */ 15#endif /* __ASSEMBLY__ */
130
131#endif /* _ASM_GENERIC_SIGNAL_H */ 16#endif /* _ASM_GENERIC_SIGNAL_H */
diff --git a/include/asm-generic/statfs.h b/include/asm-generic/statfs.h
index c749af9c0983..4b934e9ec970 100644
--- a/include/asm-generic/statfs.h
+++ b/include/asm-generic/statfs.h
@@ -1,86 +1,7 @@
1#ifndef _GENERIC_STATFS_H 1#ifndef _GENERIC_STATFS_H
2#define _GENERIC_STATFS_H 2#define _GENERIC_STATFS_H
3 3
4#include <linux/types.h> 4#include <uapi/asm-generic/statfs.h>
5 5
6#ifdef __KERNEL__
7typedef __kernel_fsid_t fsid_t; 6typedef __kernel_fsid_t fsid_t;
8#endif 7#endif
9
10/*
11 * Most 64-bit platforms use 'long', while most 32-bit platforms use '__u32'.
12 * Yes, they differ in signedness as well as size.
13 * Special cases can override it for themselves -- except for S390x, which
14 * is just a little too special for us. And MIPS, which I'm not touching
15 * with a 10' pole.
16 */
17#ifndef __statfs_word
18#if __BITS_PER_LONG == 64
19#define __statfs_word long
20#else
21#define __statfs_word __u32
22#endif
23#endif
24
25struct statfs {
26 __statfs_word f_type;
27 __statfs_word f_bsize;
28 __statfs_word f_blocks;
29 __statfs_word f_bfree;
30 __statfs_word f_bavail;
31 __statfs_word f_files;
32 __statfs_word f_ffree;
33 __kernel_fsid_t f_fsid;
34 __statfs_word f_namelen;
35 __statfs_word f_frsize;
36 __statfs_word f_flags;
37 __statfs_word f_spare[4];
38};
39
40/*
41 * ARM needs to avoid the 32-bit padding at the end, for consistency
42 * between EABI and OABI
43 */
44#ifndef ARCH_PACK_STATFS64
45#define ARCH_PACK_STATFS64
46#endif
47
48struct statfs64 {
49 __statfs_word f_type;
50 __statfs_word f_bsize;
51 __u64 f_blocks;
52 __u64 f_bfree;
53 __u64 f_bavail;
54 __u64 f_files;
55 __u64 f_ffree;
56 __kernel_fsid_t f_fsid;
57 __statfs_word f_namelen;
58 __statfs_word f_frsize;
59 __statfs_word f_flags;
60 __statfs_word f_spare[4];
61} ARCH_PACK_STATFS64;
62
63/*
64 * IA64 and x86_64 need to avoid the 32-bit padding at the end,
65 * to be compatible with the i386 ABI
66 */
67#ifndef ARCH_PACK_COMPAT_STATFS64
68#define ARCH_PACK_COMPAT_STATFS64
69#endif
70
71struct compat_statfs64 {
72 __u32 f_type;
73 __u32 f_bsize;
74 __u64 f_blocks;
75 __u64 f_bfree;
76 __u64 f_bavail;
77 __u64 f_files;
78 __u64 f_ffree;
79 __kernel_fsid_t f_fsid;
80 __u32 f_namelen;
81 __u32 f_frsize;
82 __u32 f_flags;
83 __u32 f_spare[4];
84} ARCH_PACK_COMPAT_STATFS64;
85
86#endif
diff --git a/include/asm-generic/termios.h b/include/asm-generic/termios.h
index d0922adc56d4..4fa6fe0fc2a2 100644
--- a/include/asm-generic/termios.h
+++ b/include/asm-generic/termios.h
@@ -1,54 +1,9 @@
1#ifndef _ASM_GENERIC_TERMIOS_H 1#ifndef _ASM_GENERIC_TERMIOS_H
2#define _ASM_GENERIC_TERMIOS_H 2#define _ASM_GENERIC_TERMIOS_H
3/*
4 * Most architectures have straight copies of the x86 code, with
5 * varying levels of bug fixes on top. Usually it's a good idea
6 * to use this generic version instead, but be careful to avoid
7 * ABI changes.
8 * New architectures should not provide their own version.
9 */
10 3
11#include <asm/termbits.h>
12#include <asm/ioctls.h>
13
14struct winsize {
15 unsigned short ws_row;
16 unsigned short ws_col;
17 unsigned short ws_xpixel;
18 unsigned short ws_ypixel;
19};
20
21#define NCC 8
22struct termio {
23 unsigned short c_iflag; /* input mode flags */
24 unsigned short c_oflag; /* output mode flags */
25 unsigned short c_cflag; /* control mode flags */
26 unsigned short c_lflag; /* local mode flags */
27 unsigned char c_line; /* line discipline */
28 unsigned char c_cc[NCC]; /* control characters */
29};
30
31/* modem lines */
32#define TIOCM_LE 0x001
33#define TIOCM_DTR 0x002
34#define TIOCM_RTS 0x004
35#define TIOCM_ST 0x008
36#define TIOCM_SR 0x010
37#define TIOCM_CTS 0x020
38#define TIOCM_CAR 0x040
39#define TIOCM_RNG 0x080
40#define TIOCM_DSR 0x100
41#define TIOCM_CD TIOCM_CAR
42#define TIOCM_RI TIOCM_RNG
43#define TIOCM_OUT1 0x2000
44#define TIOCM_OUT2 0x4000
45#define TIOCM_LOOP 0x8000
46
47/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
48
49#ifdef __KERNEL__
50 4
51#include <asm/uaccess.h> 5#include <asm/uaccess.h>
6#include <uapi/asm-generic/termios.h>
52 7
53/* intr=^C quit=^\ erase=del kill=^U 8/* intr=^C quit=^\ erase=del kill=^U
54 eof=^D vtime=\0 vmin=\1 sxtc=\0 9 eof=^D vtime=\0 vmin=\1 sxtc=\0
@@ -149,6 +104,4 @@ static inline int kernel_termios_to_user_termios(struct termios __user *u,
149} 104}
150#endif /* TCGETS2 */ 105#endif /* TCGETS2 */
151 106
152#endif /* __KERNEL__ */
153
154#endif /* _ASM_GENERIC_TERMIOS_H */ 107#endif /* _ASM_GENERIC_TERMIOS_H */
diff --git a/include/asm-generic/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
696static struct xor_block_template xor_block_8regs_p = { 696static struct xor_block_template xor_block_8regs_p __maybe_unused = {
697 .name = "8regs_prefetch", 697 .name = "8regs_prefetch",
698 .do_2 = xor_8regs_p_2, 698 .do_2 = xor_8regs_p_2,
699 .do_3 = xor_8regs_p_3, 699 .do_3 = xor_8regs_p_3,
@@ -701,7 +701,7 @@ static struct xor_block_template xor_block_8regs_p = {
701 .do_5 = xor_8regs_p_5, 701 .do_5 = xor_8regs_p_5,
702}; 702};
703 703
704static struct xor_block_template xor_block_32regs_p = { 704static struct xor_block_template xor_block_32regs_p __maybe_unused = {
705 .name = "32regs_prefetch", 705 .name = "32regs_prefetch",
706 .do_2 = xor_32regs_p_2, 706 .do_2 = xor_32regs_p_2,
707 .do_3 = xor_32regs_p_3, 707 .do_3 = xor_32regs_p_3,
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
2header-y += auxvec.h
3header-y += bitsperlong.h
4header-y += errno-base.h
5header-y += errno.h
6header-y += fcntl.h
7header-y += int-l64.h
8header-y += int-ll64.h
9header-y += ioctl.h
10header-y += ioctls.h
11header-y += ipcbuf.h
12header-y += kvm_para.h
13header-y += mman-common.h
14header-y += mman.h
15header-y += msgbuf.h
16header-y += param.h
17header-y += poll.h
18header-y += posix_types.h
19header-y += resource.h
20header-y += sembuf.h
21header-y += setup.h
22header-y += shmbuf.h
23header-y += shmparam.h
24header-y += siginfo.h
25header-y += signal-defs.h
26header-y += signal.h
27header-y += socket.h
28header-y += sockios.h
29header-y += stat.h
30header-y += statfs.h
31header-y += swab.h
32header-y += termbits.h
33header-y += termios.h
34header-y += types.h
35header-y += ucontext.h
36header-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
19typedef __signed__ char __s8;
20typedef unsigned char __u8;
21
22typedef __signed__ short __s16;
23typedef unsigned short __u16;
24
25typedef __signed__ int __s32;
26typedef unsigned int __u32;
27
28typedef __signed__ long __s64;
29typedef unsigned long __u64;
30
31#endif /* __ASSEMBLY__ */
32
33
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
19typedef __signed__ char __s8;
20typedef unsigned char __u8;
21
22typedef __signed__ short __s16;
23typedef unsigned short __u16;
24
25typedef __signed__ int __s32;
26typedef unsigned int __u32;
27
28#ifdef __GNUC__
29__extension__ typedef __signed__ long long __s64;
30__extension__ typedef unsigned long long __u64;
31#else
32typedef __signed__ long long __s64;
33typedef unsigned long long __u64;
34#endif
35
36#endif /* __ASSEMBLY__ */
37
38
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
7typedef union sigval {
8 int sival_int;
9 void __user *sival_ptr;
10} sigval_t;
11
12/*
13 * This is the size (including padding) of the part of the
14 * struct siginfo that is before the union.
15 */
16#ifndef __ARCH_SI_PREAMBLE_SIZE
17#define __ARCH_SI_PREAMBLE_SIZE (3 * sizeof(int))
18#endif
19
20#define SI_MAX_SIZE 128
21#ifndef SI_PAD_SIZE
22#define SI_PAD_SIZE ((SI_MAX_SIZE - __ARCH_SI_PREAMBLE_SIZE) / sizeof(int))
23#endif
24
25#ifndef __ARCH_SI_UID_T
26#define __ARCH_SI_UID_T __kernel_uid32_t
27#endif
28
29/*
30 * The default "si_band" type is "long", as specified by POSIX.
31 * However, some architectures want to override this to "int"
32 * for historical compatibility reasons, so we allow that.
33 */
34#ifndef __ARCH_SI_BAND_T
35#define __ARCH_SI_BAND_T long
36#endif
37
38#ifndef __ARCH_SI_CLOCK_T
39#define __ARCH_SI_CLOCK_T __kernel_clock_t
40#endif
41
42#ifndef __ARCH_SI_ATTRIBUTES
43#define __ARCH_SI_ATTRIBUTES
44#endif
45
46#ifndef HAVE_ARCH_SIGINFO_T
47
48typedef struct siginfo {
49 int si_signo;
50 int si_errno;
51 int si_code;
52
53 union {
54 int _pad[SI_PAD_SIZE];
55
56 /* kill() */
57 struct {
58 __kernel_pid_t _pid; /* sender's pid */
59 __ARCH_SI_UID_T _uid; /* sender's uid */
60 } _kill;
61
62 /* POSIX.1b timers */
63 struct {
64 __kernel_timer_t _tid; /* timer id */
65 int _overrun; /* overrun count */
66 char _pad[sizeof( __ARCH_SI_UID_T) - sizeof(int)];
67 sigval_t _sigval; /* same as below */
68 int _sys_private; /* not to be passed to user */
69 } _timer;
70
71 /* POSIX.1b signals */
72 struct {
73 __kernel_pid_t _pid; /* sender's pid */
74 __ARCH_SI_UID_T _uid; /* sender's uid */
75 sigval_t _sigval;
76 } _rt;
77
78 /* SIGCHLD */
79 struct {
80 __kernel_pid_t _pid; /* which child */
81 __ARCH_SI_UID_T _uid; /* sender's uid */
82 int _status; /* exit code */
83 __ARCH_SI_CLOCK_T _utime;
84 __ARCH_SI_CLOCK_T _stime;
85 } _sigchld;
86
87 /* SIGILL, SIGFPE, SIGSEGV, SIGBUS */
88 struct {
89 void __user *_addr; /* faulting insn/memory ref. */
90#ifdef __ARCH_SI_TRAPNO
91 int _trapno; /* TRAP # which caused the signal */
92#endif
93 short _addr_lsb; /* LSB of the reported address */
94 } _sigfault;
95
96 /* SIGPOLL */
97 struct {
98 __ARCH_SI_BAND_T _band; /* POLL_IN, POLL_OUT, POLL_MSG */
99 int _fd;
100 } _sigpoll;
101
102 /* SIGSYS */
103 struct {
104 void __user *_call_addr; /* calling user insn */
105 int _syscall; /* triggering system call number */
106 unsigned int _arch; /* AUDIT_ARCH_* of syscall */
107 } _sigsys;
108 } _sifields;
109} __ARCH_SI_ATTRIBUTES siginfo_t;
110
111/* If the arch shares siginfo, then it has SIGSYS. */
112#define __ARCH_SIGSYS
113#endif
114
115/*
116 * How these fields are to be accessed.
117 */
118#define si_pid _sifields._kill._pid
119#define si_uid _sifields._kill._uid
120#define si_tid _sifields._timer._tid
121#define si_overrun _sifields._timer._overrun
122#define si_sys_private _sifields._timer._sys_private
123#define si_status _sifields._sigchld._status
124#define si_utime _sifields._sigchld._utime
125#define si_stime _sifields._sigchld._stime
126#define si_value _sifields._rt._sigval
127#define si_int _sifields._rt._sigval.sival_int
128#define si_ptr _sifields._rt._sigval.sival_ptr
129#define si_addr _sifields._sigfault._addr
130#ifdef __ARCH_SI_TRAPNO
131#define si_trapno _sifields._sigfault._trapno
132#endif
133#define si_addr_lsb _sifields._sigfault._addr_lsb
134#define si_band _sifields._sigpoll._band
135#define si_fd _sifields._sigpoll._fd
136#ifdef __ARCH_SIGSYS
137#define si_call_addr _sifields._sigsys._call_addr
138#define si_syscall _sifields._sigsys._syscall
139#define si_arch _sifields._sigsys._arch
140#endif
141
142#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
278typedef 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__
93typedef struct {
94 unsigned long sig[_NSIG_WORDS];
95} sigset_t;
96
97/* not actually used, but required for linux/syscalls.h */
98typedef unsigned long old_sigset_t;
99
100#include <asm-generic/signal-defs.h>
101
102struct sigaction {
103 __sighandler_t sa_handler;
104 unsigned long sa_flags;
105#ifdef SA_RESTORER
106 __sigrestore_t sa_restorer;
107#endif
108 sigset_t sa_mask; /* mask last for extensibility */
109};
110
111struct k_sigaction {
112 struct sigaction sa;
113};
114
115typedef struct sigaltstack {
116 void __user *ss_sp;
117 int ss_flags;
118 size_t ss_size;
119} stack_t;
120
121#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
22struct 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
45struct 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
68struct 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
14struct winsize {
15 unsigned short ws_row;
16 unsigned short ws_col;
17 unsigned short ws_xpixel;
18 unsigned short ws_ypixel;
19};
20
21#define NCC 8
22struct termio {
23 unsigned short c_iflag; /* input mode flags */
24 unsigned short c_oflag; /* output mode flags */
25 unsigned short c_cflag; /* control mode flags */
26 unsigned short c_lflag; /* local mode flags */
27 unsigned char c_line; /* line discipline */
28 unsigned char c_cc[NCC]; /* control characters */
29};
30
31/* modem lines */
32#define TIOCM_LE 0x001
33#define TIOCM_DTR 0x002
34#define TIOCM_RTS 0x004
35#define TIOCM_ST 0x008
36#define TIOCM_SR 0x010
37#define TIOCM_CTS 0x020
38#define TIOCM_CAR 0x040
39#define TIOCM_RNG 0x080
40#define TIOCM_DSR 0x100
41#define TIOCM_CD TIOCM_CAR
42#define TIOCM_RI TIOCM_RNG
43#define TIOCM_OUT1 0x2000
44#define TIOCM_OUT2 0x4000
45#define TIOCM_LOOP 0x8000
46
47/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
48
49
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)