Skip to content

Commit 35bafbe

Browse files
committed
Merge tag 'disintegrate-mips-20121009' of git://git.infradead.org/users/dhowells/linux-headers into mips-for-linux-next
UAPI Disintegration 2012-10-09 Patchwork: https://patchwork.linux-mips.org/patch/4414/
2 parents 49a94e9 + 61730c5 commit 35bafbe

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+1846
-1706
lines changed

arch/mips/include/asm/Kbuild

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +0,0 @@
1-
include include/asm-generic/Kbuild.asm
2-
3-
header-y += cachectl.h
4-
header-y += sgidefs.h
5-
header-y += sysmips.h

arch/mips/include/asm/errno.h

Lines changed: 1 addition & 119 deletions
Original file line numberDiff line numberDiff line change
@@ -8,128 +8,10 @@
88
#ifndef _ASM_ERRNO_H
99
#define _ASM_ERRNO_H
1010

11-
/*
12-
* These error numbers are intended to be MIPS ABI compatible
13-
*/
14-
15-
#include <asm-generic/errno-base.h>
16-
17-
#define ENOMSG 35 /* No message of desired type */
18-
#define EIDRM 36 /* Identifier removed */
19-
#define ECHRNG 37 /* Channel number out of range */
20-
#define EL2NSYNC 38 /* Level 2 not synchronized */
21-
#define EL3HLT 39 /* Level 3 halted */
22-
#define EL3RST 40 /* Level 3 reset */
23-
#define ELNRNG 41 /* Link number out of range */
24-
#define EUNATCH 42 /* Protocol driver not attached */
25-
#define ENOCSI 43 /* No CSI structure available */
26-
#define EL2HLT 44 /* Level 2 halted */
27-
#define EDEADLK 45 /* Resource deadlock would occur */
28-
#define ENOLCK 46 /* No record locks available */
29-
#define EBADE 50 /* Invalid exchange */
30-
#define EBADR 51 /* Invalid request descriptor */
31-
#define EXFULL 52 /* Exchange full */
32-
#define ENOANO 53 /* No anode */
33-
#define EBADRQC 54 /* Invalid request code */
34-
#define EBADSLT 55 /* Invalid slot */
35-
#define EDEADLOCK 56 /* File locking deadlock error */
36-
#define EBFONT 59 /* Bad font file format */
37-
#define ENOSTR 60 /* Device not a stream */
38-
#define ENODATA 61 /* No data available */
39-
#define ETIME 62 /* Timer expired */
40-
#define ENOSR 63 /* Out of streams resources */
41-
#define ENONET 64 /* Machine is not on the network */
42-
#define ENOPKG 65 /* Package not installed */
43-
#define EREMOTE 66 /* Object is remote */
44-
#define ENOLINK 67 /* Link has been severed */
45-
#define EADV 68 /* Advertise error */
46-
#define ESRMNT 69 /* Srmount error */
47-
#define ECOMM 70 /* Communication error on send */
48-
#define EPROTO 71 /* Protocol error */
49-
#define EDOTDOT 73 /* RFS specific error */
50-
#define EMULTIHOP 74 /* Multihop attempted */
51-
#define EBADMSG 77 /* Not a data message */
52-
#define ENAMETOOLONG 78 /* File name too long */
53-
#define EOVERFLOW 79 /* Value too large for defined data type */
54-
#define ENOTUNIQ 80 /* Name not unique on network */
55-
#define EBADFD 81 /* File descriptor in bad state */
56-
#define EREMCHG 82 /* Remote address changed */
57-
#define ELIBACC 83 /* Can not access a needed shared library */
58-
#define ELIBBAD 84 /* Accessing a corrupted shared library */
59-
#define ELIBSCN 85 /* .lib section in a.out corrupted */
60-
#define ELIBMAX 86 /* Attempting to link in too many shared libraries */
61-
#define ELIBEXEC 87 /* Cannot exec a shared library directly */
62-
#define EILSEQ 88 /* Illegal byte sequence */
63-
#define ENOSYS 89 /* Function not implemented */
64-
#define ELOOP 90 /* Too many symbolic links encountered */
65-
#define ERESTART 91 /* Interrupted system call should be restarted */
66-
#define ESTRPIPE 92 /* Streams pipe error */
67-
#define ENOTEMPTY 93 /* Directory not empty */
68-
#define EUSERS 94 /* Too many users */
69-
#define ENOTSOCK 95 /* Socket operation on non-socket */
70-
#define EDESTADDRREQ 96 /* Destination address required */
71-
#define EMSGSIZE 97 /* Message too long */
72-
#define EPROTOTYPE 98 /* Protocol wrong type for socket */
73-
#define ENOPROTOOPT 99 /* Protocol not available */
74-
#define EPROTONOSUPPORT 120 /* Protocol not supported */
75-
#define ESOCKTNOSUPPORT 121 /* Socket type not supported */
76-
#define EOPNOTSUPP 122 /* Operation not supported on transport endpoint */
77-
#define EPFNOSUPPORT 123 /* Protocol family not supported */
78-
#define EAFNOSUPPORT 124 /* Address family not supported by protocol */
79-
#define EADDRINUSE 125 /* Address already in use */
80-
#define EADDRNOTAVAIL 126 /* Cannot assign requested address */
81-
#define ENETDOWN 127 /* Network is down */
82-
#define ENETUNREACH 128 /* Network is unreachable */
83-
#define ENETRESET 129 /* Network dropped connection because of reset */
84-
#define ECONNABORTED 130 /* Software caused connection abort */
85-
#define ECONNRESET 131 /* Connection reset by peer */
86-
#define ENOBUFS 132 /* No buffer space available */
87-
#define EISCONN 133 /* Transport endpoint is already connected */
88-
#define ENOTCONN 134 /* Transport endpoint is not connected */
89-
#define EUCLEAN 135 /* Structure needs cleaning */
90-
#define ENOTNAM 137 /* Not a XENIX named type file */
91-
#define ENAVAIL 138 /* No XENIX semaphores available */
92-
#define EISNAM 139 /* Is a named type file */
93-
#define EREMOTEIO 140 /* Remote I/O error */
94-
#define EINIT 141 /* Reserved */
95-
#define EREMDEV 142 /* Error 142 */
96-
#define ESHUTDOWN 143 /* Cannot send after transport endpoint shutdown */
97-
#define ETOOMANYREFS 144 /* Too many references: cannot splice */
98-
#define ETIMEDOUT 145 /* Connection timed out */
99-
#define ECONNREFUSED 146 /* Connection refused */
100-
#define EHOSTDOWN 147 /* Host is down */
101-
#define EHOSTUNREACH 148 /* No route to host */
102-
#define EWOULDBLOCK EAGAIN /* Operation would block */
103-
#define EALREADY 149 /* Operation already in progress */
104-
#define EINPROGRESS 150 /* Operation now in progress */
105-
#define ESTALE 151 /* Stale NFS file handle */
106-
#define ECANCELED 158 /* AIO operation canceled */
107-
108-
/*
109-
* These error are Linux extensions.
110-
*/
111-
#define ENOMEDIUM 159 /* No medium found */
112-
#define EMEDIUMTYPE 160 /* Wrong medium type */
113-
#define ENOKEY 161 /* Required key not available */
114-
#define EKEYEXPIRED 162 /* Key has expired */
115-
#define EKEYREVOKED 163 /* Key has been revoked */
116-
#define EKEYREJECTED 164 /* Key was rejected by service */
117-
118-
/* for robust mutexes */
119-
#define EOWNERDEAD 165 /* Owner died */
120-
#define ENOTRECOVERABLE 166 /* State not recoverable */
121-
122-
#define ERFKILL 167 /* Operation not possible due to RF-kill */
11+
#include <uapi/asm/errno.h>
12312

124-
#define EHWPOISON 168 /* Memory page has hardware error */
125-
126-
#define EDQUOT 1133 /* Quota exceeded */
127-
128-
#ifdef __KERNEL__
12913

13014
/* The biggest error number defined here or in <linux/errno.h>. */
13115
#define EMAXERRNO 1133
13216

133-
#endif /* __KERNEL__ */
134-
13517
#endif /* _ASM_ERRNO_H */

arch/mips/include/asm/ptrace.h

Lines changed: 1 addition & 106 deletions
Original file line numberDiff line numberDiff line change
@@ -9,115 +9,12 @@
99
#ifndef _ASM_PTRACE_H
1010
#define _ASM_PTRACE_H
1111

12-
/* 0 - 31 are integer registers, 32 - 63 are fp registers. */
13-
#define FPR_BASE 32
14-
#define PC 64
15-
#define CAUSE 65
16-
#define BADVADDR 66
17-
#define MMHI 67
18-
#define MMLO 68
19-
#define FPC_CSR 69
20-
#define FPC_EIR 70
21-
#define DSP_BASE 71 /* 3 more hi / lo register pairs */
22-
#define DSP_CONTROL 77
23-
#define ACX 78
24-
25-
/*
26-
* This struct defines the way the registers are stored on the stack during a
27-
* system call/exception. As usual the registers k0/k1 aren't being saved.
28-
*/
29-
struct pt_regs {
30-
#ifdef CONFIG_32BIT
31-
/* Pad bytes for argument save space on the stack. */
32-
unsigned long pad0[6];
33-
#endif
34-
35-
/* Saved main processor registers. */
36-
unsigned long regs[32];
37-
38-
/* Saved special registers. */
39-
unsigned long cp0_status;
40-
unsigned long hi;
41-
unsigned long lo;
42-
#ifdef CONFIG_CPU_HAS_SMARTMIPS
43-
unsigned long acx;
44-
#endif
45-
unsigned long cp0_badvaddr;
46-
unsigned long cp0_cause;
47-
unsigned long cp0_epc;
48-
#ifdef CONFIG_MIPS_MT_SMTC
49-
unsigned long cp0_tcstatus;
50-
#endif /* CONFIG_MIPS_MT_SMTC */
51-
#ifdef CONFIG_CPU_CAVIUM_OCTEON
52-
unsigned long long mpl[3]; /* MTM{0,1,2} */
53-
unsigned long long mtp[3]; /* MTP{0,1,2} */
54-
#endif
55-
} __attribute__ ((aligned (8)));
56-
57-
/* Arbitrarily choose the same ptrace numbers as used by the Sparc code. */
58-
#define PTRACE_GETREGS 12
59-
#define PTRACE_SETREGS 13
60-
#define PTRACE_GETFPREGS 14
61-
#define PTRACE_SETFPREGS 15
62-
/* #define PTRACE_GETFPXREGS 18 */
63-
/* #define PTRACE_SETFPXREGS 19 */
64-
65-
#define PTRACE_OLDSETOPTIONS 21
66-
67-
#define PTRACE_GET_THREAD_AREA 25
68-
#define PTRACE_SET_THREAD_AREA 26
69-
70-
/* Calls to trace a 64bit program from a 32bit program. */
71-
#define PTRACE_PEEKTEXT_3264 0xc0
72-
#define PTRACE_PEEKDATA_3264 0xc1
73-
#define PTRACE_POKETEXT_3264 0xc2
74-
#define PTRACE_POKEDATA_3264 0xc3
75-
#define PTRACE_GET_THREAD_AREA_3264 0xc4
76-
77-
/* Read and write watchpoint registers. */
78-
enum pt_watch_style {
79-
pt_watch_style_mips32,
80-
pt_watch_style_mips64
81-
};
82-
struct mips32_watch_regs {
83-
unsigned int watchlo[8];
84-
/* Lower 16 bits of watchhi. */
85-
unsigned short watchhi[8];
86-
/* Valid mask and I R W bits.
87-
* bit 0 -- 1 if W bit is usable.
88-
* bit 1 -- 1 if R bit is usable.
89-
* bit 2 -- 1 if I bit is usable.
90-
* bits 3 - 11 -- Valid watchhi mask bits.
91-
*/
92-
unsigned short watch_masks[8];
93-
/* The number of valid watch register pairs. */
94-
unsigned int num_valid;
95-
} __attribute__((aligned(8)));
96-
97-
struct mips64_watch_regs {
98-
unsigned long long watchlo[8];
99-
unsigned short watchhi[8];
100-
unsigned short watch_masks[8];
101-
unsigned int num_valid;
102-
} __attribute__((aligned(8)));
103-
104-
struct pt_watch_regs {
105-
enum pt_watch_style style;
106-
union {
107-
struct mips32_watch_regs mips32;
108-
struct mips64_watch_regs mips64;
109-
};
110-
};
111-
112-
#define PTRACE_GET_WATCH_REGS 0xd0
113-
#define PTRACE_SET_WATCH_REGS 0xd1
114-
115-
#ifdef __KERNEL__
11612

11713
#include <linux/compiler.h>
11814
#include <linux/linkage.h>
11915
#include <linux/types.h>
12016
#include <asm/isadep.h>
17+
#include <uapi/asm/ptrace.h>
12118

12219
struct task_struct;
12320

@@ -164,6 +61,4 @@ static inline void die_if_kernel(const char *str, struct pt_regs *regs)
16461
die(str, regs);
16562
}
16663

167-
#endif
168-
16964
#endif /* _ASM_PTRACE_H */

arch/mips/include/asm/setup.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
#ifndef _MIPS_SETUP_H
22
#define _MIPS_SETUP_H
33

4-
#define COMMAND_LINE_SIZE 4096
4+
#include <uapi/asm/setup.h>
55

6-
#ifdef __KERNEL__
76
extern void setup_early_printk(void);
87

98
extern void set_handler(unsigned long offset, void *addr, unsigned long len);
@@ -17,6 +16,4 @@ extern unsigned long ebase;
1716
extern void per_cpu_trap_init(bool);
1817
extern void cpu_cache_init(void);
1918

20-
#endif /* __KERNEL__ */
21-
2219
#endif /* __SETUP_H */

arch/mips/include/asm/sigcontext.h

Lines changed: 1 addition & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -9,71 +9,10 @@
99
#ifndef _ASM_SIGCONTEXT_H
1010
#define _ASM_SIGCONTEXT_H
1111

12-
#include <linux/types.h>
13-
#include <asm/sgidefs.h>
14-
15-
#if _MIPS_SIM == _MIPS_SIM_ABI32
16-
17-
/*
18-
* Keep this struct definition in sync with the sigcontext fragment
19-
* in arch/mips/tools/offset.c
20-
*/
21-
struct sigcontext {
22-
unsigned int sc_regmask; /* Unused */
23-
unsigned int sc_status; /* Unused */
24-
unsigned long long sc_pc;
25-
unsigned long long sc_regs[32];
26-
unsigned long long sc_fpregs[32];
27-
unsigned int sc_acx; /* Was sc_ownedfp */
28-
unsigned int sc_fpc_csr;
29-
unsigned int sc_fpc_eir; /* Unused */
30-
unsigned int sc_used_math;
31-
unsigned int sc_dsp; /* dsp status, was sc_ssflags */
32-
unsigned long long sc_mdhi;
33-
unsigned long long sc_mdlo;
34-
unsigned long sc_hi1; /* Was sc_cause */
35-
unsigned long sc_lo1; /* Was sc_badvaddr */
36-
unsigned long sc_hi2; /* Was sc_sigset[4] */
37-
unsigned long sc_lo2;
38-
unsigned long sc_hi3;
39-
unsigned long sc_lo3;
40-
};
41-
42-
#endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */
12+
#include <uapi/asm/sigcontext.h>
4313

4414
#if _MIPS_SIM == _MIPS_SIM_ABI64 || _MIPS_SIM == _MIPS_SIM_NABI32
4515

46-
#include <linux/posix_types.h>
47-
/*
48-
* Keep this struct definition in sync with the sigcontext fragment
49-
* in arch/mips/tools/offset.c
50-
*
51-
* Warning: this structure illdefined with sc_badvaddr being just an unsigned
52-
* int so it was changed to unsigned long in 2.6.0-test1. This may break
53-
* binary compatibility - no prisoners.
54-
* DSP ASE in 2.6.12-rc4. Turn sc_mdhi and sc_mdlo into an array of four
55-
* entries, add sc_dsp and sc_reserved for padding. No prisoners.
56-
*/
57-
struct sigcontext {
58-
__u64 sc_regs[32];
59-
__u64 sc_fpregs[32];
60-
__u64 sc_mdhi;
61-
__u64 sc_hi1;
62-
__u64 sc_hi2;
63-
__u64 sc_hi3;
64-
__u64 sc_mdlo;
65-
__u64 sc_lo1;
66-
__u64 sc_lo2;
67-
__u64 sc_lo3;
68-
__u64 sc_pc;
69-
__u32 sc_fpc_csr;
70-
__u32 sc_used_math;
71-
__u32 sc_dsp;
72-
__u32 sc_reserved;
73-
};
74-
75-
#ifdef __KERNEL__
76-
7716
struct sigcontext32 {
7817
__u32 sc_regmask; /* Unused */
7918
__u32 sc_status; /* Unused */
@@ -94,8 +33,5 @@ struct sigcontext32 {
9433
__u32 sc_hi3;
9534
__u32 sc_lo3;
9635
};
97-
#endif /* __KERNEL__ */
98-
9936
#endif /* _MIPS_SIM == _MIPS_SIM_ABI64 || _MIPS_SIM == _MIPS_SIM_NABI32 */
100-
10137
#endif /* _ASM_SIGCONTEXT_H */

0 commit comments

Comments
 (0)