aboutsummaryrefslogtreecommitdiffstats
path: root/arch/alpha
diff options
context:
space:
mode:
Diffstat (limited to 'arch/alpha')
-rw-r--r--arch/alpha/Kconfig3
-rw-r--r--arch/alpha/include/asm/Kbuild10
-rw-r--r--arch/alpha/include/asm/a.out.h89
-rw-r--r--arch/alpha/include/asm/compiler.h115
-rw-r--r--arch/alpha/include/asm/console.h48
-rw-r--r--arch/alpha/include/asm/fpu.h124
-rw-r--r--arch/alpha/include/asm/mmzone.h2
-rw-r--r--arch/alpha/include/asm/pal.h50
-rw-r--r--arch/alpha/include/asm/param.h20
-rw-r--r--arch/alpha/include/asm/parport.h4
-rw-r--r--arch/alpha/include/asm/ptrace.h70
-rw-r--r--arch/alpha/include/asm/signal.h138
-rw-r--r--arch/alpha/include/asm/socket.h78
-rw-r--r--arch/alpha/include/asm/termios.h68
-rw-r--r--arch/alpha/include/asm/types.h13
-rw-r--r--arch/alpha/include/asm/unistd.h473
-rw-r--r--arch/alpha/include/uapi/asm/Kbuild40
-rw-r--r--arch/alpha/include/uapi/asm/a.out.h91
-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.h117
-rw-r--r--arch/alpha/include/uapi/asm/console.h50
-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.h123
-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)3
-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)11
-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.h52
-rw-r--r--arch/alpha/include/uapi/asm/param.h21
-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.h70
-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.h129
-rw-r--r--arch/alpha/include/uapi/asm/socket.h81
-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.h70
-rw-r--r--arch/alpha/include/uapi/asm/types.h16
-rw-r--r--arch/alpha/include/uapi/asm/unistd.h471
-rw-r--r--arch/alpha/kernel/binfmt_loader.c4
-rw-r--r--arch/alpha/kernel/entry.S51
-rw-r--r--arch/alpha/kernel/osf_sys.c6
-rw-r--r--arch/alpha/kernel/pci.c12
-rw-r--r--arch/alpha/kernel/pci_iommu.c12
-rw-r--r--arch/alpha/kernel/process.c62
-rw-r--r--arch/alpha/kernel/signal.c26
-rw-r--r--arch/alpha/kernel/smp.c6
-rw-r--r--arch/alpha/kernel/srmcons.c5
-rw-r--r--arch/alpha/kernel/sys_titan.c2
-rw-r--r--arch/alpha/kernel/systbls.S6
68 files changed, 1427 insertions, 1415 deletions
diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig
index e56c2d1dde70..9b504af2e966 100644
--- a/arch/alpha/Kconfig
+++ b/arch/alpha/Kconfig
@@ -19,10 +19,9 @@ config ALPHA
19 select GENERIC_CMOS_UPDATE 19 select GENERIC_CMOS_UPDATE
20 select GENERIC_STRNCPY_FROM_USER 20 select GENERIC_STRNCPY_FROM_USER
21 select GENERIC_STRNLEN_USER 21 select GENERIC_STRNLEN_USER
22 select GENERIC_KERNEL_THREAD
23 select GENERIC_KERNEL_EXECVE
24 select HAVE_MOD_ARCH_SPECIFIC 22 select HAVE_MOD_ARCH_SPECIFIC
25 select MODULES_USE_ELF_RELA 23 select MODULES_USE_ELF_RELA
24 select GENERIC_SIGALTSTACK
26 help 25 help
27 The Alpha is a 64-bit general-purpose processor designed and 26 The Alpha is a 64-bit general-purpose processor designed and
28 marketed by the Digital Equipment Corporation of blessed memory, 27 marketed by the Digital Equipment Corporation of blessed memory,
diff --git a/arch/alpha/include/asm/Kbuild b/arch/alpha/include/asm/Kbuild
index 64ffc9e9e548..a6e85f448c1c 100644
--- a/arch/alpha/include/asm/Kbuild
+++ b/arch/alpha/include/asm/Kbuild
@@ -1,13 +1,5 @@
1include include/asm-generic/Kbuild.asm
2 1
3generic-y += clkdev.h 2generic-y += clkdev.h
4 3
5header-y += compiler.h
6header-y += console.h
7header-y += fpu.h
8header-y += gentrap.h
9header-y += pal.h
10header-y += reg.h
11header-y += regdef.h
12header-y += sysinfo.h
13generic-y += exec.h 4generic-y += exec.h
5generic-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
15struct 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
25struct 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
39struct 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
53struct 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__
51extern long callback_puts(long unit, const char *s, long length); 7extern long callback_puts(long unit, const char *s, long length);
52extern long callback_getc(long unit); 8extern long callback_getc(long unit);
@@ -70,6 +26,4 @@ struct hwrpb_struct;
70extern int callback_init_done; 26extern int callback_init_done;
71extern void * callback_init(void *); 27extern 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
94static inline unsigned long
95ieee_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
110static inline unsigned long
111ieee_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);
192extern unsigned long alpha_read_fp_reg_s (unsigned long reg); 72extern unsigned long alpha_read_fp_reg_s (unsigned long reg);
193extern void alpha_write_fp_reg_s (unsigned long reg, unsigned long val); 73extern 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/mmzone.h b/arch/alpha/include/asm/mmzone.h
index 445dc42e0334..c5b5d6bac9ed 100644
--- a/arch/alpha/include/asm/mmzone.h
+++ b/arch/alpha/include/asm/mmzone.h
@@ -66,7 +66,7 @@ PLAT_NODE_DATA_LOCALNR(unsigned long p, int n)
66 ((unsigned long)__va(NODE_DATA(kvaddr_to_nid(kaddr))->node_start_pfn \ 66 ((unsigned long)__va(NODE_DATA(kvaddr_to_nid(kaddr))->node_start_pfn \
67 << PAGE_SHIFT)) 67 << PAGE_SHIFT))
68 68
69/* XXX: FIXME -- wli */ 69/* XXX: FIXME -- nyc */
70#define kern_addr_valid(kaddr) (0) 70#define kern_addr_valid(kaddr) (0)
71 71
72#define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT) 72#define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT)
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
54extern void halt(void) __attribute__((noreturn)); 8extern 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/parport.h b/arch/alpha/include/asm/parport.h
index c5ee7cbb2fcd..6abd0af11f13 100644
--- a/arch/alpha/include/asm/parport.h
+++ b/arch/alpha/include/asm/parport.h
@@ -9,8 +9,8 @@
9#ifndef _ASM_AXP_PARPORT_H 9#ifndef _ASM_AXP_PARPORT_H
10#define _ASM_AXP_PARPORT_H 1 10#define _ASM_AXP_PARPORT_H 1
11 11
12static int __devinit parport_pc_find_isa_ports (int autoirq, int autodma); 12static int parport_pc_find_isa_ports (int autoirq, int autodma);
13static int __devinit parport_pc_find_nonpci_ports (int autoirq, int autodma) 13static int parport_pc_find_nonpci_ports (int autoirq, int autodma)
14{ 14{
15 return parport_pc_find_isa_ports (autoirq, autodma); 15 return parport_pc_find_isa_ports (autoirq, autodma);
16} 16}
diff --git a/arch/alpha/include/asm/ptrace.h b/arch/alpha/include/asm/ptrace.h
index b87755a19554..21128505ddbe 100644
--- a/arch/alpha/include/asm/ptrace.h
+++ b/arch/alpha/include/asm/ptrace.h
@@ -1,86 +1,22 @@
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
19struct 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 */
57struct 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)
73#define instruction_pointer(regs) ((regs)->pc) 9#define instruction_pointer(regs) ((regs)->pc)
74#define profile_pc(regs) instruction_pointer(regs) 10#define profile_pc(regs) instruction_pointer(regs)
11#define current_user_stack_pointer() rdusp()
75 12
76#define task_pt_regs(task) \ 13#define task_pt_regs(task) \
77 ((struct pt_regs *) (task_stack_page(task) + 2*PAGE_SIZE) - 1) 14 ((struct pt_regs *) (task_stack_page(task) + 2*PAGE_SIZE) - 1)
78 15
79#define current_pt_regs() \ 16#define current_pt_regs() \
80 ((struct pt_regs *) ((char *)current_thread_info() + 2*PAGE_SIZE) - 1) 17 ((struct pt_regs *) ((char *)current_thread_info() + 2*PAGE_SIZE) - 1)
18#define signal_pt_regs current_pt_regs
81 19
82#define force_successful_syscall_return() (current_pt_regs()->r0 = 0) 20#define force_successful_syscall_return() (current_pt_regs()->r0 = 0)
83 21
84#endif 22#endif
85
86#endif
diff --git a/arch/alpha/include/asm/signal.h b/arch/alpha/include/asm/signal.h
index a9388300abb1..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. */
7struct 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
27typedef 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__
117struct osf_sigaction { 19struct 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,43 +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
136struct 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
150typedef 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
160struct 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
168#define ptrace_signal_deliver(regs, cookie) do { } while (0)
169
170#endif
171
172#endif 36#endif
diff --git a/arch/alpha/include/asm/socket.h b/arch/alpha/include/asm/socket.h
index 7d2f75be932e..8d806d80ed24 100644
--- a/arch/alpha/include/asm/socket.h
+++ b/arch/alpha/include/asm/socket.h
@@ -1,86 +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
51#define SO_PEERNAME 28
52#define SO_TIMESTAMP 29
53#define SCM_TIMESTAMP SO_TIMESTAMP
54
55#define SO_PEERSEC 30
56#define SO_PASSSEC 34
57#define SO_TIMESTAMPNS 35
58#define SCM_TIMESTAMPNS SO_TIMESTAMPNS
59
60/* Security levels - as per NRL IPv6 - don't actually do anything */
61#define SO_SECURITY_AUTHENTICATION 19
62#define SO_SECURITY_ENCRYPTION_TRANSPORT 20
63#define SO_SECURITY_ENCRYPTION_NETWORK 21
64
65#define SO_MARK 36
66
67#define SO_TIMESTAMPING 37
68#define SCM_TIMESTAMPING SO_TIMESTAMPING
69
70#define SO_RXQ_OVFL 40
71
72#define SO_WIFI_STATUS 41
73#define SCM_WIFI_STATUS SO_WIFI_STATUS
74#define SO_PEEK_OFF 42
75
76/* Instruct lower device to use last 4-bytes of skb data as FCS */
77#define SO_NOFCS 43
78
79#ifdef __KERNEL__
80/* 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
81 * have to define SOCK_NONBLOCK to a different value here. 7 * have to define SOCK_NONBLOCK to a different value here.
82 */ 8 */
83#define SOCK_NONBLOCK 0x40000000 9#define SOCK_NONBLOCK 0x40000000
84#endif /* __KERNEL__ */
85
86#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
7struct sgttyb {
8 char sg_ispeed;
9 char sg_ospeed;
10 char sg_erase;
11 char sg_kill;
12 short sg_flags;
13};
14
15struct 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
24struct 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
33struct 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
41struct 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 7826e227e4d0..b3396ee039b7 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
@@ -481,7 +15,9 @@
481#define __ARCH_WANT_SYS_OLDUMOUNT 15#define __ARCH_WANT_SYS_OLDUMOUNT
482#define __ARCH_WANT_SYS_SIGPENDING 16#define __ARCH_WANT_SYS_SIGPENDING
483#define __ARCH_WANT_SYS_RT_SIGSUSPEND 17#define __ARCH_WANT_SYS_RT_SIGSUSPEND
484#define __ARCH_WANT_SYS_EXECVE 18#define __ARCH_WANT_SYS_FORK
19#define __ARCH_WANT_SYS_VFORK
20#define __ARCH_WANT_SYS_CLONE
485 21
486/* "Conditional" syscalls. What we want is 22/* "Conditional" syscalls. What we want is
487 23
@@ -495,5 +31,4 @@
495 31
496#define cond_syscall(x) asm(".weak\t" #x "\n" #x " = sys_ni_syscall") 32#define cond_syscall(x) asm(".weak\t" #x "\n" #x " = sys_ni_syscall")
497 33
498#endif /* __KERNEL__ */
499#endif /* _ALPHA_UNISTD_H */ 34#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
2include include/uapi/asm-generic/Kbuild.asm 2include include/uapi/asm-generic/Kbuild.asm
3 3
4header-y += a.out.h
5header-y += auxvec.h
6header-y += bitsperlong.h
7header-y += byteorder.h
8header-y += compiler.h
9header-y += console.h
10header-y += errno.h
11header-y += fcntl.h
12header-y += fpu.h
13header-y += gentrap.h
14header-y += ioctl.h
15header-y += ioctls.h
16header-y += ipcbuf.h
17header-y += kvm_para.h
18header-y += mman.h
19header-y += msgbuf.h
20header-y += pal.h
21header-y += param.h
22header-y += poll.h
23header-y += posix_types.h
24header-y += ptrace.h
25header-y += reg.h
26header-y += regdef.h
27header-y += resource.h
28header-y += sembuf.h
29header-y += setup.h
30header-y += shmbuf.h
31header-y += sigcontext.h
32header-y += siginfo.h
33header-y += signal.h
34header-y += socket.h
35header-y += sockios.h
36header-y += stat.h
37header-y += statfs.h
38header-y += swab.h
39header-y += sysinfo.h
40header-y += termbits.h
41header-y += termios.h
42header-y += types.h
43header-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
15struct 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
25struct 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
39struct 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
53struct 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
91static inline unsigned long
92ieee_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
107static inline unsigned long
108ieee_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 80e1cee90f1f..92c557be49fc 100644
--- a/arch/alpha/include/asm/ioctls.h
+++ b/arch/alpha/include/uapi/asm/ioctls.h
@@ -95,6 +95,9 @@
95#define TIOCGDEV _IOR('T',0x32, unsigned int) /* Get primary device node of /dev/console */ 95#define TIOCGDEV _IOR('T',0x32, unsigned int) /* Get primary device node of /dev/console */
96#define TIOCSIG _IOW('T',0x36, int) /* Generate signal on Pty slave */ 96#define TIOCSIG _IOW('T',0x36, int) /* Generate signal on Pty slave */
97#define TIOCVHANGUP 0x5437 97#define TIOCVHANGUP 0x5437
98#define TIOCGPKT _IOR('T', 0x38, int) /* Get packet mode state */
99#define TIOCGPTLCK _IOR('T', 0x39, int) /* Get Pty lock state */
100#define TIOCGEXCL _IOR('T', 0x40, int) /* Get exclusive mode state */
98 101
99#define TIOCSERCONFIG 0x5453 102#define TIOCSERCONFIG 0x5453
100#define TIOCSERGWILD 0x5454 103#define TIOCSERGWILD 0x5454
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 cbeb3616a28e..0086b472bc2b 100644
--- a/arch/alpha/include/asm/mman.h
+++ b/arch/alpha/include/uapi/asm/mman.h
@@ -63,4 +63,15 @@
63/* compatibility flags */ 63/* compatibility flags */
64#define MAP_FILE 0 64#define MAP_FILE 0
65 65
66/*
67 * When MAP_HUGETLB is set bits [26:31] encode the log2 of the huge page size.
68 * This gives us 6 bits, which is enough until someone invents 128 bit address
69 * spaces.
70 *
71 * Assume these are all power of twos.
72 * When 0 use the default page size.
73 */
74#define MAP_HUGE_SHIFT 26
75#define MAP_HUGE_MASK 0x3f
76
66#endif /* __ALPHA_MMAN_H__ */ 77#endif /* __ALPHA_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
19struct 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 */
57struct 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..dd4ca4bcbb4a
--- /dev/null
+++ b/arch/alpha/include/uapi/asm/signal.h
@@ -0,0 +1,129 @@
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. */
7struct siginfo;
8
9#ifndef __KERNEL__
10/* Here we must cater to libcs that poke about in kernel headers. */
11
12#define NSIG 32
13typedef 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#define MINSIGSTKSZ 4096
88#define SIGSTKSZ 16384
89
90#define SIG_BLOCK 1 /* for blocking signals */
91#define SIG_UNBLOCK 2 /* for unblocking signals */
92#define SIG_SETMASK 3 /* for setting the signal mask */
93
94#include <asm-generic/signal-defs.h>
95
96#ifndef __KERNEL__
97/* Here we must cater to libcs that poke about in kernel headers. */
98
99struct sigaction {
100 union {
101 __sighandler_t _sa_handler;
102 void (*_sa_sigaction)(int, struct siginfo *, void *);
103 } _u;
104 sigset_t sa_mask;
105 int sa_flags;
106};
107
108#define sa_handler _u._sa_handler
109#define sa_sigaction _u._sa_sigaction
110
111#endif /* __KERNEL__ */
112
113typedef struct sigaltstack {
114 void __user *ss_sp;
115 int ss_flags;
116 size_t ss_size;
117} stack_t;
118
119/* sigstack(2) is deprecated, and will be withdrawn in a future version
120 of the X/Open CAE Specification. Use sigaltstack instead. It is only
121 implemented here for OSF/1 compatibility. */
122
123struct sigstack {
124 void __user *ss_sp;
125 int ss_onstack;
126};
127
128
129#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
7struct sgttyb {
8 char sg_ispeed;
9 char sg_ospeed;
10 char sg_erase;
11 char sg_kill;
12 short sg_flags;
13};
14
15struct 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
24struct 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
33struct 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
41struct 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 */
diff --git a/arch/alpha/kernel/binfmt_loader.c b/arch/alpha/kernel/binfmt_loader.c
index d1f474d1d44d..9525660c93c0 100644
--- a/arch/alpha/kernel/binfmt_loader.c
+++ b/arch/alpha/kernel/binfmt_loader.c
@@ -5,7 +5,7 @@
5#include <linux/binfmts.h> 5#include <linux/binfmts.h>
6#include <linux/a.out.h> 6#include <linux/a.out.h>
7 7
8static int load_binary(struct linux_binprm *bprm, struct pt_regs *regs) 8static int load_binary(struct linux_binprm *bprm)
9{ 9{
10 struct exec *eh = (struct exec *)bprm->buf; 10 struct exec *eh = (struct exec *)bprm->buf;
11 unsigned long loader; 11 unsigned long loader;
@@ -37,7 +37,7 @@ static int load_binary(struct linux_binprm *bprm, struct pt_regs *regs)
37 retval = prepare_binprm(bprm); 37 retval = prepare_binprm(bprm);
38 if (retval < 0) 38 if (retval < 0)
39 return retval; 39 return retval;
40 return search_binary_handler(bprm,regs); 40 return search_binary_handler(bprm);
41} 41}
42 42
43static struct linux_binfmt loader_format = { 43static struct linux_binfmt loader_format = {
diff --git a/arch/alpha/kernel/entry.S b/arch/alpha/kernel/entry.S
index a7607832dd4f..f62a994ef126 100644
--- a/arch/alpha/kernel/entry.S
+++ b/arch/alpha/kernel/entry.S
@@ -612,47 +612,24 @@ ret_from_kernel_thread:
612 * Special system calls. Most of these are special in that they either 612 * Special system calls. Most of these are special in that they either
613 * have to play switch_stack games or in some way use the pt_regs struct. 613 * have to play switch_stack games or in some way use the pt_regs struct.
614 */ 614 */
615 .align 4
616 .globl sys_fork
617 .ent sys_fork
618sys_fork:
619 .prologue 0
620 mov $sp, $21
621 bsr $1, do_switch_stack
622 bis $31, SIGCHLD, $16
623 mov $31, $17
624 mov $31, $18
625 mov $31, $19
626 mov $31, $20
627 jsr $26, alpha_clone
628 bsr $1, undo_switch_stack
629 ret
630.end sys_fork
631 615
616.macro fork_like name
632 .align 4 617 .align 4
633 .globl sys_clone 618 .globl alpha_\name
634 .ent sys_clone 619 .ent alpha_\name
635sys_clone: 620alpha_\name:
636 .prologue 0 621 .prologue 0
637 mov $sp, $21
638 bsr $1, do_switch_stack 622 bsr $1, do_switch_stack
639 /* $16, $17, $18, $19, $20 come from the user. */ 623 jsr $26, sys_\name
640 jsr $26, alpha_clone 624 ldq $26, 56($sp)
641 bsr $1, undo_switch_stack 625 lda $sp, SWITCH_STACK_SIZE($sp)
642 ret 626 ret
643.end sys_clone 627.end alpha_\name
628.endm
644 629
645 .align 4 630fork_like fork
646 .globl sys_vfork 631fork_like vfork
647 .ent sys_vfork 632fork_like clone
648sys_vfork:
649 .prologue 0
650 mov $sp, $16
651 bsr $1, do_switch_stack
652 jsr $26, alpha_vfork
653 bsr $1, undo_switch_stack
654 ret
655.end sys_vfork
656 633
657 .align 4 634 .align 4
658 .globl sys_sigreturn 635 .globl sys_sigreturn
@@ -661,8 +638,6 @@ sys_sigreturn:
661 .prologue 0 638 .prologue 0
662 lda $9, ret_from_straced 639 lda $9, ret_from_straced
663 cmpult $26, $9, $9 640 cmpult $26, $9, $9
664 mov $sp, $17
665 lda $18, -SWITCH_STACK_SIZE($sp)
666 lda $sp, -SWITCH_STACK_SIZE($sp) 641 lda $sp, -SWITCH_STACK_SIZE($sp)
667 jsr $26, do_sigreturn 642 jsr $26, do_sigreturn
668 bne $9, 1f 643 bne $9, 1f
@@ -678,8 +653,6 @@ sys_rt_sigreturn:
678 .prologue 0 653 .prologue 0
679 lda $9, ret_from_straced 654 lda $9, ret_from_straced
680 cmpult $26, $9, $9 655 cmpult $26, $9, $9
681 mov $sp, $17
682 lda $18, -SWITCH_STACK_SIZE($sp)
683 lda $sp, -SWITCH_STACK_SIZE($sp) 656 lda $sp, -SWITCH_STACK_SIZE($sp)
684 jsr $26, do_rt_sigreturn 657 jsr $26, do_rt_sigreturn
685 bne $9, 1f 658 bne $9, 1f
diff --git a/arch/alpha/kernel/osf_sys.c b/arch/alpha/kernel/osf_sys.c
index 1e6956a90608..14db93e4c8a8 100644
--- a/arch/alpha/kernel/osf_sys.c
+++ b/arch/alpha/kernel/osf_sys.c
@@ -445,7 +445,7 @@ struct procfs_args {
445 * unhappy with OSF UFS. [CHECKME] 445 * unhappy with OSF UFS. [CHECKME]
446 */ 446 */
447static int 447static int
448osf_ufs_mount(char *dirname, struct ufs_args __user *args, int flags) 448osf_ufs_mount(const char *dirname, struct ufs_args __user *args, int flags)
449{ 449{
450 int retval; 450 int retval;
451 struct cdfs_args tmp; 451 struct cdfs_args tmp;
@@ -465,7 +465,7 @@ osf_ufs_mount(char *dirname, struct ufs_args __user *args, int flags)
465} 465}
466 466
467static int 467static int
468osf_cdfs_mount(char *dirname, struct cdfs_args __user *args, int flags) 468osf_cdfs_mount(const char *dirname, struct cdfs_args __user *args, int flags)
469{ 469{
470 int retval; 470 int retval;
471 struct cdfs_args tmp; 471 struct cdfs_args tmp;
@@ -485,7 +485,7 @@ osf_cdfs_mount(char *dirname, struct cdfs_args __user *args, int flags)
485} 485}
486 486
487static int 487static int
488osf_procfs_mount(char *dirname, struct procfs_args __user *args, int flags) 488osf_procfs_mount(const char *dirname, struct procfs_args __user *args, int flags)
489{ 489{
490 struct procfs_args tmp; 490 struct procfs_args tmp;
491 491
diff --git a/arch/alpha/kernel/pci.c b/arch/alpha/kernel/pci.c
index ef757147cbf9..edb4e0097b75 100644
--- a/arch/alpha/kernel/pci.c
+++ b/arch/alpha/kernel/pci.c
@@ -59,13 +59,13 @@ struct pci_controller *pci_isa_hose;
59 * Quirks. 59 * Quirks.
60 */ 60 */
61 61
62static void __devinit quirk_isa_bridge(struct pci_dev *dev) 62static void quirk_isa_bridge(struct pci_dev *dev)
63{ 63{
64 dev->class = PCI_CLASS_BRIDGE_ISA << 8; 64 dev->class = PCI_CLASS_BRIDGE_ISA << 8;
65} 65}
66DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82378, quirk_isa_bridge); 66DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82378, quirk_isa_bridge);
67 67
68static void __devinit quirk_cypress(struct pci_dev *dev) 68static void quirk_cypress(struct pci_dev *dev)
69{ 69{
70 /* The Notorious Cy82C693 chip. */ 70 /* The Notorious Cy82C693 chip. */
71 71
@@ -104,7 +104,7 @@ static void __devinit quirk_cypress(struct pci_dev *dev)
104DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_CONTAQ, PCI_DEVICE_ID_CONTAQ_82C693, quirk_cypress); 104DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_CONTAQ, PCI_DEVICE_ID_CONTAQ_82C693, quirk_cypress);
105 105
106/* Called for each device after PCI setup is done. */ 106/* Called for each device after PCI setup is done. */
107static void __devinit pcibios_fixup_final(struct pci_dev *dev) 107static void pcibios_fixup_final(struct pci_dev *dev)
108{ 108{
109 unsigned int class = dev->class >> 8; 109 unsigned int class = dev->class >> 8;
110 110
@@ -198,8 +198,7 @@ subsys_initcall(pcibios_init);
198#ifdef ALPHA_RESTORE_SRM_SETUP 198#ifdef ALPHA_RESTORE_SRM_SETUP
199static struct pdev_srm_saved_conf *srm_saved_configs; 199static struct pdev_srm_saved_conf *srm_saved_configs;
200 200
201void __devinit 201void pdev_save_srm_config(struct pci_dev *dev)
202pdev_save_srm_config(struct pci_dev *dev)
203{ 202{
204 struct pdev_srm_saved_conf *tmp; 203 struct pdev_srm_saved_conf *tmp;
205 static int printed = 0; 204 static int printed = 0;
@@ -241,8 +240,7 @@ pci_restore_srm_config(void)
241} 240}
242#endif 241#endif
243 242
244void __devinit 243void pcibios_fixup_bus(struct pci_bus *bus)
245pcibios_fixup_bus(struct pci_bus *bus)
246{ 244{
247 struct pci_dev *dev = bus->self; 245 struct pci_dev *dev = bus->self;
248 246
diff --git a/arch/alpha/kernel/pci_iommu.c b/arch/alpha/kernel/pci_iommu.c
index 3f844d26d2c7..a21d0ab3b19e 100644
--- a/arch/alpha/kernel/pci_iommu.c
+++ b/arch/alpha/kernel/pci_iommu.c
@@ -354,8 +354,7 @@ static dma_addr_t alpha_pci_map_page(struct device *dev, struct page *page,
354 struct pci_dev *pdev = alpha_gendev_to_pci(dev); 354 struct pci_dev *pdev = alpha_gendev_to_pci(dev);
355 int dac_allowed; 355 int dac_allowed;
356 356
357 if (dir == PCI_DMA_NONE) 357 BUG_ON(dir == PCI_DMA_NONE);
358 BUG();
359 358
360 dac_allowed = pdev ? pci_dac_dma_supported(pdev, pdev->dma_mask) : 0; 359 dac_allowed = pdev ? pci_dac_dma_supported(pdev, pdev->dma_mask) : 0;
361 return pci_map_single_1(pdev, (char *)page_address(page) + offset, 360 return pci_map_single_1(pdev, (char *)page_address(page) + offset,
@@ -378,8 +377,7 @@ static void alpha_pci_unmap_page(struct device *dev, dma_addr_t dma_addr,
378 struct pci_iommu_arena *arena; 377 struct pci_iommu_arena *arena;
379 long dma_ofs, npages; 378 long dma_ofs, npages;
380 379
381 if (dir == PCI_DMA_NONE) 380 BUG_ON(dir == PCI_DMA_NONE);
382 BUG();
383 381
384 if (dma_addr >= __direct_map_base 382 if (dma_addr >= __direct_map_base
385 && dma_addr < __direct_map_base + __direct_map_size) { 383 && dma_addr < __direct_map_base + __direct_map_size) {
@@ -662,8 +660,7 @@ static int alpha_pci_map_sg(struct device *dev, struct scatterlist *sg,
662 dma_addr_t max_dma; 660 dma_addr_t max_dma;
663 int dac_allowed; 661 int dac_allowed;
664 662
665 if (dir == PCI_DMA_NONE) 663 BUG_ON(dir == PCI_DMA_NONE);
666 BUG();
667 664
668 dac_allowed = dev ? pci_dac_dma_supported(pdev, pdev->dma_mask) : 0; 665 dac_allowed = dev ? pci_dac_dma_supported(pdev, pdev->dma_mask) : 0;
669 666
@@ -742,8 +739,7 @@ static void alpha_pci_unmap_sg(struct device *dev, struct scatterlist *sg,
742 dma_addr_t max_dma; 739 dma_addr_t max_dma;
743 dma_addr_t fbeg, fend; 740 dma_addr_t fbeg, fend;
744 741
745 if (dir == PCI_DMA_NONE) 742 BUG_ON(dir == PCI_DMA_NONE);
746 BUG();
747 743
748 if (! alpha_mv.mv_pci_tbi) 744 if (! alpha_mv.mv_pci_tbi)
749 return; 745 return;
diff --git a/arch/alpha/kernel/process.c b/arch/alpha/kernel/process.c
index 51987dcf79b8..b5d0d0923699 100644
--- a/arch/alpha/kernel/process.c
+++ b/arch/alpha/kernel/process.c
@@ -235,51 +235,28 @@ release_thread(struct task_struct *dead_task)
235} 235}
236 236
237/* 237/*
238 * "alpha_clone()".. By the time we get here, the
239 * non-volatile registers have also been saved on the
240 * stack. We do some ugly pointer stuff here.. (see
241 * also copy_thread)
242 *
243 * Notice that "fork()" is implemented in terms of clone,
244 * with parameters (SIGCHLD, 0).
245 */
246int
247alpha_clone(unsigned long clone_flags, unsigned long usp,
248 int __user *parent_tid, int __user *child_tid,
249 unsigned long tls_value, struct pt_regs *regs)
250{
251 if (!usp)
252 usp = rdusp();
253
254 return do_fork(clone_flags, usp, regs, 0, parent_tid, child_tid);
255}
256
257int
258alpha_vfork(struct pt_regs *regs)
259{
260 return do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, rdusp(),
261 regs, 0, NULL, NULL);
262}
263
264/*
265 * Copy an alpha thread.. 238 * Copy an alpha thread..
266 */ 239 */
267 240
268int 241int
269copy_thread(unsigned long clone_flags, unsigned long usp, 242copy_thread(unsigned long clone_flags, unsigned long usp,
270 unsigned long arg, 243 unsigned long arg,
271 struct task_struct * p, struct pt_regs * regs) 244 struct task_struct *p)
272{ 245{
273 extern void ret_from_fork(void); 246 extern void ret_from_fork(void);
274 extern void ret_from_kernel_thread(void); 247 extern void ret_from_kernel_thread(void);
275 248
276 struct thread_info *childti = task_thread_info(p); 249 struct thread_info *childti = task_thread_info(p);
277 struct pt_regs *childregs = task_pt_regs(p); 250 struct pt_regs *childregs = task_pt_regs(p);
251 struct pt_regs *regs = current_pt_regs();
278 struct switch_stack *childstack, *stack; 252 struct switch_stack *childstack, *stack;
279 unsigned long settls; 253 unsigned long settls;
280 254
281 childstack = ((struct switch_stack *) childregs) - 1; 255 childstack = ((struct switch_stack *) childregs) - 1;
282 if (unlikely(!regs)) { 256 childti->pcb.ksp = (unsigned long) childstack;
257 childti->pcb.flags = 1; /* set FEN, clear everything else */
258
259 if (unlikely(p->flags & PF_KTHREAD)) {
283 /* kernel thread */ 260 /* kernel thread */
284 memset(childstack, 0, 261 memset(childstack, 0,
285 sizeof(struct switch_stack) + sizeof(struct pt_regs)); 262 sizeof(struct switch_stack) + sizeof(struct pt_regs));
@@ -288,12 +265,17 @@ copy_thread(unsigned long clone_flags, unsigned long usp,
288 childstack->r10 = arg; 265 childstack->r10 = arg;
289 childregs->hae = alpha_mv.hae_cache, 266 childregs->hae = alpha_mv.hae_cache,
290 childti->pcb.usp = 0; 267 childti->pcb.usp = 0;
291 childti->pcb.ksp = (unsigned long) childstack;
292 childti->pcb.flags = 1; /* set FEN, clear everything else */
293 return 0; 268 return 0;
294 } 269 }
270 /* Note: if CLONE_SETTLS is not set, then we must inherit the
271 value from the parent, which will have been set by the block
272 copy in dup_task_struct. This is non-intuitive, but is
273 required for proper operation in the case of a threaded
274 application calling fork. */
275 if (clone_flags & CLONE_SETTLS)
276 childti->pcb.unique = regs->r20;
277 childti->pcb.usp = usp ?: rdusp();
295 *childregs = *regs; 278 *childregs = *regs;
296 settls = regs->r20;
297 childregs->r0 = 0; 279 childregs->r0 = 0;
298 childregs->r19 = 0; 280 childregs->r19 = 0;
299 childregs->r20 = 1; /* OSF/1 has some strange fork() semantics. */ 281 childregs->r20 = 1; /* OSF/1 has some strange fork() semantics. */
@@ -301,22 +283,6 @@ copy_thread(unsigned long clone_flags, unsigned long usp,
301 stack = ((struct switch_stack *) regs) - 1; 283 stack = ((struct switch_stack *) regs) - 1;
302 *childstack = *stack; 284 *childstack = *stack;
303 childstack->r26 = (unsigned long) ret_from_fork; 285 childstack->r26 = (unsigned long) ret_from_fork;
304 childti->pcb.usp = usp;
305 childti->pcb.ksp = (unsigned long) childstack;
306 childti->pcb.flags = 1; /* set FEN, clear everything else */
307
308 /* Set a new TLS for the child thread? Peek back into the
309 syscall arguments that we saved on syscall entry. Oops,
310 except we'd have clobbered it with the parent/child set
311 of r20. Read the saved copy. */
312 /* Note: if CLONE_SETTLS is not set, then we must inherit the
313 value from the parent, which will have been set by the block
314 copy in dup_task_struct. This is non-intuitive, but is
315 required for proper operation in the case of a threaded
316 application calling fork. */
317 if (clone_flags & CLONE_SETTLS)
318 childti->pcb.unique = settls;
319
320 return 0; 286 return 0;
321} 287}
322 288
diff --git a/arch/alpha/kernel/signal.c b/arch/alpha/kernel/signal.c
index 32575f85507d..02d02c047f17 100644
--- a/arch/alpha/kernel/signal.c
+++ b/arch/alpha/kernel/signal.c
@@ -122,12 +122,6 @@ SYSCALL_DEFINE1(sigsuspend, old_sigset_t, mask)
122 return sigsuspend(&blocked); 122 return sigsuspend(&blocked);
123} 123}
124 124
125asmlinkage int
126sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss)
127{
128 return do_sigaltstack(uss, uoss, rdusp());
129}
130
131/* 125/*
132 * Do a signal return; undo the signal stack. 126 * Do a signal return; undo the signal stack.
133 */ 127 */
@@ -160,10 +154,10 @@ extern char compile_time_assert
160#define INSN_CALLSYS 0x00000083 154#define INSN_CALLSYS 0x00000083
161 155
162static long 156static long
163restore_sigcontext(struct sigcontext __user *sc, struct pt_regs *regs, 157restore_sigcontext(struct sigcontext __user *sc, struct pt_regs *regs)
164 struct switch_stack *sw)
165{ 158{
166 unsigned long usp; 159 unsigned long usp;
160 struct switch_stack *sw = (struct switch_stack *)regs - 1;
167 long i, err = __get_user(regs->pc, &sc->sc_pc); 161 long i, err = __get_user(regs->pc, &sc->sc_pc);
168 162
169 current_thread_info()->restart_block.fn = do_no_restart_syscall; 163 current_thread_info()->restart_block.fn = do_no_restart_syscall;
@@ -215,9 +209,9 @@ restore_sigcontext(struct sigcontext __user *sc, struct pt_regs *regs,
215 registers and transfer control from userland. */ 209 registers and transfer control from userland. */
216 210
217asmlinkage void 211asmlinkage void
218do_sigreturn(struct sigcontext __user *sc, struct pt_regs *regs, 212do_sigreturn(struct sigcontext __user *sc)
219 struct switch_stack *sw)
220{ 213{
214 struct pt_regs *regs = current_pt_regs();
221 sigset_t set; 215 sigset_t set;
222 216
223 /* Verify that it's a good sigcontext before using it */ 217 /* Verify that it's a good sigcontext before using it */
@@ -228,7 +222,7 @@ do_sigreturn(struct sigcontext __user *sc, struct pt_regs *regs,
228 222
229 set_current_blocked(&set); 223 set_current_blocked(&set);
230 224
231 if (restore_sigcontext(sc, regs, sw)) 225 if (restore_sigcontext(sc, regs))
232 goto give_sigsegv; 226 goto give_sigsegv;
233 227
234 /* Send SIGTRAP if we're single-stepping: */ 228 /* Send SIGTRAP if we're single-stepping: */
@@ -249,9 +243,9 @@ give_sigsegv:
249} 243}
250 244
251asmlinkage void 245asmlinkage void
252do_rt_sigreturn(struct rt_sigframe __user *frame, struct pt_regs *regs, 246do_rt_sigreturn(struct rt_sigframe __user *frame)
253 struct switch_stack *sw)
254{ 247{
248 struct pt_regs *regs = current_pt_regs();
255 sigset_t set; 249 sigset_t set;
256 250
257 /* Verify that it's a good ucontext_t before using it */ 251 /* Verify that it's a good ucontext_t before using it */
@@ -262,7 +256,7 @@ do_rt_sigreturn(struct rt_sigframe __user *frame, struct pt_regs *regs,
262 256
263 set_current_blocked(&set); 257 set_current_blocked(&set);
264 258
265 if (restore_sigcontext(&frame->uc.uc_mcontext, regs, sw)) 259 if (restore_sigcontext(&frame->uc.uc_mcontext, regs))
266 goto give_sigsegv; 260 goto give_sigsegv;
267 261
268 /* Send SIGTRAP if we're single-stepping: */ 262 /* Send SIGTRAP if we're single-stepping: */
@@ -418,9 +412,7 @@ setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
418 err |= __put_user(0, &frame->uc.uc_flags); 412 err |= __put_user(0, &frame->uc.uc_flags);
419 err |= __put_user(0, &frame->uc.uc_link); 413 err |= __put_user(0, &frame->uc.uc_link);
420 err |= __put_user(set->sig[0], &frame->uc.uc_osf_sigmask); 414 err |= __put_user(set->sig[0], &frame->uc.uc_osf_sigmask);
421 err |= __put_user(current->sas_ss_sp, &frame->uc.uc_stack.ss_sp); 415 err |= __save_altstack(&frame->uc.uc_stack, oldsp);
422 err |= __put_user(sas_ss_flags(oldsp), &frame->uc.uc_stack.ss_flags);
423 err |= __put_user(current->sas_ss_size, &frame->uc.uc_stack.ss_size);
424 err |= setup_sigcontext(&frame->uc.uc_mcontext, regs, 416 err |= setup_sigcontext(&frame->uc.uc_mcontext, regs,
425 set->sig[0], oldsp); 417 set->sig[0], oldsp);
426 err |= __copy_to_user(&frame->uc.uc_sigmask, set, sizeof(*set)); 418 err |= __copy_to_user(&frame->uc.uc_sigmask, set, sizeof(*set));
diff --git a/arch/alpha/kernel/smp.c b/arch/alpha/kernel/smp.c
index a41ad90a97a6..9603bc234b47 100644
--- a/arch/alpha/kernel/smp.c
+++ b/arch/alpha/kernel/smp.c
@@ -68,7 +68,7 @@ enum ipi_message_type {
68}; 68};
69 69
70/* Set to a secondary's cpuid when it comes online. */ 70/* Set to a secondary's cpuid when it comes online. */
71static int smp_secondary_alive __devinitdata = 0; 71static int smp_secondary_alive = 0;
72 72
73int smp_num_probed; /* Internal processor count */ 73int smp_num_probed; /* Internal processor count */
74int smp_num_cpus = 1; /* Number that came online. */ 74int smp_num_cpus = 1; /* Number that came online. */
@@ -172,7 +172,7 @@ smp_callin(void)
172} 172}
173 173
174/* Wait until hwrpb->txrdy is clear for cpu. Return -1 on timeout. */ 174/* Wait until hwrpb->txrdy is clear for cpu. Return -1 on timeout. */
175static int __devinit 175static int
176wait_for_txrdy (unsigned long cpumask) 176wait_for_txrdy (unsigned long cpumask)
177{ 177{
178 unsigned long timeout; 178 unsigned long timeout;
@@ -468,7 +468,7 @@ smp_prepare_cpus(unsigned int max_cpus)
468 smp_num_cpus = smp_num_probed; 468 smp_num_cpus = smp_num_probed;
469} 469}
470 470
471void __devinit 471void
472smp_prepare_boot_cpu(void) 472smp_prepare_boot_cpu(void)
473{ 473{
474} 474}
diff --git a/arch/alpha/kernel/srmcons.c b/arch/alpha/kernel/srmcons.c
index 5d5865204a1d..59b7bbad8394 100644
--- a/arch/alpha/kernel/srmcons.c
+++ b/arch/alpha/kernel/srmcons.c
@@ -205,7 +205,6 @@ static const struct tty_operations srmcons_ops = {
205static int __init 205static int __init
206srmcons_init(void) 206srmcons_init(void)
207{ 207{
208 tty_port_init(&srmcons_singleton.port);
209 setup_timer(&srmcons_singleton.timer, srmcons_receive_chars, 208 setup_timer(&srmcons_singleton.timer, srmcons_receive_chars,
210 (unsigned long)&srmcons_singleton); 209 (unsigned long)&srmcons_singleton);
211 if (srm_is_registered_console) { 210 if (srm_is_registered_console) {
@@ -215,6 +214,9 @@ srmcons_init(void)
215 driver = alloc_tty_driver(MAX_SRM_CONSOLE_DEVICES); 214 driver = alloc_tty_driver(MAX_SRM_CONSOLE_DEVICES);
216 if (!driver) 215 if (!driver)
217 return -ENOMEM; 216 return -ENOMEM;
217
218 tty_port_init(&srmcons_singleton.port);
219
218 driver->driver_name = "srm"; 220 driver->driver_name = "srm";
219 driver->name = "srm"; 221 driver->name = "srm";
220 driver->major = 0; /* dynamic */ 222 driver->major = 0; /* dynamic */
@@ -227,6 +229,7 @@ srmcons_init(void)
227 err = tty_register_driver(driver); 229 err = tty_register_driver(driver);
228 if (err) { 230 if (err) {
229 put_tty_driver(driver); 231 put_tty_driver(driver);
232 tty_port_destroy(&srmcons_singleton.port);
230 return err; 233 return err;
231 } 234 }
232 srmcons_driver = driver; 235 srmcons_driver = driver;
diff --git a/arch/alpha/kernel/sys_titan.c b/arch/alpha/kernel/sys_titan.c
index 2533db280d9b..5cf4a481b8c5 100644
--- a/arch/alpha/kernel/sys_titan.c
+++ b/arch/alpha/kernel/sys_titan.c
@@ -303,7 +303,7 @@ titan_late_init(void)
303 303
304} 304}
305 305
306static int __devinit 306static int
307titan_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) 307titan_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
308{ 308{
309 u8 intline; 309 u8 intline;
diff --git a/arch/alpha/kernel/systbls.S b/arch/alpha/kernel/systbls.S
index 2ac6b45c3e00..4284ec798ec9 100644
--- a/arch/alpha/kernel/systbls.S
+++ b/arch/alpha/kernel/systbls.S
@@ -12,7 +12,7 @@
12sys_call_table: 12sys_call_table:
13 .quad alpha_ni_syscall /* 0 */ 13 .quad alpha_ni_syscall /* 0 */
14 .quad sys_exit 14 .quad sys_exit
15 .quad sys_fork 15 .quad alpha_fork
16 .quad sys_read 16 .quad sys_read
17 .quad sys_write 17 .quad sys_write
18 .quad alpha_ni_syscall /* 5 */ 18 .quad alpha_ni_syscall /* 5 */
@@ -76,7 +76,7 @@ sys_call_table:
76 .quad sys_getpgrp 76 .quad sys_getpgrp
77 .quad sys_getpagesize 77 .quad sys_getpagesize
78 .quad alpha_ni_syscall /* 65 */ 78 .quad alpha_ni_syscall /* 65 */
79 .quad sys_vfork 79 .quad alpha_vfork
80 .quad sys_newstat 80 .quad sys_newstat
81 .quad sys_newlstat 81 .quad sys_newlstat
82 .quad alpha_ni_syscall 82 .quad alpha_ni_syscall
@@ -330,7 +330,7 @@ sys_call_table:
330 .quad sys_ni_syscall /* 309: old get_kernel_syms */ 330 .quad sys_ni_syscall /* 309: old get_kernel_syms */
331 .quad sys_syslog /* 310 */ 331 .quad sys_syslog /* 310 */
332 .quad sys_reboot 332 .quad sys_reboot
333 .quad sys_clone 333 .quad alpha_clone
334 .quad sys_uselib 334 .quad sys_uselib
335 .quad sys_mlock 335 .quad sys_mlock
336 .quad sys_munlock /* 315 */ 336 .quad sys_munlock /* 315 */