diff options
author | David Howells <dhowells@redhat.com> | 2012-12-17 08:47:09 -0500 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2012-12-17 09:12:19 -0500 |
commit | 96433f6ee49032d7a8bda76de2b05cfde2914354 (patch) | |
tree | 8e274f12a098c0cb7010c97f11b5af6463b5c169 /arch/alpha | |
parent | a4f1de176614f634c367e5994a7bcc428c940df0 (diff) |
UAPI: (Scripted) Disintegrate arch/alpha/include/asm
Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Michael Kerrisk <mtk.manpages@gmail.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Acked-by: Dave Jones <davej@redhat.com>
Acked-by: Michael Cree <mcree@orcon.net.nz>
Acked-by: Matt Turner <mattst88@gmail.com>
Diffstat (limited to 'arch/alpha')
-rw-r--r-- | arch/alpha/include/asm/Kbuild | 9 | ||||
-rw-r--r-- | arch/alpha/include/asm/a.out.h | 89 | ||||
-rw-r--r-- | arch/alpha/include/asm/compiler.h | 115 | ||||
-rw-r--r-- | arch/alpha/include/asm/console.h | 48 | ||||
-rw-r--r-- | arch/alpha/include/asm/fpu.h | 124 | ||||
-rw-r--r-- | arch/alpha/include/asm/pal.h | 50 | ||||
-rw-r--r-- | arch/alpha/include/asm/param.h | 20 | ||||
-rw-r--r-- | arch/alpha/include/asm/ptrace.h | 68 | ||||
-rw-r--r-- | arch/alpha/include/asm/signal.h | 135 | ||||
-rw-r--r-- | arch/alpha/include/asm/socket.h | 79 | ||||
-rw-r--r-- | arch/alpha/include/asm/termios.h | 68 | ||||
-rw-r--r-- | arch/alpha/include/asm/types.h | 13 | ||||
-rw-r--r-- | arch/alpha/include/asm/unistd.h | 469 | ||||
-rw-r--r-- | arch/alpha/include/uapi/asm/Kbuild | 40 | ||||
-rw-r--r-- | arch/alpha/include/uapi/asm/a.out.h | 91 | ||||
-rw-r--r-- | arch/alpha/include/uapi/asm/auxvec.h (renamed from arch/alpha/include/asm/auxvec.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/uapi/asm/bitsperlong.h (renamed from arch/alpha/include/asm/bitsperlong.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/uapi/asm/byteorder.h (renamed from arch/alpha/include/asm/byteorder.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/uapi/asm/compiler.h | 117 | ||||
-rw-r--r-- | arch/alpha/include/uapi/asm/console.h | 50 | ||||
-rw-r--r-- | arch/alpha/include/uapi/asm/errno.h (renamed from arch/alpha/include/asm/errno.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/uapi/asm/fcntl.h (renamed from arch/alpha/include/asm/fcntl.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/uapi/asm/fpu.h | 123 | ||||
-rw-r--r-- | arch/alpha/include/uapi/asm/gentrap.h (renamed from arch/alpha/include/asm/gentrap.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/uapi/asm/ioctl.h (renamed from arch/alpha/include/asm/ioctl.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/uapi/asm/ioctls.h (renamed from arch/alpha/include/asm/ioctls.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/uapi/asm/ipcbuf.h (renamed from arch/alpha/include/asm/ipcbuf.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/uapi/asm/kvm_para.h (renamed from arch/alpha/include/asm/kvm_para.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/uapi/asm/mman.h (renamed from arch/alpha/include/asm/mman.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/uapi/asm/msgbuf.h (renamed from arch/alpha/include/asm/msgbuf.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/uapi/asm/pal.h | 52 | ||||
-rw-r--r-- | arch/alpha/include/uapi/asm/param.h | 21 | ||||
-rw-r--r-- | arch/alpha/include/uapi/asm/poll.h (renamed from arch/alpha/include/asm/poll.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/uapi/asm/posix_types.h (renamed from arch/alpha/include/asm/posix_types.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/uapi/asm/ptrace.h | 70 | ||||
-rw-r--r-- | arch/alpha/include/uapi/asm/reg.h (renamed from arch/alpha/include/asm/reg.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/uapi/asm/regdef.h (renamed from arch/alpha/include/asm/regdef.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/uapi/asm/resource.h (renamed from arch/alpha/include/asm/resource.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/uapi/asm/sembuf.h (renamed from arch/alpha/include/asm/sembuf.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/uapi/asm/setup.h (renamed from arch/alpha/include/asm/setup.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/uapi/asm/shmbuf.h (renamed from arch/alpha/include/asm/shmbuf.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/uapi/asm/sigcontext.h (renamed from arch/alpha/include/asm/sigcontext.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/uapi/asm/siginfo.h (renamed from arch/alpha/include/asm/siginfo.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/uapi/asm/signal.h | 135 | ||||
-rw-r--r-- | arch/alpha/include/uapi/asm/socket.h | 81 | ||||
-rw-r--r-- | arch/alpha/include/uapi/asm/sockios.h (renamed from arch/alpha/include/asm/sockios.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/uapi/asm/stat.h (renamed from arch/alpha/include/asm/stat.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/uapi/asm/statfs.h (renamed from arch/alpha/include/asm/statfs.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/uapi/asm/swab.h (renamed from arch/alpha/include/asm/swab.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/uapi/asm/sysinfo.h (renamed from arch/alpha/include/asm/sysinfo.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/uapi/asm/termbits.h (renamed from arch/alpha/include/asm/termbits.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/uapi/asm/termios.h | 70 | ||||
-rw-r--r-- | arch/alpha/include/uapi/asm/types.h | 16 | ||||
-rw-r--r-- | arch/alpha/include/uapi/asm/unistd.h | 471 |
54 files changed, 1349 insertions, 1275 deletions
diff --git a/arch/alpha/include/asm/Kbuild b/arch/alpha/include/asm/Kbuild index dcfabb9f05a0..a6e85f448c1c 100644 --- a/arch/alpha/include/asm/Kbuild +++ b/arch/alpha/include/asm/Kbuild | |||
@@ -1,14 +1,5 @@ | |||
1 | include include/asm-generic/Kbuild.asm | ||
2 | 1 | ||
3 | generic-y += clkdev.h | 2 | generic-y += clkdev.h |
4 | 3 | ||
5 | header-y += compiler.h | ||
6 | header-y += console.h | ||
7 | header-y += fpu.h | ||
8 | header-y += gentrap.h | ||
9 | header-y += pal.h | ||
10 | header-y += reg.h | ||
11 | header-y += regdef.h | ||
12 | header-y += sysinfo.h | ||
13 | generic-y += exec.h | 4 | generic-y += exec.h |
14 | generic-y += trace_clock.h | 5 | generic-y += trace_clock.h |
diff --git a/arch/alpha/include/asm/a.out.h b/arch/alpha/include/asm/a.out.h index acdc681231cb..9abbd2455306 100644 --- a/arch/alpha/include/asm/a.out.h +++ b/arch/alpha/include/asm/a.out.h | |||
@@ -1,94 +1,8 @@ | |||
1 | #ifndef __ALPHA_A_OUT_H__ | 1 | #ifndef __ALPHA_A_OUT_H__ |
2 | #define __ALPHA_A_OUT_H__ | 2 | #define __ALPHA_A_OUT_H__ |
3 | 3 | ||
4 | #include <linux/types.h> | 4 | #include <uapi/asm/a.out.h> |
5 | 5 | ||
6 | /* | ||
7 | * OSF/1 ECOFF header structs. ECOFF files consist of: | ||
8 | * - a file header (struct filehdr), | ||
9 | * - an a.out header (struct aouthdr), | ||
10 | * - one or more section headers (struct scnhdr). | ||
11 | * The filhdr's "f_nscns" field contains the | ||
12 | * number of section headers. | ||
13 | */ | ||
14 | |||
15 | struct filehdr | ||
16 | { | ||
17 | /* OSF/1 "file" header */ | ||
18 | __u16 f_magic, f_nscns; | ||
19 | __u32 f_timdat; | ||
20 | __u64 f_symptr; | ||
21 | __u32 f_nsyms; | ||
22 | __u16 f_opthdr, f_flags; | ||
23 | }; | ||
24 | |||
25 | struct aouthdr | ||
26 | { | ||
27 | __u64 info; /* after that it looks quite normal.. */ | ||
28 | __u64 tsize; | ||
29 | __u64 dsize; | ||
30 | __u64 bsize; | ||
31 | __u64 entry; | ||
32 | __u64 text_start; /* with a few additions that actually make sense */ | ||
33 | __u64 data_start; | ||
34 | __u64 bss_start; | ||
35 | __u32 gprmask, fprmask; /* bitmask of general & floating point regs used in binary */ | ||
36 | __u64 gpvalue; | ||
37 | }; | ||
38 | |||
39 | struct scnhdr | ||
40 | { | ||
41 | char s_name[8]; | ||
42 | __u64 s_paddr; | ||
43 | __u64 s_vaddr; | ||
44 | __u64 s_size; | ||
45 | __u64 s_scnptr; | ||
46 | __u64 s_relptr; | ||
47 | __u64 s_lnnoptr; | ||
48 | __u16 s_nreloc; | ||
49 | __u16 s_nlnno; | ||
50 | __u32 s_flags; | ||
51 | }; | ||
52 | |||
53 | struct exec | ||
54 | { | ||
55 | /* OSF/1 "file" header */ | ||
56 | struct filehdr fh; | ||
57 | struct aouthdr ah; | ||
58 | }; | ||
59 | |||
60 | /* | ||
61 | * Define's so that the kernel exec code can access the a.out header | ||
62 | * fields... | ||
63 | */ | ||
64 | #define a_info ah.info | ||
65 | #define a_text ah.tsize | ||
66 | #define a_data ah.dsize | ||
67 | #define a_bss ah.bsize | ||
68 | #define a_entry ah.entry | ||
69 | #define a_textstart ah.text_start | ||
70 | #define a_datastart ah.data_start | ||
71 | #define a_bssstart ah.bss_start | ||
72 | #define a_gprmask ah.gprmask | ||
73 | #define a_fprmask ah.fprmask | ||
74 | #define a_gpvalue ah.gpvalue | ||
75 | |||
76 | #define N_TXTADDR(x) ((x).a_textstart) | ||
77 | #define N_DATADDR(x) ((x).a_datastart) | ||
78 | #define N_BSSADDR(x) ((x).a_bssstart) | ||
79 | #define N_DRSIZE(x) 0 | ||
80 | #define N_TRSIZE(x) 0 | ||
81 | #define N_SYMSIZE(x) 0 | ||
82 | |||
83 | #define AOUTHSZ sizeof(struct aouthdr) | ||
84 | #define SCNHSZ sizeof(struct scnhdr) | ||
85 | #define SCNROUND 16 | ||
86 | |||
87 | #define N_TXTOFF(x) \ | ||
88 | ((long) N_MAGIC(x) == ZMAGIC ? 0 : \ | ||
89 | (sizeof(struct exec) + (x).fh.f_nscns*SCNHSZ + SCNROUND - 1) & ~(SCNROUND - 1)) | ||
90 | |||
91 | #ifdef __KERNEL__ | ||
92 | 6 | ||
93 | /* Assume that start addresses below 4G belong to a TASO application. | 7 | /* Assume that start addresses below 4G belong to a TASO application. |
94 | Unfortunately, there is no proper bit in the exec header to check. | 8 | Unfortunately, there is no proper bit in the exec header to check. |
@@ -98,5 +12,4 @@ struct exec | |||
98 | set_personality (((BFPM->taso || EX.ah.entry < 0x100000000L \ | 12 | set_personality (((BFPM->taso || EX.ah.entry < 0x100000000L \ |
99 | ? ADDR_LIMIT_32BIT : 0) | PER_OSF4)) | 13 | ? ADDR_LIMIT_32BIT : 0) | PER_OSF4)) |
100 | 14 | ||
101 | #endif /* __KERNEL__ */ | ||
102 | #endif /* __A_OUT_GNU_H__ */ | 15 | #endif /* __A_OUT_GNU_H__ */ |
diff --git a/arch/alpha/include/asm/compiler.h b/arch/alpha/include/asm/compiler.h index da6bb199839c..a7720b96bcc9 100644 --- a/arch/alpha/include/asm/compiler.h +++ b/arch/alpha/include/asm/compiler.h | |||
@@ -1,119 +1,8 @@ | |||
1 | #ifndef __ALPHA_COMPILER_H | 1 | #ifndef __ALPHA_COMPILER_H |
2 | #define __ALPHA_COMPILER_H | 2 | #define __ALPHA_COMPILER_H |
3 | 3 | ||
4 | /* | 4 | #include <uapi/asm/compiler.h> |
5 | * Herein are macros we use when describing various patterns we want to GCC. | ||
6 | * In all cases we can get better schedules out of the compiler if we hide | ||
7 | * as little as possible inside inline assembly. However, we want to be | ||
8 | * able to know what we'll get out before giving up inline assembly. Thus | ||
9 | * these tests and macros. | ||
10 | */ | ||
11 | 5 | ||
12 | #if __GNUC__ == 3 && __GNUC_MINOR__ >= 4 || __GNUC__ > 3 | ||
13 | # define __kernel_insbl(val, shift) __builtin_alpha_insbl(val, shift) | ||
14 | # define __kernel_inswl(val, shift) __builtin_alpha_inswl(val, shift) | ||
15 | # define __kernel_insql(val, shift) __builtin_alpha_insql(val, shift) | ||
16 | # define __kernel_inslh(val, shift) __builtin_alpha_inslh(val, shift) | ||
17 | # define __kernel_extbl(val, shift) __builtin_alpha_extbl(val, shift) | ||
18 | # define __kernel_extwl(val, shift) __builtin_alpha_extwl(val, shift) | ||
19 | # define __kernel_cmpbge(a, b) __builtin_alpha_cmpbge(a, b) | ||
20 | #else | ||
21 | # define __kernel_insbl(val, shift) \ | ||
22 | ({ unsigned long __kir; \ | ||
23 | __asm__("insbl %2,%1,%0" : "=r"(__kir) : "rI"(shift), "r"(val)); \ | ||
24 | __kir; }) | ||
25 | # define __kernel_inswl(val, shift) \ | ||
26 | ({ unsigned long __kir; \ | ||
27 | __asm__("inswl %2,%1,%0" : "=r"(__kir) : "rI"(shift), "r"(val)); \ | ||
28 | __kir; }) | ||
29 | # define __kernel_insql(val, shift) \ | ||
30 | ({ unsigned long __kir; \ | ||
31 | __asm__("insql %2,%1,%0" : "=r"(__kir) : "rI"(shift), "r"(val)); \ | ||
32 | __kir; }) | ||
33 | # define __kernel_inslh(val, shift) \ | ||
34 | ({ unsigned long __kir; \ | ||
35 | __asm__("inslh %2,%1,%0" : "=r"(__kir) : "rI"(shift), "r"(val)); \ | ||
36 | __kir; }) | ||
37 | # define __kernel_extbl(val, shift) \ | ||
38 | ({ unsigned long __kir; \ | ||
39 | __asm__("extbl %2,%1,%0" : "=r"(__kir) : "rI"(shift), "r"(val)); \ | ||
40 | __kir; }) | ||
41 | # define __kernel_extwl(val, shift) \ | ||
42 | ({ unsigned long __kir; \ | ||
43 | __asm__("extwl %2,%1,%0" : "=r"(__kir) : "rI"(shift), "r"(val)); \ | ||
44 | __kir; }) | ||
45 | # define __kernel_cmpbge(a, b) \ | ||
46 | ({ unsigned long __kir; \ | ||
47 | __asm__("cmpbge %r2,%1,%0" : "=r"(__kir) : "rI"(b), "rJ"(a)); \ | ||
48 | __kir; }) | ||
49 | #endif | ||
50 | |||
51 | #ifdef __alpha_cix__ | ||
52 | # if __GNUC__ == 3 && __GNUC_MINOR__ >= 4 || __GNUC__ > 3 | ||
53 | # define __kernel_cttz(x) __builtin_ctzl(x) | ||
54 | # define __kernel_ctlz(x) __builtin_clzl(x) | ||
55 | # define __kernel_ctpop(x) __builtin_popcountl(x) | ||
56 | # else | ||
57 | # define __kernel_cttz(x) \ | ||
58 | ({ unsigned long __kir; \ | ||
59 | __asm__("cttz %1,%0" : "=r"(__kir) : "r"(x)); \ | ||
60 | __kir; }) | ||
61 | # define __kernel_ctlz(x) \ | ||
62 | ({ unsigned long __kir; \ | ||
63 | __asm__("ctlz %1,%0" : "=r"(__kir) : "r"(x)); \ | ||
64 | __kir; }) | ||
65 | # define __kernel_ctpop(x) \ | ||
66 | ({ unsigned long __kir; \ | ||
67 | __asm__("ctpop %1,%0" : "=r"(__kir) : "r"(x)); \ | ||
68 | __kir; }) | ||
69 | # endif | ||
70 | #else | ||
71 | # define __kernel_cttz(x) \ | ||
72 | ({ unsigned long __kir; \ | ||
73 | __asm__(".arch ev67; cttz %1,%0" : "=r"(__kir) : "r"(x)); \ | ||
74 | __kir; }) | ||
75 | # define __kernel_ctlz(x) \ | ||
76 | ({ unsigned long __kir; \ | ||
77 | __asm__(".arch ev67; ctlz %1,%0" : "=r"(__kir) : "r"(x)); \ | ||
78 | __kir; }) | ||
79 | # define __kernel_ctpop(x) \ | ||
80 | ({ unsigned long __kir; \ | ||
81 | __asm__(".arch ev67; ctpop %1,%0" : "=r"(__kir) : "r"(x)); \ | ||
82 | __kir; }) | ||
83 | #endif | ||
84 | |||
85 | |||
86 | /* | ||
87 | * Beginning with EGCS 1.1, GCC defines __alpha_bwx__ when the BWX | ||
88 | * extension is enabled. Previous versions did not define anything | ||
89 | * we could test during compilation -- too bad, so sad. | ||
90 | */ | ||
91 | |||
92 | #if defined(__alpha_bwx__) | ||
93 | #define __kernel_ldbu(mem) (mem) | ||
94 | #define __kernel_ldwu(mem) (mem) | ||
95 | #define __kernel_stb(val,mem) ((mem) = (val)) | ||
96 | #define __kernel_stw(val,mem) ((mem) = (val)) | ||
97 | #else | ||
98 | #define __kernel_ldbu(mem) \ | ||
99 | ({ unsigned char __kir; \ | ||
100 | __asm__(".arch ev56; \ | ||
101 | ldbu %0,%1" : "=r"(__kir) : "m"(mem)); \ | ||
102 | __kir; }) | ||
103 | #define __kernel_ldwu(mem) \ | ||
104 | ({ unsigned short __kir; \ | ||
105 | __asm__(".arch ev56; \ | ||
106 | ldwu %0,%1" : "=r"(__kir) : "m"(mem)); \ | ||
107 | __kir; }) | ||
108 | #define __kernel_stb(val,mem) \ | ||
109 | __asm__(".arch ev56; \ | ||
110 | stb %1,%0" : "=m"(mem) : "r"(val)) | ||
111 | #define __kernel_stw(val,mem) \ | ||
112 | __asm__(".arch ev56; \ | ||
113 | stw %1,%0" : "=m"(mem) : "r"(val)) | ||
114 | #endif | ||
115 | |||
116 | #ifdef __KERNEL__ | ||
117 | /* Some idiots over in <linux/compiler.h> thought inline should imply | 6 | /* Some idiots over in <linux/compiler.h> thought inline should imply |
118 | always_inline. This breaks stuff. We'll include this file whenever | 7 | always_inline. This breaks stuff. We'll include this file whenever |
119 | we run into such problems. */ | 8 | we run into such problems. */ |
@@ -125,6 +14,4 @@ | |||
125 | #undef __always_inline | 14 | #undef __always_inline |
126 | #define __always_inline inline __attribute__((always_inline)) | 15 | #define __always_inline inline __attribute__((always_inline)) |
127 | 16 | ||
128 | #endif /* __KERNEL__ */ | ||
129 | |||
130 | #endif /* __ALPHA_COMPILER_H */ | 17 | #endif /* __ALPHA_COMPILER_H */ |
diff --git a/arch/alpha/include/asm/console.h b/arch/alpha/include/asm/console.h index a3ce4e62249b..f2b584fe0994 100644 --- a/arch/alpha/include/asm/console.h +++ b/arch/alpha/include/asm/console.h | |||
@@ -1,52 +1,8 @@ | |||
1 | #ifndef __AXP_CONSOLE_H | 1 | #ifndef __AXP_CONSOLE_H |
2 | #define __AXP_CONSOLE_H | 2 | #define __AXP_CONSOLE_H |
3 | 3 | ||
4 | /* | 4 | #include <uapi/asm/console.h> |
5 | * Console callback routine numbers | ||
6 | */ | ||
7 | #define CCB_GETC 0x01 | ||
8 | #define CCB_PUTS 0x02 | ||
9 | #define CCB_RESET_TERM 0x03 | ||
10 | #define CCB_SET_TERM_INT 0x04 | ||
11 | #define CCB_SET_TERM_CTL 0x05 | ||
12 | #define CCB_PROCESS_KEYCODE 0x06 | ||
13 | #define CCB_OPEN_CONSOLE 0x07 | ||
14 | #define CCB_CLOSE_CONSOLE 0x08 | ||
15 | 5 | ||
16 | #define CCB_OPEN 0x10 | ||
17 | #define CCB_CLOSE 0x11 | ||
18 | #define CCB_IOCTL 0x12 | ||
19 | #define CCB_READ 0x13 | ||
20 | #define CCB_WRITE 0x14 | ||
21 | |||
22 | #define CCB_SET_ENV 0x20 | ||
23 | #define CCB_RESET_ENV 0x21 | ||
24 | #define CCB_GET_ENV 0x22 | ||
25 | #define CCB_SAVE_ENV 0x23 | ||
26 | |||
27 | #define CCB_PSWITCH 0x30 | ||
28 | #define CCB_BIOS_EMUL 0x32 | ||
29 | |||
30 | /* | ||
31 | * Environment variable numbers | ||
32 | */ | ||
33 | #define ENV_AUTO_ACTION 0x01 | ||
34 | #define ENV_BOOT_DEV 0x02 | ||
35 | #define ENV_BOOTDEF_DEV 0x03 | ||
36 | #define ENV_BOOTED_DEV 0x04 | ||
37 | #define ENV_BOOT_FILE 0x05 | ||
38 | #define ENV_BOOTED_FILE 0x06 | ||
39 | #define ENV_BOOT_OSFLAGS 0x07 | ||
40 | #define ENV_BOOTED_OSFLAGS 0x08 | ||
41 | #define ENV_BOOT_RESET 0x09 | ||
42 | #define ENV_DUMP_DEV 0x0A | ||
43 | #define ENV_ENABLE_AUDIT 0x0B | ||
44 | #define ENV_LICENSE 0x0C | ||
45 | #define ENV_CHAR_SET 0x0D | ||
46 | #define ENV_LANGUAGE 0x0E | ||
47 | #define ENV_TTY_DEV 0x0F | ||
48 | |||
49 | #ifdef __KERNEL__ | ||
50 | #ifndef __ASSEMBLY__ | 6 | #ifndef __ASSEMBLY__ |
51 | extern long callback_puts(long unit, const char *s, long length); | 7 | extern long callback_puts(long unit, const char *s, long length); |
52 | extern long callback_getc(long unit); | 8 | extern long callback_getc(long unit); |
@@ -70,6 +26,4 @@ struct hwrpb_struct; | |||
70 | extern int callback_init_done; | 26 | extern int callback_init_done; |
71 | extern void * callback_init(void *); | 27 | extern void * callback_init(void *); |
72 | #endif /* __ASSEMBLY__ */ | 28 | #endif /* __ASSEMBLY__ */ |
73 | #endif /* __KERNEL__ */ | ||
74 | |||
75 | #endif /* __AXP_CONSOLE_H */ | 29 | #endif /* __AXP_CONSOLE_H */ |
diff --git a/arch/alpha/include/asm/fpu.h b/arch/alpha/include/asm/fpu.h index e477bcd5b94a..71c20956b905 100644 --- a/arch/alpha/include/asm/fpu.h +++ b/arch/alpha/include/asm/fpu.h | |||
@@ -1,128 +1,8 @@ | |||
1 | #ifndef __ASM_ALPHA_FPU_H | 1 | #ifndef __ASM_ALPHA_FPU_H |
2 | #define __ASM_ALPHA_FPU_H | 2 | #define __ASM_ALPHA_FPU_H |
3 | 3 | ||
4 | #ifdef __KERNEL__ | ||
5 | #include <asm/special_insns.h> | 4 | #include <asm/special_insns.h> |
6 | #endif | 5 | #include <uapi/asm/fpu.h> |
7 | |||
8 | /* | ||
9 | * Alpha floating-point control register defines: | ||
10 | */ | ||
11 | #define FPCR_DNOD (1UL<<47) /* denorm INV trap disable */ | ||
12 | #define FPCR_DNZ (1UL<<48) /* denorms to zero */ | ||
13 | #define FPCR_INVD (1UL<<49) /* invalid op disable (opt.) */ | ||
14 | #define FPCR_DZED (1UL<<50) /* division by zero disable (opt.) */ | ||
15 | #define FPCR_OVFD (1UL<<51) /* overflow disable (optional) */ | ||
16 | #define FPCR_INV (1UL<<52) /* invalid operation */ | ||
17 | #define FPCR_DZE (1UL<<53) /* division by zero */ | ||
18 | #define FPCR_OVF (1UL<<54) /* overflow */ | ||
19 | #define FPCR_UNF (1UL<<55) /* underflow */ | ||
20 | #define FPCR_INE (1UL<<56) /* inexact */ | ||
21 | #define FPCR_IOV (1UL<<57) /* integer overflow */ | ||
22 | #define FPCR_UNDZ (1UL<<60) /* underflow to zero (opt.) */ | ||
23 | #define FPCR_UNFD (1UL<<61) /* underflow disable (opt.) */ | ||
24 | #define FPCR_INED (1UL<<62) /* inexact disable (opt.) */ | ||
25 | #define FPCR_SUM (1UL<<63) /* summary bit */ | ||
26 | |||
27 | #define FPCR_DYN_SHIFT 58 /* first dynamic rounding mode bit */ | ||
28 | #define FPCR_DYN_CHOPPED (0x0UL << FPCR_DYN_SHIFT) /* towards 0 */ | ||
29 | #define FPCR_DYN_MINUS (0x1UL << FPCR_DYN_SHIFT) /* towards -INF */ | ||
30 | #define FPCR_DYN_NORMAL (0x2UL << FPCR_DYN_SHIFT) /* towards nearest */ | ||
31 | #define FPCR_DYN_PLUS (0x3UL << FPCR_DYN_SHIFT) /* towards +INF */ | ||
32 | #define FPCR_DYN_MASK (0x3UL << FPCR_DYN_SHIFT) | ||
33 | |||
34 | #define FPCR_MASK 0xffff800000000000L | ||
35 | |||
36 | /* | ||
37 | * IEEE trap enables are implemented in software. These per-thread | ||
38 | * bits are stored in the "ieee_state" field of "struct thread_info". | ||
39 | * Thus, the bits are defined so as not to conflict with the | ||
40 | * floating-point enable bit (which is architected). On top of that, | ||
41 | * we want to make these bits compatible with OSF/1 so | ||
42 | * ieee_set_fp_control() etc. can be implemented easily and | ||
43 | * compatibly. The corresponding definitions are in | ||
44 | * /usr/include/machine/fpu.h under OSF/1. | ||
45 | */ | ||
46 | #define IEEE_TRAP_ENABLE_INV (1UL<<1) /* invalid op */ | ||
47 | #define IEEE_TRAP_ENABLE_DZE (1UL<<2) /* division by zero */ | ||
48 | #define IEEE_TRAP_ENABLE_OVF (1UL<<3) /* overflow */ | ||
49 | #define IEEE_TRAP_ENABLE_UNF (1UL<<4) /* underflow */ | ||
50 | #define IEEE_TRAP_ENABLE_INE (1UL<<5) /* inexact */ | ||
51 | #define IEEE_TRAP_ENABLE_DNO (1UL<<6) /* denorm */ | ||
52 | #define IEEE_TRAP_ENABLE_MASK (IEEE_TRAP_ENABLE_INV | IEEE_TRAP_ENABLE_DZE |\ | ||
53 | IEEE_TRAP_ENABLE_OVF | IEEE_TRAP_ENABLE_UNF |\ | ||
54 | IEEE_TRAP_ENABLE_INE | IEEE_TRAP_ENABLE_DNO) | ||
55 | |||
56 | /* Denorm and Underflow flushing */ | ||
57 | #define IEEE_MAP_DMZ (1UL<<12) /* Map denorm inputs to zero */ | ||
58 | #define IEEE_MAP_UMZ (1UL<<13) /* Map underflowed outputs to zero */ | ||
59 | |||
60 | #define IEEE_MAP_MASK (IEEE_MAP_DMZ | IEEE_MAP_UMZ) | ||
61 | |||
62 | /* status bits coming from fpcr: */ | ||
63 | #define IEEE_STATUS_INV (1UL<<17) | ||
64 | #define IEEE_STATUS_DZE (1UL<<18) | ||
65 | #define IEEE_STATUS_OVF (1UL<<19) | ||
66 | #define IEEE_STATUS_UNF (1UL<<20) | ||
67 | #define IEEE_STATUS_INE (1UL<<21) | ||
68 | #define IEEE_STATUS_DNO (1UL<<22) | ||
69 | |||
70 | #define IEEE_STATUS_MASK (IEEE_STATUS_INV | IEEE_STATUS_DZE | \ | ||
71 | IEEE_STATUS_OVF | IEEE_STATUS_UNF | \ | ||
72 | IEEE_STATUS_INE | IEEE_STATUS_DNO) | ||
73 | |||
74 | #define IEEE_SW_MASK (IEEE_TRAP_ENABLE_MASK | \ | ||
75 | IEEE_STATUS_MASK | IEEE_MAP_MASK) | ||
76 | |||
77 | #define IEEE_CURRENT_RM_SHIFT 32 | ||
78 | #define IEEE_CURRENT_RM_MASK (3UL<<IEEE_CURRENT_RM_SHIFT) | ||
79 | |||
80 | #define IEEE_STATUS_TO_EXCSUM_SHIFT 16 | ||
81 | |||
82 | #define IEEE_INHERIT (1UL<<63) /* inherit on thread create? */ | ||
83 | |||
84 | /* | ||
85 | * Convert the software IEEE trap enable and status bits into the | ||
86 | * hardware fpcr format. | ||
87 | * | ||
88 | * Digital Unix engineers receive my thanks for not defining the | ||
89 | * software bits identical to the hardware bits. The chip designers | ||
90 | * receive my thanks for making all the not-implemented fpcr bits | ||
91 | * RAZ forcing us to use system calls to read/write this value. | ||
92 | */ | ||
93 | |||
94 | static inline unsigned long | ||
95 | ieee_swcr_to_fpcr(unsigned long sw) | ||
96 | { | ||
97 | unsigned long fp; | ||
98 | fp = (sw & IEEE_STATUS_MASK) << 35; | ||
99 | fp |= (sw & IEEE_MAP_DMZ) << 36; | ||
100 | fp |= (sw & IEEE_STATUS_MASK ? FPCR_SUM : 0); | ||
101 | fp |= (~sw & (IEEE_TRAP_ENABLE_INV | ||
102 | | IEEE_TRAP_ENABLE_DZE | ||
103 | | IEEE_TRAP_ENABLE_OVF)) << 48; | ||
104 | fp |= (~sw & (IEEE_TRAP_ENABLE_UNF | IEEE_TRAP_ENABLE_INE)) << 57; | ||
105 | fp |= (sw & IEEE_MAP_UMZ ? FPCR_UNDZ | FPCR_UNFD : 0); | ||
106 | fp |= (~sw & IEEE_TRAP_ENABLE_DNO) << 41; | ||
107 | return fp; | ||
108 | } | ||
109 | |||
110 | static inline unsigned long | ||
111 | ieee_fpcr_to_swcr(unsigned long fp) | ||
112 | { | ||
113 | unsigned long sw; | ||
114 | sw = (fp >> 35) & IEEE_STATUS_MASK; | ||
115 | sw |= (fp >> 36) & IEEE_MAP_DMZ; | ||
116 | sw |= (~fp >> 48) & (IEEE_TRAP_ENABLE_INV | ||
117 | | IEEE_TRAP_ENABLE_DZE | ||
118 | | IEEE_TRAP_ENABLE_OVF); | ||
119 | sw |= (~fp >> 57) & (IEEE_TRAP_ENABLE_UNF | IEEE_TRAP_ENABLE_INE); | ||
120 | sw |= (fp >> 47) & IEEE_MAP_UMZ; | ||
121 | sw |= (~fp >> 41) & IEEE_TRAP_ENABLE_DNO; | ||
122 | return sw; | ||
123 | } | ||
124 | |||
125 | #ifdef __KERNEL__ | ||
126 | 6 | ||
127 | /* The following two functions don't need trapb/excb instructions | 7 | /* The following two functions don't need trapb/excb instructions |
128 | around the mf_fpcr/mt_fpcr instructions because (a) the kernel | 8 | around the mf_fpcr/mt_fpcr instructions because (a) the kernel |
@@ -192,6 +72,4 @@ extern void alpha_write_fp_reg (unsigned long reg, unsigned long val); | |||
192 | extern unsigned long alpha_read_fp_reg_s (unsigned long reg); | 72 | extern unsigned long alpha_read_fp_reg_s (unsigned long reg); |
193 | extern void alpha_write_fp_reg_s (unsigned long reg, unsigned long val); | 73 | extern void alpha_write_fp_reg_s (unsigned long reg, unsigned long val); |
194 | 74 | ||
195 | #endif /* __KERNEL__ */ | ||
196 | |||
197 | #endif /* __ASM_ALPHA_FPU_H */ | 75 | #endif /* __ASM_ALPHA_FPU_H */ |
diff --git a/arch/alpha/include/asm/pal.h b/arch/alpha/include/asm/pal.h index 6699ee583429..6fcd2b5b08f0 100644 --- a/arch/alpha/include/asm/pal.h +++ b/arch/alpha/include/asm/pal.h | |||
@@ -1,54 +1,8 @@ | |||
1 | #ifndef __ALPHA_PAL_H | 1 | #ifndef __ALPHA_PAL_H |
2 | #define __ALPHA_PAL_H | 2 | #define __ALPHA_PAL_H |
3 | 3 | ||
4 | /* | 4 | #include <uapi/asm/pal.h> |
5 | * Common PAL-code | ||
6 | */ | ||
7 | #define PAL_halt 0 | ||
8 | #define PAL_cflush 1 | ||
9 | #define PAL_draina 2 | ||
10 | #define PAL_bpt 128 | ||
11 | #define PAL_bugchk 129 | ||
12 | #define PAL_chmk 131 | ||
13 | #define PAL_callsys 131 | ||
14 | #define PAL_imb 134 | ||
15 | #define PAL_rduniq 158 | ||
16 | #define PAL_wruniq 159 | ||
17 | #define PAL_gentrap 170 | ||
18 | #define PAL_nphalt 190 | ||
19 | |||
20 | /* | ||
21 | * VMS specific PAL-code | ||
22 | */ | ||
23 | #define PAL_swppal 10 | ||
24 | #define PAL_mfpr_vptb 41 | ||
25 | 5 | ||
26 | /* | ||
27 | * OSF specific PAL-code | ||
28 | */ | ||
29 | #define PAL_cserve 9 | ||
30 | #define PAL_wripir 13 | ||
31 | #define PAL_rdmces 16 | ||
32 | #define PAL_wrmces 17 | ||
33 | #define PAL_wrfen 43 | ||
34 | #define PAL_wrvptptr 45 | ||
35 | #define PAL_jtopal 46 | ||
36 | #define PAL_swpctx 48 | ||
37 | #define PAL_wrval 49 | ||
38 | #define PAL_rdval 50 | ||
39 | #define PAL_tbi 51 | ||
40 | #define PAL_wrent 52 | ||
41 | #define PAL_swpipl 53 | ||
42 | #define PAL_rdps 54 | ||
43 | #define PAL_wrkgp 55 | ||
44 | #define PAL_wrusp 56 | ||
45 | #define PAL_wrperfmon 57 | ||
46 | #define PAL_rdusp 58 | ||
47 | #define PAL_whami 60 | ||
48 | #define PAL_retsys 61 | ||
49 | #define PAL_rti 63 | ||
50 | |||
51 | #ifdef __KERNEL__ | ||
52 | #ifndef __ASSEMBLY__ | 6 | #ifndef __ASSEMBLY__ |
53 | 7 | ||
54 | extern void halt(void) __attribute__((noreturn)); | 8 | extern void halt(void) __attribute__((noreturn)); |
@@ -158,6 +112,4 @@ __CALL_PAL_W1(wrvptptr, unsigned long); | |||
158 | #define tbia() __tbi(-2, /* no second argument */) | 112 | #define tbia() __tbi(-2, /* no second argument */) |
159 | 113 | ||
160 | #endif /* !__ASSEMBLY__ */ | 114 | #endif /* !__ASSEMBLY__ */ |
161 | #endif /* __KERNEL__ */ | ||
162 | |||
163 | #endif /* __ALPHA_PAL_H */ | 115 | #endif /* __ALPHA_PAL_H */ |
diff --git a/arch/alpha/include/asm/param.h b/arch/alpha/include/asm/param.h index e691ecfedb2c..bf46af51941b 100644 --- a/arch/alpha/include/asm/param.h +++ b/arch/alpha/include/asm/param.h | |||
@@ -1,27 +1,9 @@ | |||
1 | #ifndef _ASM_ALPHA_PARAM_H | 1 | #ifndef _ASM_ALPHA_PARAM_H |
2 | #define _ASM_ALPHA_PARAM_H | 2 | #define _ASM_ALPHA_PARAM_H |
3 | 3 | ||
4 | /* ??? Gross. I don't want to parameterize this, and supposedly the | 4 | #include <uapi/asm/param.h> |
5 | hardware ignores reprogramming. We also need userland buy-in to the | ||
6 | change in HZ, since this is visible in the wait4 resources etc. */ | ||
7 | 5 | ||
8 | #ifdef __KERNEL__ | ||
9 | #define HZ CONFIG_HZ | 6 | #define HZ CONFIG_HZ |
10 | #define USER_HZ HZ | 7 | #define USER_HZ HZ |
11 | #else | ||
12 | #define HZ 1024 | ||
13 | #endif | ||
14 | |||
15 | #define EXEC_PAGESIZE 8192 | ||
16 | |||
17 | #ifndef NOGROUP | ||
18 | #define NOGROUP (-1) | ||
19 | #endif | ||
20 | |||
21 | #define MAXHOSTNAMELEN 64 /* max length of hostname */ | ||
22 | |||
23 | #ifdef __KERNEL__ | ||
24 | # define CLOCKS_PER_SEC HZ /* frequency at which times() counts */ | 8 | # define CLOCKS_PER_SEC HZ /* frequency at which times() counts */ |
25 | #endif | ||
26 | |||
27 | #endif /* _ASM_ALPHA_PARAM_H */ | 9 | #endif /* _ASM_ALPHA_PARAM_H */ |
diff --git a/arch/alpha/include/asm/ptrace.h b/arch/alpha/include/asm/ptrace.h index b4c5b2fbb647..df9a6cd748d5 100644 --- a/arch/alpha/include/asm/ptrace.h +++ b/arch/alpha/include/asm/ptrace.h | |||
@@ -1,72 +1,8 @@ | |||
1 | #ifndef _ASMAXP_PTRACE_H | 1 | #ifndef _ASMAXP_PTRACE_H |
2 | #define _ASMAXP_PTRACE_H | 2 | #define _ASMAXP_PTRACE_H |
3 | 3 | ||
4 | #include <uapi/asm/ptrace.h> | ||
4 | 5 | ||
5 | /* | ||
6 | * This struct defines the way the registers are stored on the | ||
7 | * kernel stack during a system call or other kernel entry | ||
8 | * | ||
9 | * NOTE! I want to minimize the overhead of system calls, so this | ||
10 | * struct has as little information as possible. I does not have | ||
11 | * | ||
12 | * - floating point regs: the kernel doesn't change those | ||
13 | * - r9-15: saved by the C compiler | ||
14 | * | ||
15 | * This makes "fork()" and "exec()" a bit more complex, but should | ||
16 | * give us low system call latency. | ||
17 | */ | ||
18 | |||
19 | struct pt_regs { | ||
20 | unsigned long r0; | ||
21 | unsigned long r1; | ||
22 | unsigned long r2; | ||
23 | unsigned long r3; | ||
24 | unsigned long r4; | ||
25 | unsigned long r5; | ||
26 | unsigned long r6; | ||
27 | unsigned long r7; | ||
28 | unsigned long r8; | ||
29 | unsigned long r19; | ||
30 | unsigned long r20; | ||
31 | unsigned long r21; | ||
32 | unsigned long r22; | ||
33 | unsigned long r23; | ||
34 | unsigned long r24; | ||
35 | unsigned long r25; | ||
36 | unsigned long r26; | ||
37 | unsigned long r27; | ||
38 | unsigned long r28; | ||
39 | unsigned long hae; | ||
40 | /* JRP - These are the values provided to a0-a2 by PALcode */ | ||
41 | unsigned long trap_a0; | ||
42 | unsigned long trap_a1; | ||
43 | unsigned long trap_a2; | ||
44 | /* These are saved by PAL-code: */ | ||
45 | unsigned long ps; | ||
46 | unsigned long pc; | ||
47 | unsigned long gp; | ||
48 | unsigned long r16; | ||
49 | unsigned long r17; | ||
50 | unsigned long r18; | ||
51 | }; | ||
52 | |||
53 | /* | ||
54 | * This is the extended stack used by signal handlers and the context | ||
55 | * switcher: it's pushed after the normal "struct pt_regs". | ||
56 | */ | ||
57 | struct switch_stack { | ||
58 | unsigned long r9; | ||
59 | unsigned long r10; | ||
60 | unsigned long r11; | ||
61 | unsigned long r12; | ||
62 | unsigned long r13; | ||
63 | unsigned long r14; | ||
64 | unsigned long r15; | ||
65 | unsigned long r26; | ||
66 | unsigned long fp[32]; /* fp[31] is fpcr */ | ||
67 | }; | ||
68 | |||
69 | #ifdef __KERNEL__ | ||
70 | 6 | ||
71 | #define arch_has_single_step() (1) | 7 | #define arch_has_single_step() (1) |
72 | #define user_mode(regs) (((regs)->ps & 8) != 0) | 8 | #define user_mode(regs) (((regs)->ps & 8) != 0) |
@@ -83,5 +19,3 @@ struct switch_stack { | |||
83 | #define force_successful_syscall_return() (current_pt_regs()->r0 = 0) | 19 | #define force_successful_syscall_return() (current_pt_regs()->r0 = 0) |
84 | 20 | ||
85 | #endif | 21 | #endif |
86 | |||
87 | #endif | ||
diff --git a/arch/alpha/include/asm/signal.h b/arch/alpha/include/asm/signal.h index 45552862cc10..8a1ac28cd562 100644 --- a/arch/alpha/include/asm/signal.h +++ b/arch/alpha/include/asm/signal.h | |||
@@ -1,12 +1,8 @@ | |||
1 | #ifndef _ASMAXP_SIGNAL_H | 1 | #ifndef _ASMAXP_SIGNAL_H |
2 | #define _ASMAXP_SIGNAL_H | 2 | #define _ASMAXP_SIGNAL_H |
3 | 3 | ||
4 | #include <linux/types.h> | 4 | #include <uapi/asm/signal.h> |
5 | 5 | ||
6 | /* Avoid too many header ordering problems. */ | ||
7 | struct siginfo; | ||
8 | |||
9 | #ifdef __KERNEL__ | ||
10 | /* Digital Unix defines 64 signals. Most things should be clean enough | 6 | /* Digital Unix defines 64 signals. Most things should be clean enough |
11 | to redefine this at will, if care is taken to make libc match. */ | 7 | to redefine this at will, if care is taken to make libc match. */ |
12 | 8 | ||
@@ -20,100 +16,6 @@ typedef struct { | |||
20 | unsigned long sig[_NSIG_WORDS]; | 16 | unsigned long sig[_NSIG_WORDS]; |
21 | } sigset_t; | 17 | } sigset_t; |
22 | 18 | ||
23 | #else | ||
24 | /* Here we must cater to libcs that poke about in kernel headers. */ | ||
25 | |||
26 | #define NSIG 32 | ||
27 | typedef unsigned long sigset_t; | ||
28 | |||
29 | #endif /* __KERNEL__ */ | ||
30 | |||
31 | |||
32 | /* | ||
33 | * Linux/AXP has different signal numbers that Linux/i386: I'm trying | ||
34 | * to make it OSF/1 binary compatible, at least for normal binaries. | ||
35 | */ | ||
36 | #define SIGHUP 1 | ||
37 | #define SIGINT 2 | ||
38 | #define SIGQUIT 3 | ||
39 | #define SIGILL 4 | ||
40 | #define SIGTRAP 5 | ||
41 | #define SIGABRT 6 | ||
42 | #define SIGEMT 7 | ||
43 | #define SIGFPE 8 | ||
44 | #define SIGKILL 9 | ||
45 | #define SIGBUS 10 | ||
46 | #define SIGSEGV 11 | ||
47 | #define SIGSYS 12 | ||
48 | #define SIGPIPE 13 | ||
49 | #define SIGALRM 14 | ||
50 | #define SIGTERM 15 | ||
51 | #define SIGURG 16 | ||
52 | #define SIGSTOP 17 | ||
53 | #define SIGTSTP 18 | ||
54 | #define SIGCONT 19 | ||
55 | #define SIGCHLD 20 | ||
56 | #define SIGTTIN 21 | ||
57 | #define SIGTTOU 22 | ||
58 | #define SIGIO 23 | ||
59 | #define SIGXCPU 24 | ||
60 | #define SIGXFSZ 25 | ||
61 | #define SIGVTALRM 26 | ||
62 | #define SIGPROF 27 | ||
63 | #define SIGWINCH 28 | ||
64 | #define SIGINFO 29 | ||
65 | #define SIGUSR1 30 | ||
66 | #define SIGUSR2 31 | ||
67 | |||
68 | #define SIGPOLL SIGIO | ||
69 | #define SIGPWR SIGINFO | ||
70 | #define SIGIOT SIGABRT | ||
71 | |||
72 | /* These should not be considered constants from userland. */ | ||
73 | #define SIGRTMIN 32 | ||
74 | #define SIGRTMAX _NSIG | ||
75 | |||
76 | /* | ||
77 | * SA_FLAGS values: | ||
78 | * | ||
79 | * SA_ONSTACK indicates that a registered stack_t will be used. | ||
80 | * SA_RESTART flag to get restarting signals (which were the default long ago) | ||
81 | * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. | ||
82 | * SA_RESETHAND clears the handler when the signal is delivered. | ||
83 | * SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies. | ||
84 | * SA_NODEFER prevents the current signal from being masked in the handler. | ||
85 | * | ||
86 | * SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single | ||
87 | * Unix names RESETHAND and NODEFER respectively. | ||
88 | */ | ||
89 | |||
90 | #define SA_ONSTACK 0x00000001 | ||
91 | #define SA_RESTART 0x00000002 | ||
92 | #define SA_NOCLDSTOP 0x00000004 | ||
93 | #define SA_NODEFER 0x00000008 | ||
94 | #define SA_RESETHAND 0x00000010 | ||
95 | #define SA_NOCLDWAIT 0x00000020 | ||
96 | #define SA_SIGINFO 0x00000040 | ||
97 | |||
98 | #define SA_ONESHOT SA_RESETHAND | ||
99 | #define SA_NOMASK SA_NODEFER | ||
100 | |||
101 | /* | ||
102 | * sigaltstack controls | ||
103 | */ | ||
104 | #define SS_ONSTACK 1 | ||
105 | #define SS_DISABLE 2 | ||
106 | |||
107 | #define MINSIGSTKSZ 4096 | ||
108 | #define SIGSTKSZ 16384 | ||
109 | |||
110 | #define SIG_BLOCK 1 /* for blocking signals */ | ||
111 | #define SIG_UNBLOCK 2 /* for unblocking signals */ | ||
112 | #define SIG_SETMASK 3 /* for setting the signal mask */ | ||
113 | |||
114 | #include <asm-generic/signal-defs.h> | ||
115 | |||
116 | #ifdef __KERNEL__ | ||
117 | struct osf_sigaction { | 19 | struct osf_sigaction { |
118 | __sighandler_t sa_handler; | 20 | __sighandler_t sa_handler; |
119 | old_sigset_t sa_mask; | 21 | old_sigset_t sa_mask; |
@@ -130,40 +32,5 @@ struct k_sigaction { | |||
130 | struct sigaction sa; | 32 | struct sigaction sa; |
131 | __sigrestore_t ka_restorer; | 33 | __sigrestore_t ka_restorer; |
132 | }; | 34 | }; |
133 | #else | ||
134 | /* Here we must cater to libcs that poke about in kernel headers. */ | ||
135 | |||
136 | struct sigaction { | ||
137 | union { | ||
138 | __sighandler_t _sa_handler; | ||
139 | void (*_sa_sigaction)(int, struct siginfo *, void *); | ||
140 | } _u; | ||
141 | sigset_t sa_mask; | ||
142 | int sa_flags; | ||
143 | }; | ||
144 | |||
145 | #define sa_handler _u._sa_handler | ||
146 | #define sa_sigaction _u._sa_sigaction | ||
147 | |||
148 | #endif /* __KERNEL__ */ | ||
149 | |||
150 | typedef struct sigaltstack { | ||
151 | void __user *ss_sp; | ||
152 | int ss_flags; | ||
153 | size_t ss_size; | ||
154 | } stack_t; | ||
155 | |||
156 | /* sigstack(2) is deprecated, and will be withdrawn in a future version | ||
157 | of the X/Open CAE Specification. Use sigaltstack instead. It is only | ||
158 | implemented here for OSF/1 compatibility. */ | ||
159 | |||
160 | struct sigstack { | ||
161 | void __user *ss_sp; | ||
162 | int ss_onstack; | ||
163 | }; | ||
164 | |||
165 | #ifdef __KERNEL__ | ||
166 | #include <asm/sigcontext.h> | 35 | #include <asm/sigcontext.h> |
167 | #endif | 36 | #endif |
168 | |||
169 | #endif | ||
diff --git a/arch/alpha/include/asm/socket.h b/arch/alpha/include/asm/socket.h index 0087d053b77f..8d806d80ed24 100644 --- a/arch/alpha/include/asm/socket.h +++ b/arch/alpha/include/asm/socket.h | |||
@@ -1,87 +1,10 @@ | |||
1 | #ifndef _ASM_SOCKET_H | 1 | #ifndef _ASM_SOCKET_H |
2 | #define _ASM_SOCKET_H | 2 | #define _ASM_SOCKET_H |
3 | 3 | ||
4 | #include <asm/sockios.h> | 4 | #include <uapi/asm/socket.h> |
5 | 5 | ||
6 | /* For setsockopt(2) */ | ||
7 | /* | ||
8 | * Note: we only bother about making the SOL_SOCKET options | ||
9 | * same as OSF/1, as that's all that "normal" programs are | ||
10 | * likely to set. We don't necessarily want to be binary | ||
11 | * compatible with _everything_. | ||
12 | */ | ||
13 | #define SOL_SOCKET 0xffff | ||
14 | |||
15 | #define SO_DEBUG 0x0001 | ||
16 | #define SO_REUSEADDR 0x0004 | ||
17 | #define SO_KEEPALIVE 0x0008 | ||
18 | #define SO_DONTROUTE 0x0010 | ||
19 | #define SO_BROADCAST 0x0020 | ||
20 | #define SO_LINGER 0x0080 | ||
21 | #define SO_OOBINLINE 0x0100 | ||
22 | /* To add :#define SO_REUSEPORT 0x0200 */ | ||
23 | |||
24 | #define SO_TYPE 0x1008 | ||
25 | #define SO_ERROR 0x1007 | ||
26 | #define SO_SNDBUF 0x1001 | ||
27 | #define SO_RCVBUF 0x1002 | ||
28 | #define SO_SNDBUFFORCE 0x100a | ||
29 | #define SO_RCVBUFFORCE 0x100b | ||
30 | #define SO_RCVLOWAT 0x1010 | ||
31 | #define SO_SNDLOWAT 0x1011 | ||
32 | #define SO_RCVTIMEO 0x1012 | ||
33 | #define SO_SNDTIMEO 0x1013 | ||
34 | #define SO_ACCEPTCONN 0x1014 | ||
35 | #define SO_PROTOCOL 0x1028 | ||
36 | #define SO_DOMAIN 0x1029 | ||
37 | |||
38 | /* linux-specific, might as well be the same as on i386 */ | ||
39 | #define SO_NO_CHECK 11 | ||
40 | #define SO_PRIORITY 12 | ||
41 | #define SO_BSDCOMPAT 14 | ||
42 | |||
43 | #define SO_PASSCRED 17 | ||
44 | #define SO_PEERCRED 18 | ||
45 | #define SO_BINDTODEVICE 25 | ||
46 | |||
47 | /* Socket filtering */ | ||
48 | #define SO_ATTACH_FILTER 26 | ||
49 | #define SO_DETACH_FILTER 27 | ||
50 | #define SO_GET_FILTER SO_ATTACH_FILTER | ||
51 | |||
52 | #define SO_PEERNAME 28 | ||
53 | #define SO_TIMESTAMP 29 | ||
54 | #define SCM_TIMESTAMP SO_TIMESTAMP | ||
55 | |||
56 | #define SO_PEERSEC 30 | ||
57 | #define SO_PASSSEC 34 | ||
58 | #define SO_TIMESTAMPNS 35 | ||
59 | #define SCM_TIMESTAMPNS SO_TIMESTAMPNS | ||
60 | |||
61 | /* Security levels - as per NRL IPv6 - don't actually do anything */ | ||
62 | #define SO_SECURITY_AUTHENTICATION 19 | ||
63 | #define SO_SECURITY_ENCRYPTION_TRANSPORT 20 | ||
64 | #define SO_SECURITY_ENCRYPTION_NETWORK 21 | ||
65 | |||
66 | #define SO_MARK 36 | ||
67 | |||
68 | #define SO_TIMESTAMPING 37 | ||
69 | #define SCM_TIMESTAMPING SO_TIMESTAMPING | ||
70 | |||
71 | #define SO_RXQ_OVFL 40 | ||
72 | |||
73 | #define SO_WIFI_STATUS 41 | ||
74 | #define SCM_WIFI_STATUS SO_WIFI_STATUS | ||
75 | #define SO_PEEK_OFF 42 | ||
76 | |||
77 | /* Instruct lower device to use last 4-bytes of skb data as FCS */ | ||
78 | #define SO_NOFCS 43 | ||
79 | |||
80 | #ifdef __KERNEL__ | ||
81 | /* O_NONBLOCK clashes with the bits used for socket types. Therefore we | 6 | /* O_NONBLOCK clashes with the bits used for socket types. Therefore we |
82 | * have to define SOCK_NONBLOCK to a different value here. | 7 | * have to define SOCK_NONBLOCK to a different value here. |
83 | */ | 8 | */ |
84 | #define SOCK_NONBLOCK 0x40000000 | 9 | #define SOCK_NONBLOCK 0x40000000 |
85 | #endif /* __KERNEL__ */ | ||
86 | |||
87 | #endif /* _ASM_SOCKET_H */ | 10 | #endif /* _ASM_SOCKET_H */ |
diff --git a/arch/alpha/include/asm/termios.h b/arch/alpha/include/asm/termios.h index fa13716a11c3..7fde0f88da88 100644 --- a/arch/alpha/include/asm/termios.h +++ b/arch/alpha/include/asm/termios.h | |||
@@ -1,72 +1,8 @@ | |||
1 | #ifndef _ALPHA_TERMIOS_H | 1 | #ifndef _ALPHA_TERMIOS_H |
2 | #define _ALPHA_TERMIOS_H | 2 | #define _ALPHA_TERMIOS_H |
3 | 3 | ||
4 | #include <asm/ioctls.h> | 4 | #include <uapi/asm/termios.h> |
5 | #include <asm/termbits.h> | ||
6 | 5 | ||
7 | struct sgttyb { | ||
8 | char sg_ispeed; | ||
9 | char sg_ospeed; | ||
10 | char sg_erase; | ||
11 | char sg_kill; | ||
12 | short sg_flags; | ||
13 | }; | ||
14 | |||
15 | struct tchars { | ||
16 | char t_intrc; | ||
17 | char t_quitc; | ||
18 | char t_startc; | ||
19 | char t_stopc; | ||
20 | char t_eofc; | ||
21 | char t_brkc; | ||
22 | }; | ||
23 | |||
24 | struct ltchars { | ||
25 | char t_suspc; | ||
26 | char t_dsuspc; | ||
27 | char t_rprntc; | ||
28 | char t_flushc; | ||
29 | char t_werasc; | ||
30 | char t_lnextc; | ||
31 | }; | ||
32 | |||
33 | struct winsize { | ||
34 | unsigned short ws_row; | ||
35 | unsigned short ws_col; | ||
36 | unsigned short ws_xpixel; | ||
37 | unsigned short ws_ypixel; | ||
38 | }; | ||
39 | |||
40 | #define NCC 8 | ||
41 | struct termio { | ||
42 | unsigned short c_iflag; /* input mode flags */ | ||
43 | unsigned short c_oflag; /* output mode flags */ | ||
44 | unsigned short c_cflag; /* control mode flags */ | ||
45 | unsigned short c_lflag; /* local mode flags */ | ||
46 | unsigned char c_line; /* line discipline */ | ||
47 | unsigned char c_cc[NCC]; /* control characters */ | ||
48 | }; | ||
49 | |||
50 | /* | ||
51 | * c_cc characters in the termio structure. Oh, how I love being | ||
52 | * backwardly compatible. Notice that character 4 and 5 are | ||
53 | * interpreted differently depending on whether ICANON is set in | ||
54 | * c_lflag. If it's set, they are used as _VEOF and _VEOL, otherwise | ||
55 | * as _VMIN and V_TIME. This is for compatibility with OSF/1 (which | ||
56 | * is compatible with sysV)... | ||
57 | */ | ||
58 | #define _VINTR 0 | ||
59 | #define _VQUIT 1 | ||
60 | #define _VERASE 2 | ||
61 | #define _VKILL 3 | ||
62 | #define _VEOF 4 | ||
63 | #define _VMIN 4 | ||
64 | #define _VEOL 5 | ||
65 | #define _VTIME 5 | ||
66 | #define _VEOL2 6 | ||
67 | #define _VSWTC 7 | ||
68 | |||
69 | #ifdef __KERNEL__ | ||
70 | /* eof=^D eol=\0 eol2=\0 erase=del | 6 | /* eof=^D eol=\0 eol2=\0 erase=del |
71 | werase=^W kill=^U reprint=^R sxtc=\0 | 7 | werase=^W kill=^U reprint=^R sxtc=\0 |
72 | intr=^C quit=^\ susp=^Z <OSF/1 VDSUSP> | 8 | intr=^C quit=^\ susp=^Z <OSF/1 VDSUSP> |
@@ -141,6 +77,4 @@ struct termio { | |||
141 | #define kernel_termios_to_user_termios(u, k) \ | 77 | #define kernel_termios_to_user_termios(u, k) \ |
142 | copy_to_user(u, k, sizeof(struct termios)) | 78 | copy_to_user(u, k, sizeof(struct termios)) |
143 | 79 | ||
144 | #endif /* __KERNEL__ */ | ||
145 | |||
146 | #endif /* _ALPHA_TERMIOS_H */ | 80 | #endif /* _ALPHA_TERMIOS_H */ |
diff --git a/arch/alpha/include/asm/types.h b/arch/alpha/include/asm/types.h index 0a0579076f4a..f61e1a56c378 100644 --- a/arch/alpha/include/asm/types.h +++ b/arch/alpha/include/asm/types.h | |||
@@ -1,18 +1,7 @@ | |||
1 | #ifndef _ALPHA_TYPES_H | 1 | #ifndef _ALPHA_TYPES_H |
2 | #define _ALPHA_TYPES_H | 2 | #define _ALPHA_TYPES_H |
3 | 3 | ||
4 | /* | ||
5 | * This file is never included by application software unless | ||
6 | * explicitly requested (e.g., via linux/types.h) in which case the | ||
7 | * application is Linux specific so (user-) name space pollution is | ||
8 | * not a major issue. However, for interoperability, libraries still | ||
9 | * need to be careful to avoid a name clashes. | ||
10 | */ | ||
11 | |||
12 | #ifdef __KERNEL__ | ||
13 | #include <asm-generic/int-ll64.h> | 4 | #include <asm-generic/int-ll64.h> |
14 | #else | 5 | #include <uapi/asm/types.h> |
15 | #include <asm-generic/int-l64.h> | ||
16 | #endif | ||
17 | 6 | ||
18 | #endif /* _ALPHA_TYPES_H */ | 7 | #endif /* _ALPHA_TYPES_H */ |
diff --git a/arch/alpha/include/asm/unistd.h b/arch/alpha/include/asm/unistd.h index eb3a4664ced2..d6069ff3b1c8 100644 --- a/arch/alpha/include/asm/unistd.h +++ b/arch/alpha/include/asm/unistd.h | |||
@@ -1,474 +1,8 @@ | |||
1 | #ifndef _ALPHA_UNISTD_H | 1 | #ifndef _ALPHA_UNISTD_H |
2 | #define _ALPHA_UNISTD_H | 2 | #define _ALPHA_UNISTD_H |
3 | 3 | ||
4 | #define __NR_osf_syscall 0 /* not implemented */ | 4 | #include <uapi/asm/unistd.h> |
5 | #define __NR_exit 1 | ||
6 | #define __NR_fork 2 | ||
7 | #define __NR_read 3 | ||
8 | #define __NR_write 4 | ||
9 | #define __NR_osf_old_open 5 /* not implemented */ | ||
10 | #define __NR_close 6 | ||
11 | #define __NR_osf_wait4 7 | ||
12 | #define __NR_osf_old_creat 8 /* not implemented */ | ||
13 | #define __NR_link 9 | ||
14 | #define __NR_unlink 10 | ||
15 | #define __NR_osf_execve 11 /* not implemented */ | ||
16 | #define __NR_chdir 12 | ||
17 | #define __NR_fchdir 13 | ||
18 | #define __NR_mknod 14 | ||
19 | #define __NR_chmod 15 | ||
20 | #define __NR_chown 16 | ||
21 | #define __NR_brk 17 | ||
22 | #define __NR_osf_getfsstat 18 /* not implemented */ | ||
23 | #define __NR_lseek 19 | ||
24 | #define __NR_getxpid 20 | ||
25 | #define __NR_osf_mount 21 | ||
26 | #define __NR_umount 22 | ||
27 | #define __NR_setuid 23 | ||
28 | #define __NR_getxuid 24 | ||
29 | #define __NR_exec_with_loader 25 /* not implemented */ | ||
30 | #define __NR_ptrace 26 | ||
31 | #define __NR_osf_nrecvmsg 27 /* not implemented */ | ||
32 | #define __NR_osf_nsendmsg 28 /* not implemented */ | ||
33 | #define __NR_osf_nrecvfrom 29 /* not implemented */ | ||
34 | #define __NR_osf_naccept 30 /* not implemented */ | ||
35 | #define __NR_osf_ngetpeername 31 /* not implemented */ | ||
36 | #define __NR_osf_ngetsockname 32 /* not implemented */ | ||
37 | #define __NR_access 33 | ||
38 | #define __NR_osf_chflags 34 /* not implemented */ | ||
39 | #define __NR_osf_fchflags 35 /* not implemented */ | ||
40 | #define __NR_sync 36 | ||
41 | #define __NR_kill 37 | ||
42 | #define __NR_osf_old_stat 38 /* not implemented */ | ||
43 | #define __NR_setpgid 39 | ||
44 | #define __NR_osf_old_lstat 40 /* not implemented */ | ||
45 | #define __NR_dup 41 | ||
46 | #define __NR_pipe 42 | ||
47 | #define __NR_osf_set_program_attributes 43 | ||
48 | #define __NR_osf_profil 44 /* not implemented */ | ||
49 | #define __NR_open 45 | ||
50 | #define __NR_osf_old_sigaction 46 /* not implemented */ | ||
51 | #define __NR_getxgid 47 | ||
52 | #define __NR_osf_sigprocmask 48 | ||
53 | #define __NR_osf_getlogin 49 /* not implemented */ | ||
54 | #define __NR_osf_setlogin 50 /* not implemented */ | ||
55 | #define __NR_acct 51 | ||
56 | #define __NR_sigpending 52 | ||
57 | 5 | ||
58 | #define __NR_ioctl 54 | ||
59 | #define __NR_osf_reboot 55 /* not implemented */ | ||
60 | #define __NR_osf_revoke 56 /* not implemented */ | ||
61 | #define __NR_symlink 57 | ||
62 | #define __NR_readlink 58 | ||
63 | #define __NR_execve 59 | ||
64 | #define __NR_umask 60 | ||
65 | #define __NR_chroot 61 | ||
66 | #define __NR_osf_old_fstat 62 /* not implemented */ | ||
67 | #define __NR_getpgrp 63 | ||
68 | #define __NR_getpagesize 64 | ||
69 | #define __NR_osf_mremap 65 /* not implemented */ | ||
70 | #define __NR_vfork 66 | ||
71 | #define __NR_stat 67 | ||
72 | #define __NR_lstat 68 | ||
73 | #define __NR_osf_sbrk 69 /* not implemented */ | ||
74 | #define __NR_osf_sstk 70 /* not implemented */ | ||
75 | #define __NR_mmap 71 /* OSF/1 mmap is superset of Linux */ | ||
76 | #define __NR_osf_old_vadvise 72 /* not implemented */ | ||
77 | #define __NR_munmap 73 | ||
78 | #define __NR_mprotect 74 | ||
79 | #define __NR_madvise 75 | ||
80 | #define __NR_vhangup 76 | ||
81 | #define __NR_osf_kmodcall 77 /* not implemented */ | ||
82 | #define __NR_osf_mincore 78 /* not implemented */ | ||
83 | #define __NR_getgroups 79 | ||
84 | #define __NR_setgroups 80 | ||
85 | #define __NR_osf_old_getpgrp 81 /* not implemented */ | ||
86 | #define __NR_setpgrp 82 /* BSD alias for setpgid */ | ||
87 | #define __NR_osf_setitimer 83 | ||
88 | #define __NR_osf_old_wait 84 /* not implemented */ | ||
89 | #define __NR_osf_table 85 /* not implemented */ | ||
90 | #define __NR_osf_getitimer 86 | ||
91 | #define __NR_gethostname 87 | ||
92 | #define __NR_sethostname 88 | ||
93 | #define __NR_getdtablesize 89 | ||
94 | #define __NR_dup2 90 | ||
95 | #define __NR_fstat 91 | ||
96 | #define __NR_fcntl 92 | ||
97 | #define __NR_osf_select 93 | ||
98 | #define __NR_poll 94 | ||
99 | #define __NR_fsync 95 | ||
100 | #define __NR_setpriority 96 | ||
101 | #define __NR_socket 97 | ||
102 | #define __NR_connect 98 | ||
103 | #define __NR_accept 99 | ||
104 | #define __NR_getpriority 100 | ||
105 | #define __NR_send 101 | ||
106 | #define __NR_recv 102 | ||
107 | #define __NR_sigreturn 103 | ||
108 | #define __NR_bind 104 | ||
109 | #define __NR_setsockopt 105 | ||
110 | #define __NR_listen 106 | ||
111 | #define __NR_osf_plock 107 /* not implemented */ | ||
112 | #define __NR_osf_old_sigvec 108 /* not implemented */ | ||
113 | #define __NR_osf_old_sigblock 109 /* not implemented */ | ||
114 | #define __NR_osf_old_sigsetmask 110 /* not implemented */ | ||
115 | #define __NR_sigsuspend 111 | ||
116 | #define __NR_osf_sigstack 112 | ||
117 | #define __NR_recvmsg 113 | ||
118 | #define __NR_sendmsg 114 | ||
119 | #define __NR_osf_old_vtrace 115 /* not implemented */ | ||
120 | #define __NR_osf_gettimeofday 116 | ||
121 | #define __NR_osf_getrusage 117 | ||
122 | #define __NR_getsockopt 118 | ||
123 | |||
124 | #define __NR_readv 120 | ||
125 | #define __NR_writev 121 | ||
126 | #define __NR_osf_settimeofday 122 | ||
127 | #define __NR_fchown 123 | ||
128 | #define __NR_fchmod 124 | ||
129 | #define __NR_recvfrom 125 | ||
130 | #define __NR_setreuid 126 | ||
131 | #define __NR_setregid 127 | ||
132 | #define __NR_rename 128 | ||
133 | #define __NR_truncate 129 | ||
134 | #define __NR_ftruncate 130 | ||
135 | #define __NR_flock 131 | ||
136 | #define __NR_setgid 132 | ||
137 | #define __NR_sendto 133 | ||
138 | #define __NR_shutdown 134 | ||
139 | #define __NR_socketpair 135 | ||
140 | #define __NR_mkdir 136 | ||
141 | #define __NR_rmdir 137 | ||
142 | #define __NR_osf_utimes 138 | ||
143 | #define __NR_osf_old_sigreturn 139 /* not implemented */ | ||
144 | #define __NR_osf_adjtime 140 /* not implemented */ | ||
145 | #define __NR_getpeername 141 | ||
146 | #define __NR_osf_gethostid 142 /* not implemented */ | ||
147 | #define __NR_osf_sethostid 143 /* not implemented */ | ||
148 | #define __NR_getrlimit 144 | ||
149 | #define __NR_setrlimit 145 | ||
150 | #define __NR_osf_old_killpg 146 /* not implemented */ | ||
151 | #define __NR_setsid 147 | ||
152 | #define __NR_quotactl 148 | ||
153 | #define __NR_osf_oldquota 149 /* not implemented */ | ||
154 | #define __NR_getsockname 150 | ||
155 | |||
156 | #define __NR_osf_pid_block 153 /* not implemented */ | ||
157 | #define __NR_osf_pid_unblock 154 /* not implemented */ | ||
158 | |||
159 | #define __NR_sigaction 156 | ||
160 | #define __NR_osf_sigwaitprim 157 /* not implemented */ | ||
161 | #define __NR_osf_nfssvc 158 /* not implemented */ | ||
162 | #define __NR_osf_getdirentries 159 | ||
163 | #define __NR_osf_statfs 160 | ||
164 | #define __NR_osf_fstatfs 161 | ||
165 | |||
166 | #define __NR_osf_asynch_daemon 163 /* not implemented */ | ||
167 | #define __NR_osf_getfh 164 /* not implemented */ | ||
168 | #define __NR_osf_getdomainname 165 | ||
169 | #define __NR_setdomainname 166 | ||
170 | |||
171 | #define __NR_osf_exportfs 169 /* not implemented */ | ||
172 | |||
173 | #define __NR_osf_alt_plock 181 /* not implemented */ | ||
174 | |||
175 | #define __NR_osf_getmnt 184 /* not implemented */ | ||
176 | |||
177 | #define __NR_osf_alt_sigpending 187 /* not implemented */ | ||
178 | #define __NR_osf_alt_setsid 188 /* not implemented */ | ||
179 | |||
180 | #define __NR_osf_swapon 199 | ||
181 | #define __NR_msgctl 200 | ||
182 | #define __NR_msgget 201 | ||
183 | #define __NR_msgrcv 202 | ||
184 | #define __NR_msgsnd 203 | ||
185 | #define __NR_semctl 204 | ||
186 | #define __NR_semget 205 | ||
187 | #define __NR_semop 206 | ||
188 | #define __NR_osf_utsname 207 | ||
189 | #define __NR_lchown 208 | ||
190 | #define __NR_osf_shmat 209 | ||
191 | #define __NR_shmctl 210 | ||
192 | #define __NR_shmdt 211 | ||
193 | #define __NR_shmget 212 | ||
194 | #define __NR_osf_mvalid 213 /* not implemented */ | ||
195 | #define __NR_osf_getaddressconf 214 /* not implemented */ | ||
196 | #define __NR_osf_msleep 215 /* not implemented */ | ||
197 | #define __NR_osf_mwakeup 216 /* not implemented */ | ||
198 | #define __NR_msync 217 | ||
199 | #define __NR_osf_signal 218 /* not implemented */ | ||
200 | #define __NR_osf_utc_gettime 219 /* not implemented */ | ||
201 | #define __NR_osf_utc_adjtime 220 /* not implemented */ | ||
202 | |||
203 | #define __NR_osf_security 222 /* not implemented */ | ||
204 | #define __NR_osf_kloadcall 223 /* not implemented */ | ||
205 | |||
206 | #define __NR_osf_stat 224 | ||
207 | #define __NR_osf_lstat 225 | ||
208 | #define __NR_osf_fstat 226 | ||
209 | #define __NR_osf_statfs64 227 | ||
210 | #define __NR_osf_fstatfs64 228 | ||
211 | |||
212 | #define __NR_getpgid 233 | ||
213 | #define __NR_getsid 234 | ||
214 | #define __NR_sigaltstack 235 | ||
215 | #define __NR_osf_waitid 236 /* not implemented */ | ||
216 | #define __NR_osf_priocntlset 237 /* not implemented */ | ||
217 | #define __NR_osf_sigsendset 238 /* not implemented */ | ||
218 | #define __NR_osf_set_speculative 239 /* not implemented */ | ||
219 | #define __NR_osf_msfs_syscall 240 /* not implemented */ | ||
220 | #define __NR_osf_sysinfo 241 | ||
221 | #define __NR_osf_uadmin 242 /* not implemented */ | ||
222 | #define __NR_osf_fuser 243 /* not implemented */ | ||
223 | #define __NR_osf_proplist_syscall 244 | ||
224 | #define __NR_osf_ntp_adjtime 245 /* not implemented */ | ||
225 | #define __NR_osf_ntp_gettime 246 /* not implemented */ | ||
226 | #define __NR_osf_pathconf 247 /* not implemented */ | ||
227 | #define __NR_osf_fpathconf 248 /* not implemented */ | ||
228 | |||
229 | #define __NR_osf_uswitch 250 /* not implemented */ | ||
230 | #define __NR_osf_usleep_thread 251 | ||
231 | #define __NR_osf_audcntl 252 /* not implemented */ | ||
232 | #define __NR_osf_audgen 253 /* not implemented */ | ||
233 | #define __NR_sysfs 254 | ||
234 | #define __NR_osf_subsys_info 255 /* not implemented */ | ||
235 | #define __NR_osf_getsysinfo 256 | ||
236 | #define __NR_osf_setsysinfo 257 | ||
237 | #define __NR_osf_afs_syscall 258 /* not implemented */ | ||
238 | #define __NR_osf_swapctl 259 /* not implemented */ | ||
239 | #define __NR_osf_memcntl 260 /* not implemented */ | ||
240 | #define __NR_osf_fdatasync 261 /* not implemented */ | ||
241 | |||
242 | /* | ||
243 | * Ignore legacy syscalls that we don't use. | ||
244 | */ | ||
245 | #define __IGNORE_alarm | ||
246 | #define __IGNORE_creat | ||
247 | #define __IGNORE_getegid | ||
248 | #define __IGNORE_geteuid | ||
249 | #define __IGNORE_getgid | ||
250 | #define __IGNORE_getpid | ||
251 | #define __IGNORE_getppid | ||
252 | #define __IGNORE_getuid | ||
253 | #define __IGNORE_pause | ||
254 | #define __IGNORE_time | ||
255 | #define __IGNORE_utime | ||
256 | #define __IGNORE_umount2 | ||
257 | |||
258 | /* | ||
259 | * Linux-specific system calls begin at 300 | ||
260 | */ | ||
261 | #define __NR_bdflush 300 | ||
262 | #define __NR_sethae 301 | ||
263 | #define __NR_mount 302 | ||
264 | #define __NR_old_adjtimex 303 | ||
265 | #define __NR_swapoff 304 | ||
266 | #define __NR_getdents 305 | ||
267 | #define __NR_create_module 306 | ||
268 | #define __NR_init_module 307 | ||
269 | #define __NR_delete_module 308 | ||
270 | #define __NR_get_kernel_syms 309 | ||
271 | #define __NR_syslog 310 | ||
272 | #define __NR_reboot 311 | ||
273 | #define __NR_clone 312 | ||
274 | #define __NR_uselib 313 | ||
275 | #define __NR_mlock 314 | ||
276 | #define __NR_munlock 315 | ||
277 | #define __NR_mlockall 316 | ||
278 | #define __NR_munlockall 317 | ||
279 | #define __NR_sysinfo 318 | ||
280 | #define __NR__sysctl 319 | ||
281 | /* 320 was sys_idle. */ | ||
282 | #define __NR_oldumount 321 | ||
283 | #define __NR_swapon 322 | ||
284 | #define __NR_times 323 | ||
285 | #define __NR_personality 324 | ||
286 | #define __NR_setfsuid 325 | ||
287 | #define __NR_setfsgid 326 | ||
288 | #define __NR_ustat 327 | ||
289 | #define __NR_statfs 328 | ||
290 | #define __NR_fstatfs 329 | ||
291 | #define __NR_sched_setparam 330 | ||
292 | #define __NR_sched_getparam 331 | ||
293 | #define __NR_sched_setscheduler 332 | ||
294 | #define __NR_sched_getscheduler 333 | ||
295 | #define __NR_sched_yield 334 | ||
296 | #define __NR_sched_get_priority_max 335 | ||
297 | #define __NR_sched_get_priority_min 336 | ||
298 | #define __NR_sched_rr_get_interval 337 | ||
299 | #define __NR_afs_syscall 338 | ||
300 | #define __NR_uname 339 | ||
301 | #define __NR_nanosleep 340 | ||
302 | #define __NR_mremap 341 | ||
303 | #define __NR_nfsservctl 342 | ||
304 | #define __NR_setresuid 343 | ||
305 | #define __NR_getresuid 344 | ||
306 | #define __NR_pciconfig_read 345 | ||
307 | #define __NR_pciconfig_write 346 | ||
308 | #define __NR_query_module 347 | ||
309 | #define __NR_prctl 348 | ||
310 | #define __NR_pread64 349 | ||
311 | #define __NR_pwrite64 350 | ||
312 | #define __NR_rt_sigreturn 351 | ||
313 | #define __NR_rt_sigaction 352 | ||
314 | #define __NR_rt_sigprocmask 353 | ||
315 | #define __NR_rt_sigpending 354 | ||
316 | #define __NR_rt_sigtimedwait 355 | ||
317 | #define __NR_rt_sigqueueinfo 356 | ||
318 | #define __NR_rt_sigsuspend 357 | ||
319 | #define __NR_select 358 | ||
320 | #define __NR_gettimeofday 359 | ||
321 | #define __NR_settimeofday 360 | ||
322 | #define __NR_getitimer 361 | ||
323 | #define __NR_setitimer 362 | ||
324 | #define __NR_utimes 363 | ||
325 | #define __NR_getrusage 364 | ||
326 | #define __NR_wait4 365 | ||
327 | #define __NR_adjtimex 366 | ||
328 | #define __NR_getcwd 367 | ||
329 | #define __NR_capget 368 | ||
330 | #define __NR_capset 369 | ||
331 | #define __NR_sendfile 370 | ||
332 | #define __NR_setresgid 371 | ||
333 | #define __NR_getresgid 372 | ||
334 | #define __NR_dipc 373 | ||
335 | #define __NR_pivot_root 374 | ||
336 | #define __NR_mincore 375 | ||
337 | #define __NR_pciconfig_iobase 376 | ||
338 | #define __NR_getdents64 377 | ||
339 | #define __NR_gettid 378 | ||
340 | #define __NR_readahead 379 | ||
341 | /* 380 is unused */ | ||
342 | #define __NR_tkill 381 | ||
343 | #define __NR_setxattr 382 | ||
344 | #define __NR_lsetxattr 383 | ||
345 | #define __NR_fsetxattr 384 | ||
346 | #define __NR_getxattr 385 | ||
347 | #define __NR_lgetxattr 386 | ||
348 | #define __NR_fgetxattr 387 | ||
349 | #define __NR_listxattr 388 | ||
350 | #define __NR_llistxattr 389 | ||
351 | #define __NR_flistxattr 390 | ||
352 | #define __NR_removexattr 391 | ||
353 | #define __NR_lremovexattr 392 | ||
354 | #define __NR_fremovexattr 393 | ||
355 | #define __NR_futex 394 | ||
356 | #define __NR_sched_setaffinity 395 | ||
357 | #define __NR_sched_getaffinity 396 | ||
358 | #define __NR_tuxcall 397 | ||
359 | #define __NR_io_setup 398 | ||
360 | #define __NR_io_destroy 399 | ||
361 | #define __NR_io_getevents 400 | ||
362 | #define __NR_io_submit 401 | ||
363 | #define __NR_io_cancel 402 | ||
364 | #define __NR_exit_group 405 | ||
365 | #define __NR_lookup_dcookie 406 | ||
366 | #define __NR_epoll_create 407 | ||
367 | #define __NR_epoll_ctl 408 | ||
368 | #define __NR_epoll_wait 409 | ||
369 | /* Feb 2007: These three sys_epoll defines shouldn't be here but culling | ||
370 | * them would break userspace apps ... we'll kill them off in 2010 :) */ | ||
371 | #define __NR_sys_epoll_create __NR_epoll_create | ||
372 | #define __NR_sys_epoll_ctl __NR_epoll_ctl | ||
373 | #define __NR_sys_epoll_wait __NR_epoll_wait | ||
374 | #define __NR_remap_file_pages 410 | ||
375 | #define __NR_set_tid_address 411 | ||
376 | #define __NR_restart_syscall 412 | ||
377 | #define __NR_fadvise64 413 | ||
378 | #define __NR_timer_create 414 | ||
379 | #define __NR_timer_settime 415 | ||
380 | #define __NR_timer_gettime 416 | ||
381 | #define __NR_timer_getoverrun 417 | ||
382 | #define __NR_timer_delete 418 | ||
383 | #define __NR_clock_settime 419 | ||
384 | #define __NR_clock_gettime 420 | ||
385 | #define __NR_clock_getres 421 | ||
386 | #define __NR_clock_nanosleep 422 | ||
387 | #define __NR_semtimedop 423 | ||
388 | #define __NR_tgkill 424 | ||
389 | #define __NR_stat64 425 | ||
390 | #define __NR_lstat64 426 | ||
391 | #define __NR_fstat64 427 | ||
392 | #define __NR_vserver 428 | ||
393 | #define __NR_mbind 429 | ||
394 | #define __NR_get_mempolicy 430 | ||
395 | #define __NR_set_mempolicy 431 | ||
396 | #define __NR_mq_open 432 | ||
397 | #define __NR_mq_unlink 433 | ||
398 | #define __NR_mq_timedsend 434 | ||
399 | #define __NR_mq_timedreceive 435 | ||
400 | #define __NR_mq_notify 436 | ||
401 | #define __NR_mq_getsetattr 437 | ||
402 | #define __NR_waitid 438 | ||
403 | #define __NR_add_key 439 | ||
404 | #define __NR_request_key 440 | ||
405 | #define __NR_keyctl 441 | ||
406 | #define __NR_ioprio_set 442 | ||
407 | #define __NR_ioprio_get 443 | ||
408 | #define __NR_inotify_init 444 | ||
409 | #define __NR_inotify_add_watch 445 | ||
410 | #define __NR_inotify_rm_watch 446 | ||
411 | #define __NR_fdatasync 447 | ||
412 | #define __NR_kexec_load 448 | ||
413 | #define __NR_migrate_pages 449 | ||
414 | #define __NR_openat 450 | ||
415 | #define __NR_mkdirat 451 | ||
416 | #define __NR_mknodat 452 | ||
417 | #define __NR_fchownat 453 | ||
418 | #define __NR_futimesat 454 | ||
419 | #define __NR_fstatat64 455 | ||
420 | #define __NR_unlinkat 456 | ||
421 | #define __NR_renameat 457 | ||
422 | #define __NR_linkat 458 | ||
423 | #define __NR_symlinkat 459 | ||
424 | #define __NR_readlinkat 460 | ||
425 | #define __NR_fchmodat 461 | ||
426 | #define __NR_faccessat 462 | ||
427 | #define __NR_pselect6 463 | ||
428 | #define __NR_ppoll 464 | ||
429 | #define __NR_unshare 465 | ||
430 | #define __NR_set_robust_list 466 | ||
431 | #define __NR_get_robust_list 467 | ||
432 | #define __NR_splice 468 | ||
433 | #define __NR_sync_file_range 469 | ||
434 | #define __NR_tee 470 | ||
435 | #define __NR_vmsplice 471 | ||
436 | #define __NR_move_pages 472 | ||
437 | #define __NR_getcpu 473 | ||
438 | #define __NR_epoll_pwait 474 | ||
439 | #define __NR_utimensat 475 | ||
440 | #define __NR_signalfd 476 | ||
441 | #define __NR_timerfd 477 | ||
442 | #define __NR_eventfd 478 | ||
443 | #define __NR_recvmmsg 479 | ||
444 | #define __NR_fallocate 480 | ||
445 | #define __NR_timerfd_create 481 | ||
446 | #define __NR_timerfd_settime 482 | ||
447 | #define __NR_timerfd_gettime 483 | ||
448 | #define __NR_signalfd4 484 | ||
449 | #define __NR_eventfd2 485 | ||
450 | #define __NR_epoll_create1 486 | ||
451 | #define __NR_dup3 487 | ||
452 | #define __NR_pipe2 488 | ||
453 | #define __NR_inotify_init1 489 | ||
454 | #define __NR_preadv 490 | ||
455 | #define __NR_pwritev 491 | ||
456 | #define __NR_rt_tgsigqueueinfo 492 | ||
457 | #define __NR_perf_event_open 493 | ||
458 | #define __NR_fanotify_init 494 | ||
459 | #define __NR_fanotify_mark 495 | ||
460 | #define __NR_prlimit64 496 | ||
461 | #define __NR_name_to_handle_at 497 | ||
462 | #define __NR_open_by_handle_at 498 | ||
463 | #define __NR_clock_adjtime 499 | ||
464 | #define __NR_syncfs 500 | ||
465 | #define __NR_setns 501 | ||
466 | #define __NR_accept4 502 | ||
467 | #define __NR_sendmmsg 503 | ||
468 | #define __NR_process_vm_readv 504 | ||
469 | #define __NR_process_vm_writev 505 | ||
470 | |||
471 | #ifdef __KERNEL__ | ||
472 | 6 | ||
473 | #define NR_SYSCALLS 506 | 7 | #define NR_SYSCALLS 506 |
474 | 8 | ||
@@ -498,5 +32,4 @@ | |||
498 | 32 | ||
499 | #define cond_syscall(x) asm(".weak\t" #x "\n" #x " = sys_ni_syscall") | 33 | #define cond_syscall(x) asm(".weak\t" #x "\n" #x " = sys_ni_syscall") |
500 | 34 | ||
501 | #endif /* __KERNEL__ */ | ||
502 | #endif /* _ALPHA_UNISTD_H */ | 35 | #endif /* _ALPHA_UNISTD_H */ |
diff --git a/arch/alpha/include/uapi/asm/Kbuild b/arch/alpha/include/uapi/asm/Kbuild index baebb3da1d44..d96f2ef5b639 100644 --- a/arch/alpha/include/uapi/asm/Kbuild +++ b/arch/alpha/include/uapi/asm/Kbuild | |||
@@ -1,3 +1,43 @@ | |||
1 | # UAPI Header export list | 1 | # UAPI Header export list |
2 | include include/uapi/asm-generic/Kbuild.asm | 2 | include include/uapi/asm-generic/Kbuild.asm |
3 | 3 | ||
4 | header-y += a.out.h | ||
5 | header-y += auxvec.h | ||
6 | header-y += bitsperlong.h | ||
7 | header-y += byteorder.h | ||
8 | header-y += compiler.h | ||
9 | header-y += console.h | ||
10 | header-y += errno.h | ||
11 | header-y += fcntl.h | ||
12 | header-y += fpu.h | ||
13 | header-y += gentrap.h | ||
14 | header-y += ioctl.h | ||
15 | header-y += ioctls.h | ||
16 | header-y += ipcbuf.h | ||
17 | header-y += kvm_para.h | ||
18 | header-y += mman.h | ||
19 | header-y += msgbuf.h | ||
20 | header-y += pal.h | ||
21 | header-y += param.h | ||
22 | header-y += poll.h | ||
23 | header-y += posix_types.h | ||
24 | header-y += ptrace.h | ||
25 | header-y += reg.h | ||
26 | header-y += regdef.h | ||
27 | header-y += resource.h | ||
28 | header-y += sembuf.h | ||
29 | header-y += setup.h | ||
30 | header-y += shmbuf.h | ||
31 | header-y += sigcontext.h | ||
32 | header-y += siginfo.h | ||
33 | header-y += signal.h | ||
34 | header-y += socket.h | ||
35 | header-y += sockios.h | ||
36 | header-y += stat.h | ||
37 | header-y += statfs.h | ||
38 | header-y += swab.h | ||
39 | header-y += sysinfo.h | ||
40 | header-y += termbits.h | ||
41 | header-y += termios.h | ||
42 | header-y += types.h | ||
43 | header-y += unistd.h | ||
diff --git a/arch/alpha/include/uapi/asm/a.out.h b/arch/alpha/include/uapi/asm/a.out.h new file mode 100644 index 000000000000..547707246f63 --- /dev/null +++ b/arch/alpha/include/uapi/asm/a.out.h | |||
@@ -0,0 +1,91 @@ | |||
1 | #ifndef _UAPI__ALPHA_A_OUT_H__ | ||
2 | #define _UAPI__ALPHA_A_OUT_H__ | ||
3 | |||
4 | #include <linux/types.h> | ||
5 | |||
6 | /* | ||
7 | * OSF/1 ECOFF header structs. ECOFF files consist of: | ||
8 | * - a file header (struct filehdr), | ||
9 | * - an a.out header (struct aouthdr), | ||
10 | * - one or more section headers (struct scnhdr). | ||
11 | * The filhdr's "f_nscns" field contains the | ||
12 | * number of section headers. | ||
13 | */ | ||
14 | |||
15 | struct filehdr | ||
16 | { | ||
17 | /* OSF/1 "file" header */ | ||
18 | __u16 f_magic, f_nscns; | ||
19 | __u32 f_timdat; | ||
20 | __u64 f_symptr; | ||
21 | __u32 f_nsyms; | ||
22 | __u16 f_opthdr, f_flags; | ||
23 | }; | ||
24 | |||
25 | struct aouthdr | ||
26 | { | ||
27 | __u64 info; /* after that it looks quite normal.. */ | ||
28 | __u64 tsize; | ||
29 | __u64 dsize; | ||
30 | __u64 bsize; | ||
31 | __u64 entry; | ||
32 | __u64 text_start; /* with a few additions that actually make sense */ | ||
33 | __u64 data_start; | ||
34 | __u64 bss_start; | ||
35 | __u32 gprmask, fprmask; /* bitmask of general & floating point regs used in binary */ | ||
36 | __u64 gpvalue; | ||
37 | }; | ||
38 | |||
39 | struct scnhdr | ||
40 | { | ||
41 | char s_name[8]; | ||
42 | __u64 s_paddr; | ||
43 | __u64 s_vaddr; | ||
44 | __u64 s_size; | ||
45 | __u64 s_scnptr; | ||
46 | __u64 s_relptr; | ||
47 | __u64 s_lnnoptr; | ||
48 | __u16 s_nreloc; | ||
49 | __u16 s_nlnno; | ||
50 | __u32 s_flags; | ||
51 | }; | ||
52 | |||
53 | struct exec | ||
54 | { | ||
55 | /* OSF/1 "file" header */ | ||
56 | struct filehdr fh; | ||
57 | struct aouthdr ah; | ||
58 | }; | ||
59 | |||
60 | /* | ||
61 | * Define's so that the kernel exec code can access the a.out header | ||
62 | * fields... | ||
63 | */ | ||
64 | #define a_info ah.info | ||
65 | #define a_text ah.tsize | ||
66 | #define a_data ah.dsize | ||
67 | #define a_bss ah.bsize | ||
68 | #define a_entry ah.entry | ||
69 | #define a_textstart ah.text_start | ||
70 | #define a_datastart ah.data_start | ||
71 | #define a_bssstart ah.bss_start | ||
72 | #define a_gprmask ah.gprmask | ||
73 | #define a_fprmask ah.fprmask | ||
74 | #define a_gpvalue ah.gpvalue | ||
75 | |||
76 | #define N_TXTADDR(x) ((x).a_textstart) | ||
77 | #define N_DATADDR(x) ((x).a_datastart) | ||
78 | #define N_BSSADDR(x) ((x).a_bssstart) | ||
79 | #define N_DRSIZE(x) 0 | ||
80 | #define N_TRSIZE(x) 0 | ||
81 | #define N_SYMSIZE(x) 0 | ||
82 | |||
83 | #define AOUTHSZ sizeof(struct aouthdr) | ||
84 | #define SCNHSZ sizeof(struct scnhdr) | ||
85 | #define SCNROUND 16 | ||
86 | |||
87 | #define N_TXTOFF(x) \ | ||
88 | ((long) N_MAGIC(x) == ZMAGIC ? 0 : \ | ||
89 | (sizeof(struct exec) + (x).fh.f_nscns*SCNHSZ + SCNROUND - 1) & ~(SCNROUND - 1)) | ||
90 | |||
91 | #endif /* _UAPI__ALPHA_A_OUT_H__ */ | ||
diff --git a/arch/alpha/include/asm/auxvec.h b/arch/alpha/include/uapi/asm/auxvec.h index a3a579dfdb4d..a3a579dfdb4d 100644 --- a/arch/alpha/include/asm/auxvec.h +++ b/arch/alpha/include/uapi/asm/auxvec.h | |||
diff --git a/arch/alpha/include/asm/bitsperlong.h b/arch/alpha/include/uapi/asm/bitsperlong.h index ad57f7868203..ad57f7868203 100644 --- a/arch/alpha/include/asm/bitsperlong.h +++ b/arch/alpha/include/uapi/asm/bitsperlong.h | |||
diff --git a/arch/alpha/include/asm/byteorder.h b/arch/alpha/include/uapi/asm/byteorder.h index 73683093202d..73683093202d 100644 --- a/arch/alpha/include/asm/byteorder.h +++ b/arch/alpha/include/uapi/asm/byteorder.h | |||
diff --git a/arch/alpha/include/uapi/asm/compiler.h b/arch/alpha/include/uapi/asm/compiler.h new file mode 100644 index 000000000000..32cc7833f0c1 --- /dev/null +++ b/arch/alpha/include/uapi/asm/compiler.h | |||
@@ -0,0 +1,117 @@ | |||
1 | #ifndef _UAPI__ALPHA_COMPILER_H | ||
2 | #define _UAPI__ALPHA_COMPILER_H | ||
3 | |||
4 | /* | ||
5 | * Herein are macros we use when describing various patterns we want to GCC. | ||
6 | * In all cases we can get better schedules out of the compiler if we hide | ||
7 | * as little as possible inside inline assembly. However, we want to be | ||
8 | * able to know what we'll get out before giving up inline assembly. Thus | ||
9 | * these tests and macros. | ||
10 | */ | ||
11 | |||
12 | #if __GNUC__ == 3 && __GNUC_MINOR__ >= 4 || __GNUC__ > 3 | ||
13 | # define __kernel_insbl(val, shift) __builtin_alpha_insbl(val, shift) | ||
14 | # define __kernel_inswl(val, shift) __builtin_alpha_inswl(val, shift) | ||
15 | # define __kernel_insql(val, shift) __builtin_alpha_insql(val, shift) | ||
16 | # define __kernel_inslh(val, shift) __builtin_alpha_inslh(val, shift) | ||
17 | # define __kernel_extbl(val, shift) __builtin_alpha_extbl(val, shift) | ||
18 | # define __kernel_extwl(val, shift) __builtin_alpha_extwl(val, shift) | ||
19 | # define __kernel_cmpbge(a, b) __builtin_alpha_cmpbge(a, b) | ||
20 | #else | ||
21 | # define __kernel_insbl(val, shift) \ | ||
22 | ({ unsigned long __kir; \ | ||
23 | __asm__("insbl %2,%1,%0" : "=r"(__kir) : "rI"(shift), "r"(val)); \ | ||
24 | __kir; }) | ||
25 | # define __kernel_inswl(val, shift) \ | ||
26 | ({ unsigned long __kir; \ | ||
27 | __asm__("inswl %2,%1,%0" : "=r"(__kir) : "rI"(shift), "r"(val)); \ | ||
28 | __kir; }) | ||
29 | # define __kernel_insql(val, shift) \ | ||
30 | ({ unsigned long __kir; \ | ||
31 | __asm__("insql %2,%1,%0" : "=r"(__kir) : "rI"(shift), "r"(val)); \ | ||
32 | __kir; }) | ||
33 | # define __kernel_inslh(val, shift) \ | ||
34 | ({ unsigned long __kir; \ | ||
35 | __asm__("inslh %2,%1,%0" : "=r"(__kir) : "rI"(shift), "r"(val)); \ | ||
36 | __kir; }) | ||
37 | # define __kernel_extbl(val, shift) \ | ||
38 | ({ unsigned long __kir; \ | ||
39 | __asm__("extbl %2,%1,%0" : "=r"(__kir) : "rI"(shift), "r"(val)); \ | ||
40 | __kir; }) | ||
41 | # define __kernel_extwl(val, shift) \ | ||
42 | ({ unsigned long __kir; \ | ||
43 | __asm__("extwl %2,%1,%0" : "=r"(__kir) : "rI"(shift), "r"(val)); \ | ||
44 | __kir; }) | ||
45 | # define __kernel_cmpbge(a, b) \ | ||
46 | ({ unsigned long __kir; \ | ||
47 | __asm__("cmpbge %r2,%1,%0" : "=r"(__kir) : "rI"(b), "rJ"(a)); \ | ||
48 | __kir; }) | ||
49 | #endif | ||
50 | |||
51 | #ifdef __alpha_cix__ | ||
52 | # if __GNUC__ == 3 && __GNUC_MINOR__ >= 4 || __GNUC__ > 3 | ||
53 | # define __kernel_cttz(x) __builtin_ctzl(x) | ||
54 | # define __kernel_ctlz(x) __builtin_clzl(x) | ||
55 | # define __kernel_ctpop(x) __builtin_popcountl(x) | ||
56 | # else | ||
57 | # define __kernel_cttz(x) \ | ||
58 | ({ unsigned long __kir; \ | ||
59 | __asm__("cttz %1,%0" : "=r"(__kir) : "r"(x)); \ | ||
60 | __kir; }) | ||
61 | # define __kernel_ctlz(x) \ | ||
62 | ({ unsigned long __kir; \ | ||
63 | __asm__("ctlz %1,%0" : "=r"(__kir) : "r"(x)); \ | ||
64 | __kir; }) | ||
65 | # define __kernel_ctpop(x) \ | ||
66 | ({ unsigned long __kir; \ | ||
67 | __asm__("ctpop %1,%0" : "=r"(__kir) : "r"(x)); \ | ||
68 | __kir; }) | ||
69 | # endif | ||
70 | #else | ||
71 | # define __kernel_cttz(x) \ | ||
72 | ({ unsigned long __kir; \ | ||
73 | __asm__(".arch ev67; cttz %1,%0" : "=r"(__kir) : "r"(x)); \ | ||
74 | __kir; }) | ||
75 | # define __kernel_ctlz(x) \ | ||
76 | ({ unsigned long __kir; \ | ||
77 | __asm__(".arch ev67; ctlz %1,%0" : "=r"(__kir) : "r"(x)); \ | ||
78 | __kir; }) | ||
79 | # define __kernel_ctpop(x) \ | ||
80 | ({ unsigned long __kir; \ | ||
81 | __asm__(".arch ev67; ctpop %1,%0" : "=r"(__kir) : "r"(x)); \ | ||
82 | __kir; }) | ||
83 | #endif | ||
84 | |||
85 | |||
86 | /* | ||
87 | * Beginning with EGCS 1.1, GCC defines __alpha_bwx__ when the BWX | ||
88 | * extension is enabled. Previous versions did not define anything | ||
89 | * we could test during compilation -- too bad, so sad. | ||
90 | */ | ||
91 | |||
92 | #if defined(__alpha_bwx__) | ||
93 | #define __kernel_ldbu(mem) (mem) | ||
94 | #define __kernel_ldwu(mem) (mem) | ||
95 | #define __kernel_stb(val,mem) ((mem) = (val)) | ||
96 | #define __kernel_stw(val,mem) ((mem) = (val)) | ||
97 | #else | ||
98 | #define __kernel_ldbu(mem) \ | ||
99 | ({ unsigned char __kir; \ | ||
100 | __asm__(".arch ev56; \ | ||
101 | ldbu %0,%1" : "=r"(__kir) : "m"(mem)); \ | ||
102 | __kir; }) | ||
103 | #define __kernel_ldwu(mem) \ | ||
104 | ({ unsigned short __kir; \ | ||
105 | __asm__(".arch ev56; \ | ||
106 | ldwu %0,%1" : "=r"(__kir) : "m"(mem)); \ | ||
107 | __kir; }) | ||
108 | #define __kernel_stb(val,mem) \ | ||
109 | __asm__(".arch ev56; \ | ||
110 | stb %1,%0" : "=m"(mem) : "r"(val)) | ||
111 | #define __kernel_stw(val,mem) \ | ||
112 | __asm__(".arch ev56; \ | ||
113 | stw %1,%0" : "=m"(mem) : "r"(val)) | ||
114 | #endif | ||
115 | |||
116 | |||
117 | #endif /* _UAPI__ALPHA_COMPILER_H */ | ||
diff --git a/arch/alpha/include/uapi/asm/console.h b/arch/alpha/include/uapi/asm/console.h new file mode 100644 index 000000000000..fd08a191f360 --- /dev/null +++ b/arch/alpha/include/uapi/asm/console.h | |||
@@ -0,0 +1,50 @@ | |||
1 | #ifndef _UAPI__AXP_CONSOLE_H | ||
2 | #define _UAPI__AXP_CONSOLE_H | ||
3 | |||
4 | /* | ||
5 | * Console callback routine numbers | ||
6 | */ | ||
7 | #define CCB_GETC 0x01 | ||
8 | #define CCB_PUTS 0x02 | ||
9 | #define CCB_RESET_TERM 0x03 | ||
10 | #define CCB_SET_TERM_INT 0x04 | ||
11 | #define CCB_SET_TERM_CTL 0x05 | ||
12 | #define CCB_PROCESS_KEYCODE 0x06 | ||
13 | #define CCB_OPEN_CONSOLE 0x07 | ||
14 | #define CCB_CLOSE_CONSOLE 0x08 | ||
15 | |||
16 | #define CCB_OPEN 0x10 | ||
17 | #define CCB_CLOSE 0x11 | ||
18 | #define CCB_IOCTL 0x12 | ||
19 | #define CCB_READ 0x13 | ||
20 | #define CCB_WRITE 0x14 | ||
21 | |||
22 | #define CCB_SET_ENV 0x20 | ||
23 | #define CCB_RESET_ENV 0x21 | ||
24 | #define CCB_GET_ENV 0x22 | ||
25 | #define CCB_SAVE_ENV 0x23 | ||
26 | |||
27 | #define CCB_PSWITCH 0x30 | ||
28 | #define CCB_BIOS_EMUL 0x32 | ||
29 | |||
30 | /* | ||
31 | * Environment variable numbers | ||
32 | */ | ||
33 | #define ENV_AUTO_ACTION 0x01 | ||
34 | #define ENV_BOOT_DEV 0x02 | ||
35 | #define ENV_BOOTDEF_DEV 0x03 | ||
36 | #define ENV_BOOTED_DEV 0x04 | ||
37 | #define ENV_BOOT_FILE 0x05 | ||
38 | #define ENV_BOOTED_FILE 0x06 | ||
39 | #define ENV_BOOT_OSFLAGS 0x07 | ||
40 | #define ENV_BOOTED_OSFLAGS 0x08 | ||
41 | #define ENV_BOOT_RESET 0x09 | ||
42 | #define ENV_DUMP_DEV 0x0A | ||
43 | #define ENV_ENABLE_AUDIT 0x0B | ||
44 | #define ENV_LICENSE 0x0C | ||
45 | #define ENV_CHAR_SET 0x0D | ||
46 | #define ENV_LANGUAGE 0x0E | ||
47 | #define ENV_TTY_DEV 0x0F | ||
48 | |||
49 | |||
50 | #endif /* _UAPI__AXP_CONSOLE_H */ | ||
diff --git a/arch/alpha/include/asm/errno.h b/arch/alpha/include/uapi/asm/errno.h index e5f29ca28180..e5f29ca28180 100644 --- a/arch/alpha/include/asm/errno.h +++ b/arch/alpha/include/uapi/asm/errno.h | |||
diff --git a/arch/alpha/include/asm/fcntl.h b/arch/alpha/include/uapi/asm/fcntl.h index 6d9e805f18a7..6d9e805f18a7 100644 --- a/arch/alpha/include/asm/fcntl.h +++ b/arch/alpha/include/uapi/asm/fcntl.h | |||
diff --git a/arch/alpha/include/uapi/asm/fpu.h b/arch/alpha/include/uapi/asm/fpu.h new file mode 100644 index 000000000000..21a053ca2233 --- /dev/null +++ b/arch/alpha/include/uapi/asm/fpu.h | |||
@@ -0,0 +1,123 @@ | |||
1 | #ifndef _UAPI__ASM_ALPHA_FPU_H | ||
2 | #define _UAPI__ASM_ALPHA_FPU_H | ||
3 | |||
4 | |||
5 | /* | ||
6 | * Alpha floating-point control register defines: | ||
7 | */ | ||
8 | #define FPCR_DNOD (1UL<<47) /* denorm INV trap disable */ | ||
9 | #define FPCR_DNZ (1UL<<48) /* denorms to zero */ | ||
10 | #define FPCR_INVD (1UL<<49) /* invalid op disable (opt.) */ | ||
11 | #define FPCR_DZED (1UL<<50) /* division by zero disable (opt.) */ | ||
12 | #define FPCR_OVFD (1UL<<51) /* overflow disable (optional) */ | ||
13 | #define FPCR_INV (1UL<<52) /* invalid operation */ | ||
14 | #define FPCR_DZE (1UL<<53) /* division by zero */ | ||
15 | #define FPCR_OVF (1UL<<54) /* overflow */ | ||
16 | #define FPCR_UNF (1UL<<55) /* underflow */ | ||
17 | #define FPCR_INE (1UL<<56) /* inexact */ | ||
18 | #define FPCR_IOV (1UL<<57) /* integer overflow */ | ||
19 | #define FPCR_UNDZ (1UL<<60) /* underflow to zero (opt.) */ | ||
20 | #define FPCR_UNFD (1UL<<61) /* underflow disable (opt.) */ | ||
21 | #define FPCR_INED (1UL<<62) /* inexact disable (opt.) */ | ||
22 | #define FPCR_SUM (1UL<<63) /* summary bit */ | ||
23 | |||
24 | #define FPCR_DYN_SHIFT 58 /* first dynamic rounding mode bit */ | ||
25 | #define FPCR_DYN_CHOPPED (0x0UL << FPCR_DYN_SHIFT) /* towards 0 */ | ||
26 | #define FPCR_DYN_MINUS (0x1UL << FPCR_DYN_SHIFT) /* towards -INF */ | ||
27 | #define FPCR_DYN_NORMAL (0x2UL << FPCR_DYN_SHIFT) /* towards nearest */ | ||
28 | #define FPCR_DYN_PLUS (0x3UL << FPCR_DYN_SHIFT) /* towards +INF */ | ||
29 | #define FPCR_DYN_MASK (0x3UL << FPCR_DYN_SHIFT) | ||
30 | |||
31 | #define FPCR_MASK 0xffff800000000000L | ||
32 | |||
33 | /* | ||
34 | * IEEE trap enables are implemented in software. These per-thread | ||
35 | * bits are stored in the "ieee_state" field of "struct thread_info". | ||
36 | * Thus, the bits are defined so as not to conflict with the | ||
37 | * floating-point enable bit (which is architected). On top of that, | ||
38 | * we want to make these bits compatible with OSF/1 so | ||
39 | * ieee_set_fp_control() etc. can be implemented easily and | ||
40 | * compatibly. The corresponding definitions are in | ||
41 | * /usr/include/machine/fpu.h under OSF/1. | ||
42 | */ | ||
43 | #define IEEE_TRAP_ENABLE_INV (1UL<<1) /* invalid op */ | ||
44 | #define IEEE_TRAP_ENABLE_DZE (1UL<<2) /* division by zero */ | ||
45 | #define IEEE_TRAP_ENABLE_OVF (1UL<<3) /* overflow */ | ||
46 | #define IEEE_TRAP_ENABLE_UNF (1UL<<4) /* underflow */ | ||
47 | #define IEEE_TRAP_ENABLE_INE (1UL<<5) /* inexact */ | ||
48 | #define IEEE_TRAP_ENABLE_DNO (1UL<<6) /* denorm */ | ||
49 | #define IEEE_TRAP_ENABLE_MASK (IEEE_TRAP_ENABLE_INV | IEEE_TRAP_ENABLE_DZE |\ | ||
50 | IEEE_TRAP_ENABLE_OVF | IEEE_TRAP_ENABLE_UNF |\ | ||
51 | IEEE_TRAP_ENABLE_INE | IEEE_TRAP_ENABLE_DNO) | ||
52 | |||
53 | /* Denorm and Underflow flushing */ | ||
54 | #define IEEE_MAP_DMZ (1UL<<12) /* Map denorm inputs to zero */ | ||
55 | #define IEEE_MAP_UMZ (1UL<<13) /* Map underflowed outputs to zero */ | ||
56 | |||
57 | #define IEEE_MAP_MASK (IEEE_MAP_DMZ | IEEE_MAP_UMZ) | ||
58 | |||
59 | /* status bits coming from fpcr: */ | ||
60 | #define IEEE_STATUS_INV (1UL<<17) | ||
61 | #define IEEE_STATUS_DZE (1UL<<18) | ||
62 | #define IEEE_STATUS_OVF (1UL<<19) | ||
63 | #define IEEE_STATUS_UNF (1UL<<20) | ||
64 | #define IEEE_STATUS_INE (1UL<<21) | ||
65 | #define IEEE_STATUS_DNO (1UL<<22) | ||
66 | |||
67 | #define IEEE_STATUS_MASK (IEEE_STATUS_INV | IEEE_STATUS_DZE | \ | ||
68 | IEEE_STATUS_OVF | IEEE_STATUS_UNF | \ | ||
69 | IEEE_STATUS_INE | IEEE_STATUS_DNO) | ||
70 | |||
71 | #define IEEE_SW_MASK (IEEE_TRAP_ENABLE_MASK | \ | ||
72 | IEEE_STATUS_MASK | IEEE_MAP_MASK) | ||
73 | |||
74 | #define IEEE_CURRENT_RM_SHIFT 32 | ||
75 | #define IEEE_CURRENT_RM_MASK (3UL<<IEEE_CURRENT_RM_SHIFT) | ||
76 | |||
77 | #define IEEE_STATUS_TO_EXCSUM_SHIFT 16 | ||
78 | |||
79 | #define IEEE_INHERIT (1UL<<63) /* inherit on thread create? */ | ||
80 | |||
81 | /* | ||
82 | * Convert the software IEEE trap enable and status bits into the | ||
83 | * hardware fpcr format. | ||
84 | * | ||
85 | * Digital Unix engineers receive my thanks for not defining the | ||
86 | * software bits identical to the hardware bits. The chip designers | ||
87 | * receive my thanks for making all the not-implemented fpcr bits | ||
88 | * RAZ forcing us to use system calls to read/write this value. | ||
89 | */ | ||
90 | |||
91 | static inline unsigned long | ||
92 | ieee_swcr_to_fpcr(unsigned long sw) | ||
93 | { | ||
94 | unsigned long fp; | ||
95 | fp = (sw & IEEE_STATUS_MASK) << 35; | ||
96 | fp |= (sw & IEEE_MAP_DMZ) << 36; | ||
97 | fp |= (sw & IEEE_STATUS_MASK ? FPCR_SUM : 0); | ||
98 | fp |= (~sw & (IEEE_TRAP_ENABLE_INV | ||
99 | | IEEE_TRAP_ENABLE_DZE | ||
100 | | IEEE_TRAP_ENABLE_OVF)) << 48; | ||
101 | fp |= (~sw & (IEEE_TRAP_ENABLE_UNF | IEEE_TRAP_ENABLE_INE)) << 57; | ||
102 | fp |= (sw & IEEE_MAP_UMZ ? FPCR_UNDZ | FPCR_UNFD : 0); | ||
103 | fp |= (~sw & IEEE_TRAP_ENABLE_DNO) << 41; | ||
104 | return fp; | ||
105 | } | ||
106 | |||
107 | static inline unsigned long | ||
108 | ieee_fpcr_to_swcr(unsigned long fp) | ||
109 | { | ||
110 | unsigned long sw; | ||
111 | sw = (fp >> 35) & IEEE_STATUS_MASK; | ||
112 | sw |= (fp >> 36) & IEEE_MAP_DMZ; | ||
113 | sw |= (~fp >> 48) & (IEEE_TRAP_ENABLE_INV | ||
114 | | IEEE_TRAP_ENABLE_DZE | ||
115 | | IEEE_TRAP_ENABLE_OVF); | ||
116 | sw |= (~fp >> 57) & (IEEE_TRAP_ENABLE_UNF | IEEE_TRAP_ENABLE_INE); | ||
117 | sw |= (fp >> 47) & IEEE_MAP_UMZ; | ||
118 | sw |= (~fp >> 41) & IEEE_TRAP_ENABLE_DNO; | ||
119 | return sw; | ||
120 | } | ||
121 | |||
122 | |||
123 | #endif /* _UAPI__ASM_ALPHA_FPU_H */ | ||
diff --git a/arch/alpha/include/asm/gentrap.h b/arch/alpha/include/uapi/asm/gentrap.h index ae50cc3192c7..ae50cc3192c7 100644 --- a/arch/alpha/include/asm/gentrap.h +++ b/arch/alpha/include/uapi/asm/gentrap.h | |||
diff --git a/arch/alpha/include/asm/ioctl.h b/arch/alpha/include/uapi/asm/ioctl.h index fc63727f4178..fc63727f4178 100644 --- a/arch/alpha/include/asm/ioctl.h +++ b/arch/alpha/include/uapi/asm/ioctl.h | |||
diff --git a/arch/alpha/include/asm/ioctls.h b/arch/alpha/include/uapi/asm/ioctls.h index 92c557be49fc..92c557be49fc 100644 --- a/arch/alpha/include/asm/ioctls.h +++ b/arch/alpha/include/uapi/asm/ioctls.h | |||
diff --git a/arch/alpha/include/asm/ipcbuf.h b/arch/alpha/include/uapi/asm/ipcbuf.h index 84c7e51cb6d0..84c7e51cb6d0 100644 --- a/arch/alpha/include/asm/ipcbuf.h +++ b/arch/alpha/include/uapi/asm/ipcbuf.h | |||
diff --git a/arch/alpha/include/asm/kvm_para.h b/arch/alpha/include/uapi/asm/kvm_para.h index 14fab8f0b957..14fab8f0b957 100644 --- a/arch/alpha/include/asm/kvm_para.h +++ b/arch/alpha/include/uapi/asm/kvm_para.h | |||
diff --git a/arch/alpha/include/asm/mman.h b/arch/alpha/include/uapi/asm/mman.h index 0086b472bc2b..0086b472bc2b 100644 --- a/arch/alpha/include/asm/mman.h +++ b/arch/alpha/include/uapi/asm/mman.h | |||
diff --git a/arch/alpha/include/asm/msgbuf.h b/arch/alpha/include/uapi/asm/msgbuf.h index 98496501a2bb..98496501a2bb 100644 --- a/arch/alpha/include/asm/msgbuf.h +++ b/arch/alpha/include/uapi/asm/msgbuf.h | |||
diff --git a/arch/alpha/include/uapi/asm/pal.h b/arch/alpha/include/uapi/asm/pal.h new file mode 100644 index 000000000000..3c0ce08e5f59 --- /dev/null +++ b/arch/alpha/include/uapi/asm/pal.h | |||
@@ -0,0 +1,52 @@ | |||
1 | #ifndef _UAPI__ALPHA_PAL_H | ||
2 | #define _UAPI__ALPHA_PAL_H | ||
3 | |||
4 | /* | ||
5 | * Common PAL-code | ||
6 | */ | ||
7 | #define PAL_halt 0 | ||
8 | #define PAL_cflush 1 | ||
9 | #define PAL_draina 2 | ||
10 | #define PAL_bpt 128 | ||
11 | #define PAL_bugchk 129 | ||
12 | #define PAL_chmk 131 | ||
13 | #define PAL_callsys 131 | ||
14 | #define PAL_imb 134 | ||
15 | #define PAL_rduniq 158 | ||
16 | #define PAL_wruniq 159 | ||
17 | #define PAL_gentrap 170 | ||
18 | #define PAL_nphalt 190 | ||
19 | |||
20 | /* | ||
21 | * VMS specific PAL-code | ||
22 | */ | ||
23 | #define PAL_swppal 10 | ||
24 | #define PAL_mfpr_vptb 41 | ||
25 | |||
26 | /* | ||
27 | * OSF specific PAL-code | ||
28 | */ | ||
29 | #define PAL_cserve 9 | ||
30 | #define PAL_wripir 13 | ||
31 | #define PAL_rdmces 16 | ||
32 | #define PAL_wrmces 17 | ||
33 | #define PAL_wrfen 43 | ||
34 | #define PAL_wrvptptr 45 | ||
35 | #define PAL_jtopal 46 | ||
36 | #define PAL_swpctx 48 | ||
37 | #define PAL_wrval 49 | ||
38 | #define PAL_rdval 50 | ||
39 | #define PAL_tbi 51 | ||
40 | #define PAL_wrent 52 | ||
41 | #define PAL_swpipl 53 | ||
42 | #define PAL_rdps 54 | ||
43 | #define PAL_wrkgp 55 | ||
44 | #define PAL_wrusp 56 | ||
45 | #define PAL_wrperfmon 57 | ||
46 | #define PAL_rdusp 58 | ||
47 | #define PAL_whami 60 | ||
48 | #define PAL_retsys 61 | ||
49 | #define PAL_rti 63 | ||
50 | |||
51 | |||
52 | #endif /* _UAPI__ALPHA_PAL_H */ | ||
diff --git a/arch/alpha/include/uapi/asm/param.h b/arch/alpha/include/uapi/asm/param.h new file mode 100644 index 000000000000..29daed819ebd --- /dev/null +++ b/arch/alpha/include/uapi/asm/param.h | |||
@@ -0,0 +1,21 @@ | |||
1 | #ifndef _UAPI_ASM_ALPHA_PARAM_H | ||
2 | #define _UAPI_ASM_ALPHA_PARAM_H | ||
3 | |||
4 | /* ??? Gross. I don't want to parameterize this, and supposedly the | ||
5 | hardware ignores reprogramming. We also need userland buy-in to the | ||
6 | change in HZ, since this is visible in the wait4 resources etc. */ | ||
7 | |||
8 | #ifndef __KERNEL__ | ||
9 | #define HZ 1024 | ||
10 | #endif | ||
11 | |||
12 | #define EXEC_PAGESIZE 8192 | ||
13 | |||
14 | #ifndef NOGROUP | ||
15 | #define NOGROUP (-1) | ||
16 | #endif | ||
17 | |||
18 | #define MAXHOSTNAMELEN 64 /* max length of hostname */ | ||
19 | |||
20 | |||
21 | #endif /* _UAPI_ASM_ALPHA_PARAM_H */ | ||
diff --git a/arch/alpha/include/asm/poll.h b/arch/alpha/include/uapi/asm/poll.h index c98509d3149e..c98509d3149e 100644 --- a/arch/alpha/include/asm/poll.h +++ b/arch/alpha/include/uapi/asm/poll.h | |||
diff --git a/arch/alpha/include/asm/posix_types.h b/arch/alpha/include/uapi/asm/posix_types.h index 5a8a48320efe..5a8a48320efe 100644 --- a/arch/alpha/include/asm/posix_types.h +++ b/arch/alpha/include/uapi/asm/posix_types.h | |||
diff --git a/arch/alpha/include/uapi/asm/ptrace.h b/arch/alpha/include/uapi/asm/ptrace.h new file mode 100644 index 000000000000..5ce83fa9a05b --- /dev/null +++ b/arch/alpha/include/uapi/asm/ptrace.h | |||
@@ -0,0 +1,70 @@ | |||
1 | #ifndef _UAPI_ASMAXP_PTRACE_H | ||
2 | #define _UAPI_ASMAXP_PTRACE_H | ||
3 | |||
4 | |||
5 | /* | ||
6 | * This struct defines the way the registers are stored on the | ||
7 | * kernel stack during a system call or other kernel entry | ||
8 | * | ||
9 | * NOTE! I want to minimize the overhead of system calls, so this | ||
10 | * struct has as little information as possible. I does not have | ||
11 | * | ||
12 | * - floating point regs: the kernel doesn't change those | ||
13 | * - r9-15: saved by the C compiler | ||
14 | * | ||
15 | * This makes "fork()" and "exec()" a bit more complex, but should | ||
16 | * give us low system call latency. | ||
17 | */ | ||
18 | |||
19 | struct pt_regs { | ||
20 | unsigned long r0; | ||
21 | unsigned long r1; | ||
22 | unsigned long r2; | ||
23 | unsigned long r3; | ||
24 | unsigned long r4; | ||
25 | unsigned long r5; | ||
26 | unsigned long r6; | ||
27 | unsigned long r7; | ||
28 | unsigned long r8; | ||
29 | unsigned long r19; | ||
30 | unsigned long r20; | ||
31 | unsigned long r21; | ||
32 | unsigned long r22; | ||
33 | unsigned long r23; | ||
34 | unsigned long r24; | ||
35 | unsigned long r25; | ||
36 | unsigned long r26; | ||
37 | unsigned long r27; | ||
38 | unsigned long r28; | ||
39 | unsigned long hae; | ||
40 | /* JRP - These are the values provided to a0-a2 by PALcode */ | ||
41 | unsigned long trap_a0; | ||
42 | unsigned long trap_a1; | ||
43 | unsigned long trap_a2; | ||
44 | /* These are saved by PAL-code: */ | ||
45 | unsigned long ps; | ||
46 | unsigned long pc; | ||
47 | unsigned long gp; | ||
48 | unsigned long r16; | ||
49 | unsigned long r17; | ||
50 | unsigned long r18; | ||
51 | }; | ||
52 | |||
53 | /* | ||
54 | * This is the extended stack used by signal handlers and the context | ||
55 | * switcher: it's pushed after the normal "struct pt_regs". | ||
56 | */ | ||
57 | struct switch_stack { | ||
58 | unsigned long r9; | ||
59 | unsigned long r10; | ||
60 | unsigned long r11; | ||
61 | unsigned long r12; | ||
62 | unsigned long r13; | ||
63 | unsigned long r14; | ||
64 | unsigned long r15; | ||
65 | unsigned long r26; | ||
66 | unsigned long fp[32]; /* fp[31] is fpcr */ | ||
67 | }; | ||
68 | |||
69 | |||
70 | #endif /* _UAPI_ASMAXP_PTRACE_H */ | ||
diff --git a/arch/alpha/include/asm/reg.h b/arch/alpha/include/uapi/asm/reg.h index 86ff916fb069..86ff916fb069 100644 --- a/arch/alpha/include/asm/reg.h +++ b/arch/alpha/include/uapi/asm/reg.h | |||
diff --git a/arch/alpha/include/asm/regdef.h b/arch/alpha/include/uapi/asm/regdef.h index 142df9c4f8b8..142df9c4f8b8 100644 --- a/arch/alpha/include/asm/regdef.h +++ b/arch/alpha/include/uapi/asm/regdef.h | |||
diff --git a/arch/alpha/include/asm/resource.h b/arch/alpha/include/uapi/asm/resource.h index c10874ff5973..c10874ff5973 100644 --- a/arch/alpha/include/asm/resource.h +++ b/arch/alpha/include/uapi/asm/resource.h | |||
diff --git a/arch/alpha/include/asm/sembuf.h b/arch/alpha/include/uapi/asm/sembuf.h index 7b38b1534784..7b38b1534784 100644 --- a/arch/alpha/include/asm/sembuf.h +++ b/arch/alpha/include/uapi/asm/sembuf.h | |||
diff --git a/arch/alpha/include/asm/setup.h b/arch/alpha/include/uapi/asm/setup.h index b50014b30909..b50014b30909 100644 --- a/arch/alpha/include/asm/setup.h +++ b/arch/alpha/include/uapi/asm/setup.h | |||
diff --git a/arch/alpha/include/asm/shmbuf.h b/arch/alpha/include/uapi/asm/shmbuf.h index 37ee84f05085..37ee84f05085 100644 --- a/arch/alpha/include/asm/shmbuf.h +++ b/arch/alpha/include/uapi/asm/shmbuf.h | |||
diff --git a/arch/alpha/include/asm/sigcontext.h b/arch/alpha/include/uapi/asm/sigcontext.h index 323cdb026198..323cdb026198 100644 --- a/arch/alpha/include/asm/sigcontext.h +++ b/arch/alpha/include/uapi/asm/sigcontext.h | |||
diff --git a/arch/alpha/include/asm/siginfo.h b/arch/alpha/include/uapi/asm/siginfo.h index 9822362a8424..9822362a8424 100644 --- a/arch/alpha/include/asm/siginfo.h +++ b/arch/alpha/include/uapi/asm/siginfo.h | |||
diff --git a/arch/alpha/include/uapi/asm/signal.h b/arch/alpha/include/uapi/asm/signal.h new file mode 100644 index 000000000000..965bbfa59c65 --- /dev/null +++ b/arch/alpha/include/uapi/asm/signal.h | |||
@@ -0,0 +1,135 @@ | |||
1 | #ifndef _UAPI_ASMAXP_SIGNAL_H | ||
2 | #define _UAPI_ASMAXP_SIGNAL_H | ||
3 | |||
4 | #include <linux/types.h> | ||
5 | |||
6 | /* Avoid too many header ordering problems. */ | ||
7 | struct siginfo; | ||
8 | |||
9 | #ifndef __KERNEL__ | ||
10 | /* Here we must cater to libcs that poke about in kernel headers. */ | ||
11 | |||
12 | #define NSIG 32 | ||
13 | typedef unsigned long sigset_t; | ||
14 | |||
15 | #endif /* __KERNEL__ */ | ||
16 | |||
17 | |||
18 | /* | ||
19 | * Linux/AXP has different signal numbers that Linux/i386: I'm trying | ||
20 | * to make it OSF/1 binary compatible, at least for normal binaries. | ||
21 | */ | ||
22 | #define SIGHUP 1 | ||
23 | #define SIGINT 2 | ||
24 | #define SIGQUIT 3 | ||
25 | #define SIGILL 4 | ||
26 | #define SIGTRAP 5 | ||
27 | #define SIGABRT 6 | ||
28 | #define SIGEMT 7 | ||
29 | #define SIGFPE 8 | ||
30 | #define SIGKILL 9 | ||
31 | #define SIGBUS 10 | ||
32 | #define SIGSEGV 11 | ||
33 | #define SIGSYS 12 | ||
34 | #define SIGPIPE 13 | ||
35 | #define SIGALRM 14 | ||
36 | #define SIGTERM 15 | ||
37 | #define SIGURG 16 | ||
38 | #define SIGSTOP 17 | ||
39 | #define SIGTSTP 18 | ||
40 | #define SIGCONT 19 | ||
41 | #define SIGCHLD 20 | ||
42 | #define SIGTTIN 21 | ||
43 | #define SIGTTOU 22 | ||
44 | #define SIGIO 23 | ||
45 | #define SIGXCPU 24 | ||
46 | #define SIGXFSZ 25 | ||
47 | #define SIGVTALRM 26 | ||
48 | #define SIGPROF 27 | ||
49 | #define SIGWINCH 28 | ||
50 | #define SIGINFO 29 | ||
51 | #define SIGUSR1 30 | ||
52 | #define SIGUSR2 31 | ||
53 | |||
54 | #define SIGPOLL SIGIO | ||
55 | #define SIGPWR SIGINFO | ||
56 | #define SIGIOT SIGABRT | ||
57 | |||
58 | /* These should not be considered constants from userland. */ | ||
59 | #define SIGRTMIN 32 | ||
60 | #define SIGRTMAX _NSIG | ||
61 | |||
62 | /* | ||
63 | * SA_FLAGS values: | ||
64 | * | ||
65 | * SA_ONSTACK indicates that a registered stack_t will be used. | ||
66 | * SA_RESTART flag to get restarting signals (which were the default long ago) | ||
67 | * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. | ||
68 | * SA_RESETHAND clears the handler when the signal is delivered. | ||
69 | * SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies. | ||
70 | * SA_NODEFER prevents the current signal from being masked in the handler. | ||
71 | * | ||
72 | * SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single | ||
73 | * Unix names RESETHAND and NODEFER respectively. | ||
74 | */ | ||
75 | |||
76 | #define SA_ONSTACK 0x00000001 | ||
77 | #define SA_RESTART 0x00000002 | ||
78 | #define SA_NOCLDSTOP 0x00000004 | ||
79 | #define SA_NODEFER 0x00000008 | ||
80 | #define SA_RESETHAND 0x00000010 | ||
81 | #define SA_NOCLDWAIT 0x00000020 | ||
82 | #define SA_SIGINFO 0x00000040 | ||
83 | |||
84 | #define SA_ONESHOT SA_RESETHAND | ||
85 | #define SA_NOMASK SA_NODEFER | ||
86 | |||
87 | /* | ||
88 | * sigaltstack controls | ||
89 | */ | ||
90 | #define SS_ONSTACK 1 | ||
91 | #define SS_DISABLE 2 | ||
92 | |||
93 | #define MINSIGSTKSZ 4096 | ||
94 | #define SIGSTKSZ 16384 | ||
95 | |||
96 | #define SIG_BLOCK 1 /* for blocking signals */ | ||
97 | #define SIG_UNBLOCK 2 /* for unblocking signals */ | ||
98 | #define SIG_SETMASK 3 /* for setting the signal mask */ | ||
99 | |||
100 | #include <asm-generic/signal-defs.h> | ||
101 | |||
102 | #ifndef __KERNEL__ | ||
103 | /* Here we must cater to libcs that poke about in kernel headers. */ | ||
104 | |||
105 | struct sigaction { | ||
106 | union { | ||
107 | __sighandler_t _sa_handler; | ||
108 | void (*_sa_sigaction)(int, struct siginfo *, void *); | ||
109 | } _u; | ||
110 | sigset_t sa_mask; | ||
111 | int sa_flags; | ||
112 | }; | ||
113 | |||
114 | #define sa_handler _u._sa_handler | ||
115 | #define sa_sigaction _u._sa_sigaction | ||
116 | |||
117 | #endif /* __KERNEL__ */ | ||
118 | |||
119 | typedef struct sigaltstack { | ||
120 | void __user *ss_sp; | ||
121 | int ss_flags; | ||
122 | size_t ss_size; | ||
123 | } stack_t; | ||
124 | |||
125 | /* sigstack(2) is deprecated, and will be withdrawn in a future version | ||
126 | of the X/Open CAE Specification. Use sigaltstack instead. It is only | ||
127 | implemented here for OSF/1 compatibility. */ | ||
128 | |||
129 | struct sigstack { | ||
130 | void __user *ss_sp; | ||
131 | int ss_onstack; | ||
132 | }; | ||
133 | |||
134 | |||
135 | #endif /* _UAPI_ASMAXP_SIGNAL_H */ | ||
diff --git a/arch/alpha/include/uapi/asm/socket.h b/arch/alpha/include/uapi/asm/socket.h new file mode 100644 index 000000000000..097c1577735a --- /dev/null +++ b/arch/alpha/include/uapi/asm/socket.h | |||
@@ -0,0 +1,81 @@ | |||
1 | #ifndef _UAPI_ASM_SOCKET_H | ||
2 | #define _UAPI_ASM_SOCKET_H | ||
3 | |||
4 | #include <asm/sockios.h> | ||
5 | |||
6 | /* For setsockopt(2) */ | ||
7 | /* | ||
8 | * Note: we only bother about making the SOL_SOCKET options | ||
9 | * same as OSF/1, as that's all that "normal" programs are | ||
10 | * likely to set. We don't necessarily want to be binary | ||
11 | * compatible with _everything_. | ||
12 | */ | ||
13 | #define SOL_SOCKET 0xffff | ||
14 | |||
15 | #define SO_DEBUG 0x0001 | ||
16 | #define SO_REUSEADDR 0x0004 | ||
17 | #define SO_KEEPALIVE 0x0008 | ||
18 | #define SO_DONTROUTE 0x0010 | ||
19 | #define SO_BROADCAST 0x0020 | ||
20 | #define SO_LINGER 0x0080 | ||
21 | #define SO_OOBINLINE 0x0100 | ||
22 | /* To add :#define SO_REUSEPORT 0x0200 */ | ||
23 | |||
24 | #define SO_TYPE 0x1008 | ||
25 | #define SO_ERROR 0x1007 | ||
26 | #define SO_SNDBUF 0x1001 | ||
27 | #define SO_RCVBUF 0x1002 | ||
28 | #define SO_SNDBUFFORCE 0x100a | ||
29 | #define SO_RCVBUFFORCE 0x100b | ||
30 | #define SO_RCVLOWAT 0x1010 | ||
31 | #define SO_SNDLOWAT 0x1011 | ||
32 | #define SO_RCVTIMEO 0x1012 | ||
33 | #define SO_SNDTIMEO 0x1013 | ||
34 | #define SO_ACCEPTCONN 0x1014 | ||
35 | #define SO_PROTOCOL 0x1028 | ||
36 | #define SO_DOMAIN 0x1029 | ||
37 | |||
38 | /* linux-specific, might as well be the same as on i386 */ | ||
39 | #define SO_NO_CHECK 11 | ||
40 | #define SO_PRIORITY 12 | ||
41 | #define SO_BSDCOMPAT 14 | ||
42 | |||
43 | #define SO_PASSCRED 17 | ||
44 | #define SO_PEERCRED 18 | ||
45 | #define SO_BINDTODEVICE 25 | ||
46 | |||
47 | /* Socket filtering */ | ||
48 | #define SO_ATTACH_FILTER 26 | ||
49 | #define SO_DETACH_FILTER 27 | ||
50 | #define SO_GET_FILTER SO_ATTACH_FILTER | ||
51 | |||
52 | #define SO_PEERNAME 28 | ||
53 | #define SO_TIMESTAMP 29 | ||
54 | #define SCM_TIMESTAMP SO_TIMESTAMP | ||
55 | |||
56 | #define SO_PEERSEC 30 | ||
57 | #define SO_PASSSEC 34 | ||
58 | #define SO_TIMESTAMPNS 35 | ||
59 | #define SCM_TIMESTAMPNS SO_TIMESTAMPNS | ||
60 | |||
61 | /* Security levels - as per NRL IPv6 - don't actually do anything */ | ||
62 | #define SO_SECURITY_AUTHENTICATION 19 | ||
63 | #define SO_SECURITY_ENCRYPTION_TRANSPORT 20 | ||
64 | #define SO_SECURITY_ENCRYPTION_NETWORK 21 | ||
65 | |||
66 | #define SO_MARK 36 | ||
67 | |||
68 | #define SO_TIMESTAMPING 37 | ||
69 | #define SCM_TIMESTAMPING SO_TIMESTAMPING | ||
70 | |||
71 | #define SO_RXQ_OVFL 40 | ||
72 | |||
73 | #define SO_WIFI_STATUS 41 | ||
74 | #define SCM_WIFI_STATUS SO_WIFI_STATUS | ||
75 | #define SO_PEEK_OFF 42 | ||
76 | |||
77 | /* Instruct lower device to use last 4-bytes of skb data as FCS */ | ||
78 | #define SO_NOFCS 43 | ||
79 | |||
80 | |||
81 | #endif /* _UAPI_ASM_SOCKET_H */ | ||
diff --git a/arch/alpha/include/asm/sockios.h b/arch/alpha/include/uapi/asm/sockios.h index 7932c7ab4a4d..7932c7ab4a4d 100644 --- a/arch/alpha/include/asm/sockios.h +++ b/arch/alpha/include/uapi/asm/sockios.h | |||
diff --git a/arch/alpha/include/asm/stat.h b/arch/alpha/include/uapi/asm/stat.h index 07ad3e6b3f3e..07ad3e6b3f3e 100644 --- a/arch/alpha/include/asm/stat.h +++ b/arch/alpha/include/uapi/asm/stat.h | |||
diff --git a/arch/alpha/include/asm/statfs.h b/arch/alpha/include/uapi/asm/statfs.h index ccd2e186bfd8..ccd2e186bfd8 100644 --- a/arch/alpha/include/asm/statfs.h +++ b/arch/alpha/include/uapi/asm/statfs.h | |||
diff --git a/arch/alpha/include/asm/swab.h b/arch/alpha/include/uapi/asm/swab.h index 4d682b16c7c4..4d682b16c7c4 100644 --- a/arch/alpha/include/asm/swab.h +++ b/arch/alpha/include/uapi/asm/swab.h | |||
diff --git a/arch/alpha/include/asm/sysinfo.h b/arch/alpha/include/uapi/asm/sysinfo.h index 0b80e79d75e5..0b80e79d75e5 100644 --- a/arch/alpha/include/asm/sysinfo.h +++ b/arch/alpha/include/uapi/asm/sysinfo.h | |||
diff --git a/arch/alpha/include/asm/termbits.h b/arch/alpha/include/uapi/asm/termbits.h index 879dd3589921..879dd3589921 100644 --- a/arch/alpha/include/asm/termbits.h +++ b/arch/alpha/include/uapi/asm/termbits.h | |||
diff --git a/arch/alpha/include/uapi/asm/termios.h b/arch/alpha/include/uapi/asm/termios.h new file mode 100644 index 000000000000..580ed1e4854c --- /dev/null +++ b/arch/alpha/include/uapi/asm/termios.h | |||
@@ -0,0 +1,70 @@ | |||
1 | #ifndef _UAPI_ALPHA_TERMIOS_H | ||
2 | #define _UAPI_ALPHA_TERMIOS_H | ||
3 | |||
4 | #include <asm/ioctls.h> | ||
5 | #include <asm/termbits.h> | ||
6 | |||
7 | struct sgttyb { | ||
8 | char sg_ispeed; | ||
9 | char sg_ospeed; | ||
10 | char sg_erase; | ||
11 | char sg_kill; | ||
12 | short sg_flags; | ||
13 | }; | ||
14 | |||
15 | struct tchars { | ||
16 | char t_intrc; | ||
17 | char t_quitc; | ||
18 | char t_startc; | ||
19 | char t_stopc; | ||
20 | char t_eofc; | ||
21 | char t_brkc; | ||
22 | }; | ||
23 | |||
24 | struct ltchars { | ||
25 | char t_suspc; | ||
26 | char t_dsuspc; | ||
27 | char t_rprntc; | ||
28 | char t_flushc; | ||
29 | char t_werasc; | ||
30 | char t_lnextc; | ||
31 | }; | ||
32 | |||
33 | struct winsize { | ||
34 | unsigned short ws_row; | ||
35 | unsigned short ws_col; | ||
36 | unsigned short ws_xpixel; | ||
37 | unsigned short ws_ypixel; | ||
38 | }; | ||
39 | |||
40 | #define NCC 8 | ||
41 | struct termio { | ||
42 | unsigned short c_iflag; /* input mode flags */ | ||
43 | unsigned short c_oflag; /* output mode flags */ | ||
44 | unsigned short c_cflag; /* control mode flags */ | ||
45 | unsigned short c_lflag; /* local mode flags */ | ||
46 | unsigned char c_line; /* line discipline */ | ||
47 | unsigned char c_cc[NCC]; /* control characters */ | ||
48 | }; | ||
49 | |||
50 | /* | ||
51 | * c_cc characters in the termio structure. Oh, how I love being | ||
52 | * backwardly compatible. Notice that character 4 and 5 are | ||
53 | * interpreted differently depending on whether ICANON is set in | ||
54 | * c_lflag. If it's set, they are used as _VEOF and _VEOL, otherwise | ||
55 | * as _VMIN and V_TIME. This is for compatibility with OSF/1 (which | ||
56 | * is compatible with sysV)... | ||
57 | */ | ||
58 | #define _VINTR 0 | ||
59 | #define _VQUIT 1 | ||
60 | #define _VERASE 2 | ||
61 | #define _VKILL 3 | ||
62 | #define _VEOF 4 | ||
63 | #define _VMIN 4 | ||
64 | #define _VEOL 5 | ||
65 | #define _VTIME 5 | ||
66 | #define _VEOL2 6 | ||
67 | #define _VSWTC 7 | ||
68 | |||
69 | |||
70 | #endif /* _UAPI_ALPHA_TERMIOS_H */ | ||
diff --git a/arch/alpha/include/uapi/asm/types.h b/arch/alpha/include/uapi/asm/types.h new file mode 100644 index 000000000000..9fd3cd459777 --- /dev/null +++ b/arch/alpha/include/uapi/asm/types.h | |||
@@ -0,0 +1,16 @@ | |||
1 | #ifndef _UAPI_ALPHA_TYPES_H | ||
2 | #define _UAPI_ALPHA_TYPES_H | ||
3 | |||
4 | /* | ||
5 | * This file is never included by application software unless | ||
6 | * explicitly requested (e.g., via linux/types.h) in which case the | ||
7 | * application is Linux specific so (user-) name space pollution is | ||
8 | * not a major issue. However, for interoperability, libraries still | ||
9 | * need to be careful to avoid a name clashes. | ||
10 | */ | ||
11 | |||
12 | #ifndef __KERNEL__ | ||
13 | #include <asm-generic/int-l64.h> | ||
14 | #endif | ||
15 | |||
16 | #endif /* _UAPI_ALPHA_TYPES_H */ | ||
diff --git a/arch/alpha/include/uapi/asm/unistd.h b/arch/alpha/include/uapi/asm/unistd.h new file mode 100644 index 000000000000..801d28bcea51 --- /dev/null +++ b/arch/alpha/include/uapi/asm/unistd.h | |||
@@ -0,0 +1,471 @@ | |||
1 | #ifndef _UAPI_ALPHA_UNISTD_H | ||
2 | #define _UAPI_ALPHA_UNISTD_H | ||
3 | |||
4 | #define __NR_osf_syscall 0 /* not implemented */ | ||
5 | #define __NR_exit 1 | ||
6 | #define __NR_fork 2 | ||
7 | #define __NR_read 3 | ||
8 | #define __NR_write 4 | ||
9 | #define __NR_osf_old_open 5 /* not implemented */ | ||
10 | #define __NR_close 6 | ||
11 | #define __NR_osf_wait4 7 | ||
12 | #define __NR_osf_old_creat 8 /* not implemented */ | ||
13 | #define __NR_link 9 | ||
14 | #define __NR_unlink 10 | ||
15 | #define __NR_osf_execve 11 /* not implemented */ | ||
16 | #define __NR_chdir 12 | ||
17 | #define __NR_fchdir 13 | ||
18 | #define __NR_mknod 14 | ||
19 | #define __NR_chmod 15 | ||
20 | #define __NR_chown 16 | ||
21 | #define __NR_brk 17 | ||
22 | #define __NR_osf_getfsstat 18 /* not implemented */ | ||
23 | #define __NR_lseek 19 | ||
24 | #define __NR_getxpid 20 | ||
25 | #define __NR_osf_mount 21 | ||
26 | #define __NR_umount 22 | ||
27 | #define __NR_setuid 23 | ||
28 | #define __NR_getxuid 24 | ||
29 | #define __NR_exec_with_loader 25 /* not implemented */ | ||
30 | #define __NR_ptrace 26 | ||
31 | #define __NR_osf_nrecvmsg 27 /* not implemented */ | ||
32 | #define __NR_osf_nsendmsg 28 /* not implemented */ | ||
33 | #define __NR_osf_nrecvfrom 29 /* not implemented */ | ||
34 | #define __NR_osf_naccept 30 /* not implemented */ | ||
35 | #define __NR_osf_ngetpeername 31 /* not implemented */ | ||
36 | #define __NR_osf_ngetsockname 32 /* not implemented */ | ||
37 | #define __NR_access 33 | ||
38 | #define __NR_osf_chflags 34 /* not implemented */ | ||
39 | #define __NR_osf_fchflags 35 /* not implemented */ | ||
40 | #define __NR_sync 36 | ||
41 | #define __NR_kill 37 | ||
42 | #define __NR_osf_old_stat 38 /* not implemented */ | ||
43 | #define __NR_setpgid 39 | ||
44 | #define __NR_osf_old_lstat 40 /* not implemented */ | ||
45 | #define __NR_dup 41 | ||
46 | #define __NR_pipe 42 | ||
47 | #define __NR_osf_set_program_attributes 43 | ||
48 | #define __NR_osf_profil 44 /* not implemented */ | ||
49 | #define __NR_open 45 | ||
50 | #define __NR_osf_old_sigaction 46 /* not implemented */ | ||
51 | #define __NR_getxgid 47 | ||
52 | #define __NR_osf_sigprocmask 48 | ||
53 | #define __NR_osf_getlogin 49 /* not implemented */ | ||
54 | #define __NR_osf_setlogin 50 /* not implemented */ | ||
55 | #define __NR_acct 51 | ||
56 | #define __NR_sigpending 52 | ||
57 | |||
58 | #define __NR_ioctl 54 | ||
59 | #define __NR_osf_reboot 55 /* not implemented */ | ||
60 | #define __NR_osf_revoke 56 /* not implemented */ | ||
61 | #define __NR_symlink 57 | ||
62 | #define __NR_readlink 58 | ||
63 | #define __NR_execve 59 | ||
64 | #define __NR_umask 60 | ||
65 | #define __NR_chroot 61 | ||
66 | #define __NR_osf_old_fstat 62 /* not implemented */ | ||
67 | #define __NR_getpgrp 63 | ||
68 | #define __NR_getpagesize 64 | ||
69 | #define __NR_osf_mremap 65 /* not implemented */ | ||
70 | #define __NR_vfork 66 | ||
71 | #define __NR_stat 67 | ||
72 | #define __NR_lstat 68 | ||
73 | #define __NR_osf_sbrk 69 /* not implemented */ | ||
74 | #define __NR_osf_sstk 70 /* not implemented */ | ||
75 | #define __NR_mmap 71 /* OSF/1 mmap is superset of Linux */ | ||
76 | #define __NR_osf_old_vadvise 72 /* not implemented */ | ||
77 | #define __NR_munmap 73 | ||
78 | #define __NR_mprotect 74 | ||
79 | #define __NR_madvise 75 | ||
80 | #define __NR_vhangup 76 | ||
81 | #define __NR_osf_kmodcall 77 /* not implemented */ | ||
82 | #define __NR_osf_mincore 78 /* not implemented */ | ||
83 | #define __NR_getgroups 79 | ||
84 | #define __NR_setgroups 80 | ||
85 | #define __NR_osf_old_getpgrp 81 /* not implemented */ | ||
86 | #define __NR_setpgrp 82 /* BSD alias for setpgid */ | ||
87 | #define __NR_osf_setitimer 83 | ||
88 | #define __NR_osf_old_wait 84 /* not implemented */ | ||
89 | #define __NR_osf_table 85 /* not implemented */ | ||
90 | #define __NR_osf_getitimer 86 | ||
91 | #define __NR_gethostname 87 | ||
92 | #define __NR_sethostname 88 | ||
93 | #define __NR_getdtablesize 89 | ||
94 | #define __NR_dup2 90 | ||
95 | #define __NR_fstat 91 | ||
96 | #define __NR_fcntl 92 | ||
97 | #define __NR_osf_select 93 | ||
98 | #define __NR_poll 94 | ||
99 | #define __NR_fsync 95 | ||
100 | #define __NR_setpriority 96 | ||
101 | #define __NR_socket 97 | ||
102 | #define __NR_connect 98 | ||
103 | #define __NR_accept 99 | ||
104 | #define __NR_getpriority 100 | ||
105 | #define __NR_send 101 | ||
106 | #define __NR_recv 102 | ||
107 | #define __NR_sigreturn 103 | ||
108 | #define __NR_bind 104 | ||
109 | #define __NR_setsockopt 105 | ||
110 | #define __NR_listen 106 | ||
111 | #define __NR_osf_plock 107 /* not implemented */ | ||
112 | #define __NR_osf_old_sigvec 108 /* not implemented */ | ||
113 | #define __NR_osf_old_sigblock 109 /* not implemented */ | ||
114 | #define __NR_osf_old_sigsetmask 110 /* not implemented */ | ||
115 | #define __NR_sigsuspend 111 | ||
116 | #define __NR_osf_sigstack 112 | ||
117 | #define __NR_recvmsg 113 | ||
118 | #define __NR_sendmsg 114 | ||
119 | #define __NR_osf_old_vtrace 115 /* not implemented */ | ||
120 | #define __NR_osf_gettimeofday 116 | ||
121 | #define __NR_osf_getrusage 117 | ||
122 | #define __NR_getsockopt 118 | ||
123 | |||
124 | #define __NR_readv 120 | ||
125 | #define __NR_writev 121 | ||
126 | #define __NR_osf_settimeofday 122 | ||
127 | #define __NR_fchown 123 | ||
128 | #define __NR_fchmod 124 | ||
129 | #define __NR_recvfrom 125 | ||
130 | #define __NR_setreuid 126 | ||
131 | #define __NR_setregid 127 | ||
132 | #define __NR_rename 128 | ||
133 | #define __NR_truncate 129 | ||
134 | #define __NR_ftruncate 130 | ||
135 | #define __NR_flock 131 | ||
136 | #define __NR_setgid 132 | ||
137 | #define __NR_sendto 133 | ||
138 | #define __NR_shutdown 134 | ||
139 | #define __NR_socketpair 135 | ||
140 | #define __NR_mkdir 136 | ||
141 | #define __NR_rmdir 137 | ||
142 | #define __NR_osf_utimes 138 | ||
143 | #define __NR_osf_old_sigreturn 139 /* not implemented */ | ||
144 | #define __NR_osf_adjtime 140 /* not implemented */ | ||
145 | #define __NR_getpeername 141 | ||
146 | #define __NR_osf_gethostid 142 /* not implemented */ | ||
147 | #define __NR_osf_sethostid 143 /* not implemented */ | ||
148 | #define __NR_getrlimit 144 | ||
149 | #define __NR_setrlimit 145 | ||
150 | #define __NR_osf_old_killpg 146 /* not implemented */ | ||
151 | #define __NR_setsid 147 | ||
152 | #define __NR_quotactl 148 | ||
153 | #define __NR_osf_oldquota 149 /* not implemented */ | ||
154 | #define __NR_getsockname 150 | ||
155 | |||
156 | #define __NR_osf_pid_block 153 /* not implemented */ | ||
157 | #define __NR_osf_pid_unblock 154 /* not implemented */ | ||
158 | |||
159 | #define __NR_sigaction 156 | ||
160 | #define __NR_osf_sigwaitprim 157 /* not implemented */ | ||
161 | #define __NR_osf_nfssvc 158 /* not implemented */ | ||
162 | #define __NR_osf_getdirentries 159 | ||
163 | #define __NR_osf_statfs 160 | ||
164 | #define __NR_osf_fstatfs 161 | ||
165 | |||
166 | #define __NR_osf_asynch_daemon 163 /* not implemented */ | ||
167 | #define __NR_osf_getfh 164 /* not implemented */ | ||
168 | #define __NR_osf_getdomainname 165 | ||
169 | #define __NR_setdomainname 166 | ||
170 | |||
171 | #define __NR_osf_exportfs 169 /* not implemented */ | ||
172 | |||
173 | #define __NR_osf_alt_plock 181 /* not implemented */ | ||
174 | |||
175 | #define __NR_osf_getmnt 184 /* not implemented */ | ||
176 | |||
177 | #define __NR_osf_alt_sigpending 187 /* not implemented */ | ||
178 | #define __NR_osf_alt_setsid 188 /* not implemented */ | ||
179 | |||
180 | #define __NR_osf_swapon 199 | ||
181 | #define __NR_msgctl 200 | ||
182 | #define __NR_msgget 201 | ||
183 | #define __NR_msgrcv 202 | ||
184 | #define __NR_msgsnd 203 | ||
185 | #define __NR_semctl 204 | ||
186 | #define __NR_semget 205 | ||
187 | #define __NR_semop 206 | ||
188 | #define __NR_osf_utsname 207 | ||
189 | #define __NR_lchown 208 | ||
190 | #define __NR_osf_shmat 209 | ||
191 | #define __NR_shmctl 210 | ||
192 | #define __NR_shmdt 211 | ||
193 | #define __NR_shmget 212 | ||
194 | #define __NR_osf_mvalid 213 /* not implemented */ | ||
195 | #define __NR_osf_getaddressconf 214 /* not implemented */ | ||
196 | #define __NR_osf_msleep 215 /* not implemented */ | ||
197 | #define __NR_osf_mwakeup 216 /* not implemented */ | ||
198 | #define __NR_msync 217 | ||
199 | #define __NR_osf_signal 218 /* not implemented */ | ||
200 | #define __NR_osf_utc_gettime 219 /* not implemented */ | ||
201 | #define __NR_osf_utc_adjtime 220 /* not implemented */ | ||
202 | |||
203 | #define __NR_osf_security 222 /* not implemented */ | ||
204 | #define __NR_osf_kloadcall 223 /* not implemented */ | ||
205 | |||
206 | #define __NR_osf_stat 224 | ||
207 | #define __NR_osf_lstat 225 | ||
208 | #define __NR_osf_fstat 226 | ||
209 | #define __NR_osf_statfs64 227 | ||
210 | #define __NR_osf_fstatfs64 228 | ||
211 | |||
212 | #define __NR_getpgid 233 | ||
213 | #define __NR_getsid 234 | ||
214 | #define __NR_sigaltstack 235 | ||
215 | #define __NR_osf_waitid 236 /* not implemented */ | ||
216 | #define __NR_osf_priocntlset 237 /* not implemented */ | ||
217 | #define __NR_osf_sigsendset 238 /* not implemented */ | ||
218 | #define __NR_osf_set_speculative 239 /* not implemented */ | ||
219 | #define __NR_osf_msfs_syscall 240 /* not implemented */ | ||
220 | #define __NR_osf_sysinfo 241 | ||
221 | #define __NR_osf_uadmin 242 /* not implemented */ | ||
222 | #define __NR_osf_fuser 243 /* not implemented */ | ||
223 | #define __NR_osf_proplist_syscall 244 | ||
224 | #define __NR_osf_ntp_adjtime 245 /* not implemented */ | ||
225 | #define __NR_osf_ntp_gettime 246 /* not implemented */ | ||
226 | #define __NR_osf_pathconf 247 /* not implemented */ | ||
227 | #define __NR_osf_fpathconf 248 /* not implemented */ | ||
228 | |||
229 | #define __NR_osf_uswitch 250 /* not implemented */ | ||
230 | #define __NR_osf_usleep_thread 251 | ||
231 | #define __NR_osf_audcntl 252 /* not implemented */ | ||
232 | #define __NR_osf_audgen 253 /* not implemented */ | ||
233 | #define __NR_sysfs 254 | ||
234 | #define __NR_osf_subsys_info 255 /* not implemented */ | ||
235 | #define __NR_osf_getsysinfo 256 | ||
236 | #define __NR_osf_setsysinfo 257 | ||
237 | #define __NR_osf_afs_syscall 258 /* not implemented */ | ||
238 | #define __NR_osf_swapctl 259 /* not implemented */ | ||
239 | #define __NR_osf_memcntl 260 /* not implemented */ | ||
240 | #define __NR_osf_fdatasync 261 /* not implemented */ | ||
241 | |||
242 | /* | ||
243 | * Ignore legacy syscalls that we don't use. | ||
244 | */ | ||
245 | #define __IGNORE_alarm | ||
246 | #define __IGNORE_creat | ||
247 | #define __IGNORE_getegid | ||
248 | #define __IGNORE_geteuid | ||
249 | #define __IGNORE_getgid | ||
250 | #define __IGNORE_getpid | ||
251 | #define __IGNORE_getppid | ||
252 | #define __IGNORE_getuid | ||
253 | #define __IGNORE_pause | ||
254 | #define __IGNORE_time | ||
255 | #define __IGNORE_utime | ||
256 | #define __IGNORE_umount2 | ||
257 | |||
258 | /* | ||
259 | * Linux-specific system calls begin at 300 | ||
260 | */ | ||
261 | #define __NR_bdflush 300 | ||
262 | #define __NR_sethae 301 | ||
263 | #define __NR_mount 302 | ||
264 | #define __NR_old_adjtimex 303 | ||
265 | #define __NR_swapoff 304 | ||
266 | #define __NR_getdents 305 | ||
267 | #define __NR_create_module 306 | ||
268 | #define __NR_init_module 307 | ||
269 | #define __NR_delete_module 308 | ||
270 | #define __NR_get_kernel_syms 309 | ||
271 | #define __NR_syslog 310 | ||
272 | #define __NR_reboot 311 | ||
273 | #define __NR_clone 312 | ||
274 | #define __NR_uselib 313 | ||
275 | #define __NR_mlock 314 | ||
276 | #define __NR_munlock 315 | ||
277 | #define __NR_mlockall 316 | ||
278 | #define __NR_munlockall 317 | ||
279 | #define __NR_sysinfo 318 | ||
280 | #define __NR__sysctl 319 | ||
281 | /* 320 was sys_idle. */ | ||
282 | #define __NR_oldumount 321 | ||
283 | #define __NR_swapon 322 | ||
284 | #define __NR_times 323 | ||
285 | #define __NR_personality 324 | ||
286 | #define __NR_setfsuid 325 | ||
287 | #define __NR_setfsgid 326 | ||
288 | #define __NR_ustat 327 | ||
289 | #define __NR_statfs 328 | ||
290 | #define __NR_fstatfs 329 | ||
291 | #define __NR_sched_setparam 330 | ||
292 | #define __NR_sched_getparam 331 | ||
293 | #define __NR_sched_setscheduler 332 | ||
294 | #define __NR_sched_getscheduler 333 | ||
295 | #define __NR_sched_yield 334 | ||
296 | #define __NR_sched_get_priority_max 335 | ||
297 | #define __NR_sched_get_priority_min 336 | ||
298 | #define __NR_sched_rr_get_interval 337 | ||
299 | #define __NR_afs_syscall 338 | ||
300 | #define __NR_uname 339 | ||
301 | #define __NR_nanosleep 340 | ||
302 | #define __NR_mremap 341 | ||
303 | #define __NR_nfsservctl 342 | ||
304 | #define __NR_setresuid 343 | ||
305 | #define __NR_getresuid 344 | ||
306 | #define __NR_pciconfig_read 345 | ||
307 | #define __NR_pciconfig_write 346 | ||
308 | #define __NR_query_module 347 | ||
309 | #define __NR_prctl 348 | ||
310 | #define __NR_pread64 349 | ||
311 | #define __NR_pwrite64 350 | ||
312 | #define __NR_rt_sigreturn 351 | ||
313 | #define __NR_rt_sigaction 352 | ||
314 | #define __NR_rt_sigprocmask 353 | ||
315 | #define __NR_rt_sigpending 354 | ||
316 | #define __NR_rt_sigtimedwait 355 | ||
317 | #define __NR_rt_sigqueueinfo 356 | ||
318 | #define __NR_rt_sigsuspend 357 | ||
319 | #define __NR_select 358 | ||
320 | #define __NR_gettimeofday 359 | ||
321 | #define __NR_settimeofday 360 | ||
322 | #define __NR_getitimer 361 | ||
323 | #define __NR_setitimer 362 | ||
324 | #define __NR_utimes 363 | ||
325 | #define __NR_getrusage 364 | ||
326 | #define __NR_wait4 365 | ||
327 | #define __NR_adjtimex 366 | ||
328 | #define __NR_getcwd 367 | ||
329 | #define __NR_capget 368 | ||
330 | #define __NR_capset 369 | ||
331 | #define __NR_sendfile 370 | ||
332 | #define __NR_setresgid 371 | ||
333 | #define __NR_getresgid 372 | ||
334 | #define __NR_dipc 373 | ||
335 | #define __NR_pivot_root 374 | ||
336 | #define __NR_mincore 375 | ||
337 | #define __NR_pciconfig_iobase 376 | ||
338 | #define __NR_getdents64 377 | ||
339 | #define __NR_gettid 378 | ||
340 | #define __NR_readahead 379 | ||
341 | /* 380 is unused */ | ||
342 | #define __NR_tkill 381 | ||
343 | #define __NR_setxattr 382 | ||
344 | #define __NR_lsetxattr 383 | ||
345 | #define __NR_fsetxattr 384 | ||
346 | #define __NR_getxattr 385 | ||
347 | #define __NR_lgetxattr 386 | ||
348 | #define __NR_fgetxattr 387 | ||
349 | #define __NR_listxattr 388 | ||
350 | #define __NR_llistxattr 389 | ||
351 | #define __NR_flistxattr 390 | ||
352 | #define __NR_removexattr 391 | ||
353 | #define __NR_lremovexattr 392 | ||
354 | #define __NR_fremovexattr 393 | ||
355 | #define __NR_futex 394 | ||
356 | #define __NR_sched_setaffinity 395 | ||
357 | #define __NR_sched_getaffinity 396 | ||
358 | #define __NR_tuxcall 397 | ||
359 | #define __NR_io_setup 398 | ||
360 | #define __NR_io_destroy 399 | ||
361 | #define __NR_io_getevents 400 | ||
362 | #define __NR_io_submit 401 | ||
363 | #define __NR_io_cancel 402 | ||
364 | #define __NR_exit_group 405 | ||
365 | #define __NR_lookup_dcookie 406 | ||
366 | #define __NR_epoll_create 407 | ||
367 | #define __NR_epoll_ctl 408 | ||
368 | #define __NR_epoll_wait 409 | ||
369 | /* Feb 2007: These three sys_epoll defines shouldn't be here but culling | ||
370 | * them would break userspace apps ... we'll kill them off in 2010 :) */ | ||
371 | #define __NR_sys_epoll_create __NR_epoll_create | ||
372 | #define __NR_sys_epoll_ctl __NR_epoll_ctl | ||
373 | #define __NR_sys_epoll_wait __NR_epoll_wait | ||
374 | #define __NR_remap_file_pages 410 | ||
375 | #define __NR_set_tid_address 411 | ||
376 | #define __NR_restart_syscall 412 | ||
377 | #define __NR_fadvise64 413 | ||
378 | #define __NR_timer_create 414 | ||
379 | #define __NR_timer_settime 415 | ||
380 | #define __NR_timer_gettime 416 | ||
381 | #define __NR_timer_getoverrun 417 | ||
382 | #define __NR_timer_delete 418 | ||
383 | #define __NR_clock_settime 419 | ||
384 | #define __NR_clock_gettime 420 | ||
385 | #define __NR_clock_getres 421 | ||
386 | #define __NR_clock_nanosleep 422 | ||
387 | #define __NR_semtimedop 423 | ||
388 | #define __NR_tgkill 424 | ||
389 | #define __NR_stat64 425 | ||
390 | #define __NR_lstat64 426 | ||
391 | #define __NR_fstat64 427 | ||
392 | #define __NR_vserver 428 | ||
393 | #define __NR_mbind 429 | ||
394 | #define __NR_get_mempolicy 430 | ||
395 | #define __NR_set_mempolicy 431 | ||
396 | #define __NR_mq_open 432 | ||
397 | #define __NR_mq_unlink 433 | ||
398 | #define __NR_mq_timedsend 434 | ||
399 | #define __NR_mq_timedreceive 435 | ||
400 | #define __NR_mq_notify 436 | ||
401 | #define __NR_mq_getsetattr 437 | ||
402 | #define __NR_waitid 438 | ||
403 | #define __NR_add_key 439 | ||
404 | #define __NR_request_key 440 | ||
405 | #define __NR_keyctl 441 | ||
406 | #define __NR_ioprio_set 442 | ||
407 | #define __NR_ioprio_get 443 | ||
408 | #define __NR_inotify_init 444 | ||
409 | #define __NR_inotify_add_watch 445 | ||
410 | #define __NR_inotify_rm_watch 446 | ||
411 | #define __NR_fdatasync 447 | ||
412 | #define __NR_kexec_load 448 | ||
413 | #define __NR_migrate_pages 449 | ||
414 | #define __NR_openat 450 | ||
415 | #define __NR_mkdirat 451 | ||
416 | #define __NR_mknodat 452 | ||
417 | #define __NR_fchownat 453 | ||
418 | #define __NR_futimesat 454 | ||
419 | #define __NR_fstatat64 455 | ||
420 | #define __NR_unlinkat 456 | ||
421 | #define __NR_renameat 457 | ||
422 | #define __NR_linkat 458 | ||
423 | #define __NR_symlinkat 459 | ||
424 | #define __NR_readlinkat 460 | ||
425 | #define __NR_fchmodat 461 | ||
426 | #define __NR_faccessat 462 | ||
427 | #define __NR_pselect6 463 | ||
428 | #define __NR_ppoll 464 | ||
429 | #define __NR_unshare 465 | ||
430 | #define __NR_set_robust_list 466 | ||
431 | #define __NR_get_robust_list 467 | ||
432 | #define __NR_splice 468 | ||
433 | #define __NR_sync_file_range 469 | ||
434 | #define __NR_tee 470 | ||
435 | #define __NR_vmsplice 471 | ||
436 | #define __NR_move_pages 472 | ||
437 | #define __NR_getcpu 473 | ||
438 | #define __NR_epoll_pwait 474 | ||
439 | #define __NR_utimensat 475 | ||
440 | #define __NR_signalfd 476 | ||
441 | #define __NR_timerfd 477 | ||
442 | #define __NR_eventfd 478 | ||
443 | #define __NR_recvmmsg 479 | ||
444 | #define __NR_fallocate 480 | ||
445 | #define __NR_timerfd_create 481 | ||
446 | #define __NR_timerfd_settime 482 | ||
447 | #define __NR_timerfd_gettime 483 | ||
448 | #define __NR_signalfd4 484 | ||
449 | #define __NR_eventfd2 485 | ||
450 | #define __NR_epoll_create1 486 | ||
451 | #define __NR_dup3 487 | ||
452 | #define __NR_pipe2 488 | ||
453 | #define __NR_inotify_init1 489 | ||
454 | #define __NR_preadv 490 | ||
455 | #define __NR_pwritev 491 | ||
456 | #define __NR_rt_tgsigqueueinfo 492 | ||
457 | #define __NR_perf_event_open 493 | ||
458 | #define __NR_fanotify_init 494 | ||
459 | #define __NR_fanotify_mark 495 | ||
460 | #define __NR_prlimit64 496 | ||
461 | #define __NR_name_to_handle_at 497 | ||
462 | #define __NR_open_by_handle_at 498 | ||
463 | #define __NR_clock_adjtime 499 | ||
464 | #define __NR_syncfs 500 | ||
465 | #define __NR_setns 501 | ||
466 | #define __NR_accept4 502 | ||
467 | #define __NR_sendmmsg 503 | ||
468 | #define __NR_process_vm_readv 504 | ||
469 | #define __NR_process_vm_writev 505 | ||
470 | |||
471 | #endif /* _UAPI_ALPHA_UNISTD_H */ | ||