aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/include/uapi/asm
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-08-07 11:47:00 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-08-07 11:47:00 -0400
commite669830526a0abaf301bf408df69cde33901ac63 (patch)
tree0b6043375006d1754bbd1ab2370b0a0536546cc9 /arch/mips/include/uapi/asm
parentebb067d2f4e2db59b076f9c9cba0375a8ad1e07c (diff)
parent475d5928b79bb78326a645863d46ff95c5e25e5a (diff)
Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus
Pull MIPS updates from Ralf Baechle: "This is the main pull request for 3.17. It contains: - misc Cavium Octeon, BCM47xx, BCM63xx and Alchemy updates - MIPS ptrace updates and cleanups - various fixes that will also go to -stable - a number of cleanups and small non-critical fixes. - NUMA support for the Loongson 3. - more support for MSA - support for MAAR - various FP enhancements and fixes" * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: (139 commits) MIPS: jz4740: remove unnecessary null test before debugfs_remove MIPS: Octeon: remove unnecessary null test before debugfs_remove_recursive MIPS: ZBOOT: implement stack protector in compressed boot phase MIPS: mipsreg: remove duplicate MIPS_CONF4_FTLBSETS_SHIFT MIPS: Bonito64: remove a duplicate define MIPS: Malta: initialise MAARs MIPS: Initialise MAARs MIPS: detect presence of MAARs MIPS: define MAAR register accessors & bits MIPS: mark MSA experimental MIPS: Don't build MSA support unless it can be used MIPS: consistently clear MSA flags when starting & copying threads MIPS: 16 byte align MSA vector context MIPS: disable preemption whilst initialising MSA MIPS: ensure MSA gets disabled during boot MIPS: fix read_msa_* & write_msa_* functions on non-MSA toolchains MIPS: fix MSA context for tasks which don't use FP first MIPS: init upper 64b of vector registers when MSA is first used MIPS: save/disable MSA in lose_fpu MIPS: preserve scalar FP CSR when switching vector context ...
Diffstat (limited to 'arch/mips/include/uapi/asm')
-rw-r--r--arch/mips/include/uapi/asm/ptrace.h25
-rw-r--r--arch/mips/include/uapi/asm/reg.h206
2 files changed, 220 insertions, 11 deletions
diff --git a/arch/mips/include/uapi/asm/ptrace.h b/arch/mips/include/uapi/asm/ptrace.h
index b26f7e317279..bbcfb8ba8106 100644
--- a/arch/mips/include/uapi/asm/ptrace.h
+++ b/arch/mips/include/uapi/asm/ptrace.h
@@ -22,24 +22,27 @@
22#define DSP_CONTROL 77 22#define DSP_CONTROL 77
23#define ACX 78 23#define ACX 78
24 24
25#ifndef __KERNEL__
26/* 25/*
27 * This struct defines the way the registers are stored on the stack during a 26 * This struct defines the registers as used by PTRACE_{GET,SET}REGS. The
28 * system call/exception. As usual the registers k0/k1 aren't being saved. 27 * format is the same for both 32- and 64-bit processes. Registers for 32-bit
28 * processes are sign extended.
29 */ 29 */
30#ifdef __KERNEL__
31struct user_pt_regs {
32#else
30struct pt_regs { 33struct pt_regs {
34#endif
31 /* Saved main processor registers. */ 35 /* Saved main processor registers. */
32 unsigned long regs[32]; 36 __u64 regs[32];
33 37
34 /* Saved special registers. */ 38 /* Saved special registers. */
35 unsigned long cp0_status; 39 __u64 lo;
36 unsigned long hi; 40 __u64 hi;
37 unsigned long lo; 41 __u64 cp0_epc;
38 unsigned long cp0_badvaddr; 42 __u64 cp0_badvaddr;
39 unsigned long cp0_cause; 43 __u64 cp0_status;
40 unsigned long cp0_epc; 44 __u64 cp0_cause;
41} __attribute__ ((aligned (8))); 45} __attribute__ ((aligned (8)));
42#endif /* __KERNEL__ */
43 46
44/* Arbitrarily choose the same ptrace numbers as used by the Sparc code. */ 47/* Arbitrarily choose the same ptrace numbers as used by the Sparc code. */
45#define PTRACE_GETREGS 12 48#define PTRACE_GETREGS 12
diff --git a/arch/mips/include/uapi/asm/reg.h b/arch/mips/include/uapi/asm/reg.h
new file mode 100644
index 000000000000..081e377f4f02
--- /dev/null
+++ b/arch/mips/include/uapi/asm/reg.h
@@ -0,0 +1,206 @@
1/*
2 * Various register offset definitions for debuggers, core file
3 * examiners and whatnot.
4 *
5 * This file is subject to the terms and conditions of the GNU General Public
6 * License. See the file "COPYING" in the main directory of this archive
7 * for more details.
8 *
9 * Copyright (C) 1995, 1999 Ralf Baechle
10 * Copyright (C) 1995, 1999 Silicon Graphics
11 */
12#ifndef __UAPI_ASM_MIPS_REG_H
13#define __UAPI_ASM_MIPS_REG_H
14
15#define MIPS32_EF_R0 6
16#define MIPS32_EF_R1 7
17#define MIPS32_EF_R2 8
18#define MIPS32_EF_R3 9
19#define MIPS32_EF_R4 10
20#define MIPS32_EF_R5 11
21#define MIPS32_EF_R6 12
22#define MIPS32_EF_R7 13
23#define MIPS32_EF_R8 14
24#define MIPS32_EF_R9 15
25#define MIPS32_EF_R10 16
26#define MIPS32_EF_R11 17
27#define MIPS32_EF_R12 18
28#define MIPS32_EF_R13 19
29#define MIPS32_EF_R14 20
30#define MIPS32_EF_R15 21
31#define MIPS32_EF_R16 22
32#define MIPS32_EF_R17 23
33#define MIPS32_EF_R18 24
34#define MIPS32_EF_R19 25
35#define MIPS32_EF_R20 26
36#define MIPS32_EF_R21 27
37#define MIPS32_EF_R22 28
38#define MIPS32_EF_R23 29
39#define MIPS32_EF_R24 30
40#define MIPS32_EF_R25 31
41
42/*
43 * k0/k1 unsaved
44 */
45#define MIPS32_EF_R26 32
46#define MIPS32_EF_R27 33
47
48#define MIPS32_EF_R28 34
49#define MIPS32_EF_R29 35
50#define MIPS32_EF_R30 36
51#define MIPS32_EF_R31 37
52
53/*
54 * Saved special registers
55 */
56#define MIPS32_EF_LO 38
57#define MIPS32_EF_HI 39
58
59#define MIPS32_EF_CP0_EPC 40
60#define MIPS32_EF_CP0_BADVADDR 41
61#define MIPS32_EF_CP0_STATUS 42
62#define MIPS32_EF_CP0_CAUSE 43
63#define MIPS32_EF_UNUSED0 44
64
65#define MIPS32_EF_SIZE 180
66
67#define MIPS64_EF_R0 0
68#define MIPS64_EF_R1 1
69#define MIPS64_EF_R2 2
70#define MIPS64_EF_R3 3
71#define MIPS64_EF_R4 4
72#define MIPS64_EF_R5 5
73#define MIPS64_EF_R6 6
74#define MIPS64_EF_R7 7
75#define MIPS64_EF_R8 8
76#define MIPS64_EF_R9 9
77#define MIPS64_EF_R10 10
78#define MIPS64_EF_R11 11
79#define MIPS64_EF_R12 12
80#define MIPS64_EF_R13 13
81#define MIPS64_EF_R14 14
82#define MIPS64_EF_R15 15
83#define MIPS64_EF_R16 16
84#define MIPS64_EF_R17 17
85#define MIPS64_EF_R18 18
86#define MIPS64_EF_R19 19
87#define MIPS64_EF_R20 20
88#define MIPS64_EF_R21 21
89#define MIPS64_EF_R22 22
90#define MIPS64_EF_R23 23
91#define MIPS64_EF_R24 24
92#define MIPS64_EF_R25 25
93
94/*
95 * k0/k1 unsaved
96 */
97#define MIPS64_EF_R26 26
98#define MIPS64_EF_R27 27
99
100
101#define MIPS64_EF_R28 28
102#define MIPS64_EF_R29 29
103#define MIPS64_EF_R30 30
104#define MIPS64_EF_R31 31
105
106/*
107 * Saved special registers
108 */
109#define MIPS64_EF_LO 32
110#define MIPS64_EF_HI 33
111
112#define MIPS64_EF_CP0_EPC 34
113#define MIPS64_EF_CP0_BADVADDR 35
114#define MIPS64_EF_CP0_STATUS 36
115#define MIPS64_EF_CP0_CAUSE 37
116
117#define MIPS64_EF_SIZE 304 /* size in bytes */
118
119#if _MIPS_SIM == _MIPS_SIM_ABI32
120
121#define EF_R0 MIPS32_EF_R0
122#define EF_R1 MIPS32_EF_R1
123#define EF_R2 MIPS32_EF_R2
124#define EF_R3 MIPS32_EF_R3
125#define EF_R4 MIPS32_EF_R4
126#define EF_R5 MIPS32_EF_R5
127#define EF_R6 MIPS32_EF_R6
128#define EF_R7 MIPS32_EF_R7
129#define EF_R8 MIPS32_EF_R8
130#define EF_R9 MIPS32_EF_R9
131#define EF_R10 MIPS32_EF_R10
132#define EF_R11 MIPS32_EF_R11
133#define EF_R12 MIPS32_EF_R12
134#define EF_R13 MIPS32_EF_R13
135#define EF_R14 MIPS32_EF_R14
136#define EF_R15 MIPS32_EF_R15
137#define EF_R16 MIPS32_EF_R16
138#define EF_R17 MIPS32_EF_R17
139#define EF_R18 MIPS32_EF_R18
140#define EF_R19 MIPS32_EF_R19
141#define EF_R20 MIPS32_EF_R20
142#define EF_R21 MIPS32_EF_R21
143#define EF_R22 MIPS32_EF_R22
144#define EF_R23 MIPS32_EF_R23
145#define EF_R24 MIPS32_EF_R24
146#define EF_R25 MIPS32_EF_R25
147#define EF_R26 MIPS32_EF_R26
148#define EF_R27 MIPS32_EF_R27
149#define EF_R28 MIPS32_EF_R28
150#define EF_R29 MIPS32_EF_R29
151#define EF_R30 MIPS32_EF_R30
152#define EF_R31 MIPS32_EF_R31
153#define EF_LO MIPS32_EF_LO
154#define EF_HI MIPS32_EF_HI
155#define EF_CP0_EPC MIPS32_EF_CP0_EPC
156#define EF_CP0_BADVADDR MIPS32_EF_CP0_BADVADDR
157#define EF_CP0_STATUS MIPS32_EF_CP0_STATUS
158#define EF_CP0_CAUSE MIPS32_EF_CP0_CAUSE
159#define EF_UNUSED0 MIPS32_EF_UNUSED0
160#define EF_SIZE MIPS32_EF_SIZE
161
162#elif _MIPS_SIM == _MIPS_SIM_ABI64 || _MIPS_SIM == _MIPS_SIM_NABI32
163
164#define EF_R0 MIPS64_EF_R0
165#define EF_R1 MIPS64_EF_R1
166#define EF_R2 MIPS64_EF_R2
167#define EF_R3 MIPS64_EF_R3
168#define EF_R4 MIPS64_EF_R4
169#define EF_R5 MIPS64_EF_R5
170#define EF_R6 MIPS64_EF_R6
171#define EF_R7 MIPS64_EF_R7
172#define EF_R8 MIPS64_EF_R8
173#define EF_R9 MIPS64_EF_R9
174#define EF_R10 MIPS64_EF_R10
175#define EF_R11 MIPS64_EF_R11
176#define EF_R12 MIPS64_EF_R12
177#define EF_R13 MIPS64_EF_R13
178#define EF_R14 MIPS64_EF_R14
179#define EF_R15 MIPS64_EF_R15
180#define EF_R16 MIPS64_EF_R16
181#define EF_R17 MIPS64_EF_R17
182#define EF_R18 MIPS64_EF_R18
183#define EF_R19 MIPS64_EF_R19
184#define EF_R20 MIPS64_EF_R20
185#define EF_R21 MIPS64_EF_R21
186#define EF_R22 MIPS64_EF_R22
187#define EF_R23 MIPS64_EF_R23
188#define EF_R24 MIPS64_EF_R24
189#define EF_R25 MIPS64_EF_R25
190#define EF_R26 MIPS64_EF_R26
191#define EF_R27 MIPS64_EF_R27
192#define EF_R28 MIPS64_EF_R28
193#define EF_R29 MIPS64_EF_R29
194#define EF_R30 MIPS64_EF_R30
195#define EF_R31 MIPS64_EF_R31
196#define EF_LO MIPS64_EF_LO
197#define EF_HI MIPS64_EF_HI
198#define EF_CP0_EPC MIPS64_EF_CP0_EPC
199#define EF_CP0_BADVADDR MIPS64_EF_CP0_BADVADDR
200#define EF_CP0_STATUS MIPS64_EF_CP0_STATUS
201#define EF_CP0_CAUSE MIPS64_EF_CP0_CAUSE
202#define EF_SIZE MIPS64_EF_SIZE
203
204#endif /* _MIPS_SIM == _MIPS_SIM_ABI64 || _MIPS_SIM == _MIPS_SIM_NABI32 */
205
206#endif /* __UAPI_ASM_MIPS_REG_H */