aboutsummaryrefslogtreecommitdiffstats
path: root/arch/c6x/include/uapi
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2012-10-09 04:46:40 -0400
committerMark Salter <msalter@redhat.com>2012-10-09 14:56:38 -0400
commitfbdd63d76c5ad6ae56a7bd1acebabefafc6aadf0 (patch)
tree44d5d0119cf7e51c299b18f09ba76d9a17956549 /arch/c6x/include/uapi
parent547b1e81afe3119f7daf702cc03b158495535a25 (diff)
UAPI: (Scripted) Disintegrate arch/c6x/include/asm
Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Michael Kerrisk <mtk.manpages@gmail.com> Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Acked-by: Dave Jones <davej@redhat.com> Signed-off-by: Mark Salter <msalter@redhat.com>
Diffstat (limited to 'arch/c6x/include/uapi')
-rw-r--r--arch/c6x/include/uapi/asm/Kbuild7
-rw-r--r--arch/c6x/include/uapi/asm/byteorder.h12
-rw-r--r--arch/c6x/include/uapi/asm/kvm_para.h1
-rw-r--r--arch/c6x/include/uapi/asm/ptrace.h163
-rw-r--r--arch/c6x/include/uapi/asm/setup.h33
-rw-r--r--arch/c6x/include/uapi/asm/sigcontext.h80
-rw-r--r--arch/c6x/include/uapi/asm/swab.h54
-rw-r--r--arch/c6x/include/uapi/asm/unistd.h22
8 files changed, 372 insertions, 0 deletions
diff --git a/arch/c6x/include/uapi/asm/Kbuild b/arch/c6x/include/uapi/asm/Kbuild
index baebb3da1d44..c312b424c433 100644
--- a/arch/c6x/include/uapi/asm/Kbuild
+++ b/arch/c6x/include/uapi/asm/Kbuild
@@ -1,3 +1,10 @@
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 += byteorder.h
5header-y += kvm_para.h
6header-y += ptrace.h
7header-y += setup.h
8header-y += sigcontext.h
9header-y += swab.h
10header-y += unistd.h
diff --git a/arch/c6x/include/uapi/asm/byteorder.h b/arch/c6x/include/uapi/asm/byteorder.h
new file mode 100644
index 000000000000..166038db342b
--- /dev/null
+++ b/arch/c6x/include/uapi/asm/byteorder.h
@@ -0,0 +1,12 @@
1#ifndef _ASM_C6X_BYTEORDER_H
2#define _ASM_C6X_BYTEORDER_H
3
4#include <asm/types.h>
5
6#ifdef _BIG_ENDIAN
7#include <linux/byteorder/big_endian.h>
8#else /* _BIG_ENDIAN */
9#include <linux/byteorder/little_endian.h>
10#endif /* _BIG_ENDIAN */
11
12#endif /* _ASM_BYTEORDER_H */
diff --git a/arch/c6x/include/uapi/asm/kvm_para.h b/arch/c6x/include/uapi/asm/kvm_para.h
new file mode 100644
index 000000000000..14fab8f0b957
--- /dev/null
+++ b/arch/c6x/include/uapi/asm/kvm_para.h
@@ -0,0 +1 @@
#include <asm-generic/kvm_para.h>
diff --git a/arch/c6x/include/uapi/asm/ptrace.h b/arch/c6x/include/uapi/asm/ptrace.h
new file mode 100644
index 000000000000..cc0a4d99151e
--- /dev/null
+++ b/arch/c6x/include/uapi/asm/ptrace.h
@@ -0,0 +1,163 @@
1/*
2 * Copyright (C) 2004, 2006, 2009, 2010 Texas Instruments Incorporated
3 * Author: Aurelien Jacquiot (aurelien.jacquiot@jaluna.com)
4 *
5 * Updated for 2.6.34: Mark Salter <msalter@redhat.com>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 */
11#ifndef _UAPI_ASM_C6X_PTRACE_H
12#define _UAPI_ASM_C6X_PTRACE_H
13
14#define BKPT_OPCODE 0x56454314 /* illegal opcode */
15
16#ifdef _BIG_ENDIAN
17#define PT_LO(odd, even) odd
18#define PT_HI(odd, even) even
19#else
20#define PT_LO(odd, even) even
21#define PT_HI(odd, even) odd
22#endif
23
24#define PT_A4_ORG PT_LO(1, 0)
25#define PT_TSR PT_HI(1, 0)
26#define PT_ILC PT_LO(3, 2)
27#define PT_RILC PT_HI(3, 2)
28#define PT_CSR PT_LO(5, 4)
29#define PT_PC PT_HI(5, 4)
30#define PT_B16 PT_LO(7, 6)
31#define PT_B17 PT_HI(7, 6)
32#define PT_B18 PT_LO(9, 8)
33#define PT_B19 PT_HI(9, 8)
34#define PT_B20 PT_LO(11, 10)
35#define PT_B21 PT_HI(11, 10)
36#define PT_B22 PT_LO(13, 12)
37#define PT_B23 PT_HI(13, 12)
38#define PT_B24 PT_LO(15, 14)
39#define PT_B25 PT_HI(15, 14)
40#define PT_B26 PT_LO(17, 16)
41#define PT_B27 PT_HI(17, 16)
42#define PT_B28 PT_LO(19, 18)
43#define PT_B29 PT_HI(19, 18)
44#define PT_B30 PT_LO(21, 20)
45#define PT_B31 PT_HI(21, 20)
46#define PT_B0 PT_LO(23, 22)
47#define PT_B1 PT_HI(23, 22)
48#define PT_B2 PT_LO(25, 24)
49#define PT_B3 PT_HI(25, 24)
50#define PT_B4 PT_LO(27, 26)
51#define PT_B5 PT_HI(27, 26)
52#define PT_B6 PT_LO(29, 28)
53#define PT_B7 PT_HI(29, 28)
54#define PT_B8 PT_LO(31, 30)
55#define PT_B9 PT_HI(31, 30)
56#define PT_B10 PT_LO(33, 32)
57#define PT_B11 PT_HI(33, 32)
58#define PT_B12 PT_LO(35, 34)
59#define PT_B13 PT_HI(35, 34)
60#define PT_A16 PT_LO(37, 36)
61#define PT_A17 PT_HI(37, 36)
62#define PT_A18 PT_LO(39, 38)
63#define PT_A19 PT_HI(39, 38)
64#define PT_A20 PT_LO(41, 40)
65#define PT_A21 PT_HI(41, 40)
66#define PT_A22 PT_LO(43, 42)
67#define PT_A23 PT_HI(43, 42)
68#define PT_A24 PT_LO(45, 44)
69#define PT_A25 PT_HI(45, 44)
70#define PT_A26 PT_LO(47, 46)
71#define PT_A27 PT_HI(47, 46)
72#define PT_A28 PT_LO(49, 48)
73#define PT_A29 PT_HI(49, 48)
74#define PT_A30 PT_LO(51, 50)
75#define PT_A31 PT_HI(51, 50)
76#define PT_A0 PT_LO(53, 52)
77#define PT_A1 PT_HI(53, 52)
78#define PT_A2 PT_LO(55, 54)
79#define PT_A3 PT_HI(55, 54)
80#define PT_A4 PT_LO(57, 56)
81#define PT_A5 PT_HI(57, 56)
82#define PT_A6 PT_LO(59, 58)
83#define PT_A7 PT_HI(59, 58)
84#define PT_A8 PT_LO(61, 60)
85#define PT_A9 PT_HI(61, 60)
86#define PT_A10 PT_LO(63, 62)
87#define PT_A11 PT_HI(63, 62)
88#define PT_A12 PT_LO(65, 64)
89#define PT_A13 PT_HI(65, 64)
90#define PT_A14 PT_LO(67, 66)
91#define PT_A15 PT_HI(67, 66)
92#define PT_B14 PT_LO(69, 68)
93#define PT_B15 PT_HI(69, 68)
94
95#define NR_PTREGS 70
96
97#define PT_DP PT_B14 /* Data Segment Pointer (B14) */
98#define PT_SP PT_B15 /* Stack Pointer (B15) */
99
100#define PTRACE_GETFDPIC 31 /* get the ELF fdpic loadmap address */
101
102#define PTRACE_GETFDPIC_EXEC 0 /* [addr] request the executable loadmap */
103#define PTRACE_GETFDPIC_INTERP 1 /* [addr] request the interpreter loadmap */
104
105#ifndef __ASSEMBLY__
106
107#ifdef _BIG_ENDIAN
108#define REG_PAIR(odd, even) unsigned long odd; unsigned long even
109#else
110#define REG_PAIR(odd, even) unsigned long even; unsigned long odd
111#endif
112
113/*
114 * this struct defines the way the registers are stored on the
115 * stack during a system call. fields defined with REG_PAIR
116 * are saved and restored using double-word memory operations
117 * which means the word ordering of the pair depends on endianess.
118 */
119struct pt_regs {
120 REG_PAIR(tsr, orig_a4);
121 REG_PAIR(rilc, ilc);
122 REG_PAIR(pc, csr);
123
124 REG_PAIR(b17, b16);
125 REG_PAIR(b19, b18);
126 REG_PAIR(b21, b20);
127 REG_PAIR(b23, b22);
128 REG_PAIR(b25, b24);
129 REG_PAIR(b27, b26);
130 REG_PAIR(b29, b28);
131 REG_PAIR(b31, b30);
132
133 REG_PAIR(b1, b0);
134 REG_PAIR(b3, b2);
135 REG_PAIR(b5, b4);
136 REG_PAIR(b7, b6);
137 REG_PAIR(b9, b8);
138 REG_PAIR(b11, b10);
139 REG_PAIR(b13, b12);
140
141 REG_PAIR(a17, a16);
142 REG_PAIR(a19, a18);
143 REG_PAIR(a21, a20);
144 REG_PAIR(a23, a22);
145 REG_PAIR(a25, a24);
146 REG_PAIR(a27, a26);
147 REG_PAIR(a29, a28);
148 REG_PAIR(a31, a30);
149
150 REG_PAIR(a1, a0);
151 REG_PAIR(a3, a2);
152 REG_PAIR(a5, a4);
153 REG_PAIR(a7, a6);
154 REG_PAIR(a9, a8);
155 REG_PAIR(a11, a10);
156 REG_PAIR(a13, a12);
157
158 REG_PAIR(a15, a14);
159 REG_PAIR(sp, dp);
160};
161
162#endif /* __ASSEMBLY__ */
163#endif /* _UAPI_ASM_C6X_PTRACE_H */
diff --git a/arch/c6x/include/uapi/asm/setup.h b/arch/c6x/include/uapi/asm/setup.h
new file mode 100644
index 000000000000..a01e31896fa9
--- /dev/null
+++ b/arch/c6x/include/uapi/asm/setup.h
@@ -0,0 +1,33 @@
1/*
2 * Port on Texas Instruments TMS320C6x architecture
3 *
4 * Copyright (C) 2004, 2009, 2010 2011 Texas Instruments Incorporated
5 * Author: Aurelien Jacquiot (aurelien.jacquiot@jaluna.com)
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 */
11#ifndef _ASM_C6X_SETUP_H
12#define _ASM_C6X_SETUP_H
13
14#define COMMAND_LINE_SIZE 1024
15
16#ifndef __ASSEMBLY__
17extern char c6x_command_line[COMMAND_LINE_SIZE];
18
19extern int c6x_add_memory(phys_addr_t start, unsigned long size);
20
21extern unsigned long ram_start;
22extern unsigned long ram_end;
23
24extern int c6x_num_cores;
25extern unsigned int c6x_silicon_rev;
26extern unsigned int c6x_devstat;
27extern unsigned char c6x_fuse_mac[6];
28
29extern void machine_init(unsigned long dt_ptr);
30extern void time_init(void);
31
32#endif /* !__ASSEMBLY__ */
33#endif /* _ASM_C6X_SETUP_H */
diff --git a/arch/c6x/include/uapi/asm/sigcontext.h b/arch/c6x/include/uapi/asm/sigcontext.h
new file mode 100644
index 000000000000..eb702f39cde7
--- /dev/null
+++ b/arch/c6x/include/uapi/asm/sigcontext.h
@@ -0,0 +1,80 @@
1/*
2 * Port on Texas Instruments TMS320C6x architecture
3 *
4 * Copyright (C) 2004, 2009 Texas Instruments Incorporated
5 * Author: Aurelien Jacquiot (aurelien.jacquiot@jaluna.com)
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 */
11#ifndef _ASM_C6X_SIGCONTEXT_H
12#define _ASM_C6X_SIGCONTEXT_H
13
14
15struct sigcontext {
16 unsigned long sc_mask; /* old sigmask */
17 unsigned long sc_sp; /* old user stack pointer */
18
19 unsigned long sc_a4;
20 unsigned long sc_b4;
21 unsigned long sc_a6;
22 unsigned long sc_b6;
23 unsigned long sc_a8;
24 unsigned long sc_b8;
25
26 unsigned long sc_a0;
27 unsigned long sc_a1;
28 unsigned long sc_a2;
29 unsigned long sc_a3;
30 unsigned long sc_a5;
31 unsigned long sc_a7;
32 unsigned long sc_a9;
33
34 unsigned long sc_b0;
35 unsigned long sc_b1;
36 unsigned long sc_b2;
37 unsigned long sc_b3;
38 unsigned long sc_b5;
39 unsigned long sc_b7;
40 unsigned long sc_b9;
41
42 unsigned long sc_a16;
43 unsigned long sc_a17;
44 unsigned long sc_a18;
45 unsigned long sc_a19;
46 unsigned long sc_a20;
47 unsigned long sc_a21;
48 unsigned long sc_a22;
49 unsigned long sc_a23;
50 unsigned long sc_a24;
51 unsigned long sc_a25;
52 unsigned long sc_a26;
53 unsigned long sc_a27;
54 unsigned long sc_a28;
55 unsigned long sc_a29;
56 unsigned long sc_a30;
57 unsigned long sc_a31;
58
59 unsigned long sc_b16;
60 unsigned long sc_b17;
61 unsigned long sc_b18;
62 unsigned long sc_b19;
63 unsigned long sc_b20;
64 unsigned long sc_b21;
65 unsigned long sc_b22;
66 unsigned long sc_b23;
67 unsigned long sc_b24;
68 unsigned long sc_b25;
69 unsigned long sc_b26;
70 unsigned long sc_b27;
71 unsigned long sc_b28;
72 unsigned long sc_b29;
73 unsigned long sc_b30;
74 unsigned long sc_b31;
75
76 unsigned long sc_csr;
77 unsigned long sc_pc;
78};
79
80#endif /* _ASM_C6X_SIGCONTEXT_H */
diff --git a/arch/c6x/include/uapi/asm/swab.h b/arch/c6x/include/uapi/asm/swab.h
new file mode 100644
index 000000000000..fd4bb0520e5e
--- /dev/null
+++ b/arch/c6x/include/uapi/asm/swab.h
@@ -0,0 +1,54 @@
1/*
2 * Copyright (C) 2011 Texas Instruments Incorporated
3 * Author: Mark Salter <msalter@redhat.com>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
8 */
9#ifndef _ASM_C6X_SWAB_H
10#define _ASM_C6X_SWAB_H
11
12static inline __attribute_const__ __u16 __c6x_swab16(__u16 val)
13{
14 asm("swap4 .l1 %0,%0\n" : "+a"(val));
15 return val;
16}
17
18static inline __attribute_const__ __u32 __c6x_swab32(__u32 val)
19{
20 asm("swap4 .l1 %0,%0\n"
21 "swap2 .l1 %0,%0\n"
22 : "+a"(val));
23 return val;
24}
25
26static inline __attribute_const__ __u64 __c6x_swab64(__u64 val)
27{
28 asm(" swap2 .s1 %p0,%P0\n"
29 "|| swap2 .l1 %P0,%p0\n"
30 " swap4 .l1 %p0,%p0\n"
31 " swap4 .l1 %P0,%P0\n"
32 : "+a"(val));
33 return val;
34}
35
36static inline __attribute_const__ __u32 __c6x_swahw32(__u32 val)
37{
38 asm("swap2 .l1 %0,%0\n" : "+a"(val));
39 return val;
40}
41
42static inline __attribute_const__ __u32 __c6x_swahb32(__u32 val)
43{
44 asm("swap4 .l1 %0,%0\n" : "+a"(val));
45 return val;
46}
47
48#define __arch_swab16 __c6x_swab16
49#define __arch_swab32 __c6x_swab32
50#define __arch_swab64 __c6x_swab64
51#define __arch_swahw32 __c6x_swahw32
52#define __arch_swahb32 __c6x_swahb32
53
54#endif /* _ASM_C6X_SWAB_H */
diff --git a/arch/c6x/include/uapi/asm/unistd.h b/arch/c6x/include/uapi/asm/unistd.h
new file mode 100644
index 000000000000..ed2259043eec
--- /dev/null
+++ b/arch/c6x/include/uapi/asm/unistd.h
@@ -0,0 +1,22 @@
1/*
2 * Copyright (C) 2011 Texas Instruments Incorporated
3 *
4 * Based on arch/tile version.
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation, version 2.
9 *
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
13 * NON INFRINGEMENT. See the GNU General Public License for
14 * more details.
15 */
16
17/* Use the standard ABI for syscalls. */
18#include <asm-generic/unistd.h>
19
20/* C6X-specific syscalls. */
21#define __NR_cache_sync (__NR_arch_specific_syscall + 0)
22__SYSCALL(__NR_cache_sync, sys_cache_sync)