diff options
author | David Howells <dhowells@redhat.com> | 2012-10-09 04:47:47 -0400 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2012-10-09 04:47:47 -0400 |
commit | df842f79f0e2aed9092a73f611f41f03630a3823 (patch) | |
tree | db2dc067ad2ab04cda1567b5b006ad85eb0a7ec6 /arch/tile/include/uapi | |
parent | 43e858598a1a3d0a9352515f847c04e80942ca4a (diff) |
UAPI: (Scripted) Disintegrate arch/tile/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>
Diffstat (limited to 'arch/tile/include/uapi')
-rw-r--r-- | arch/tile/include/uapi/asm/Kbuild | 15 | ||||
-rw-r--r-- | arch/tile/include/uapi/asm/auxvec.h | 20 | ||||
-rw-r--r-- | arch/tile/include/uapi/asm/bitsperlong.h | 26 | ||||
-rw-r--r-- | arch/tile/include/uapi/asm/byteorder.h | 21 | ||||
-rw-r--r-- | arch/tile/include/uapi/asm/cachectl.h | 42 | ||||
-rw-r--r-- | arch/tile/include/uapi/asm/hardwall.h | 51 | ||||
-rw-r--r-- | arch/tile/include/uapi/asm/kvm_para.h | 1 | ||||
-rw-r--r-- | arch/tile/include/uapi/asm/mman.h | 41 | ||||
-rw-r--r-- | arch/tile/include/uapi/asm/ptrace.h | 88 | ||||
-rw-r--r-- | arch/tile/include/uapi/asm/setup.h | 21 | ||||
-rw-r--r-- | arch/tile/include/uapi/asm/sigcontext.h | 37 | ||||
-rw-r--r-- | arch/tile/include/uapi/asm/siginfo.h | 34 | ||||
-rw-r--r-- | arch/tile/include/uapi/asm/signal.h | 27 | ||||
-rw-r--r-- | arch/tile/include/uapi/asm/stat.h | 4 | ||||
-rw-r--r-- | arch/tile/include/uapi/asm/swab.h | 23 | ||||
-rw-r--r-- | arch/tile/include/uapi/asm/unistd.h | 34 |
16 files changed, 485 insertions, 0 deletions
diff --git a/arch/tile/include/uapi/asm/Kbuild b/arch/tile/include/uapi/asm/Kbuild index baebb3da1d44..5c6915fd30b5 100644 --- a/arch/tile/include/uapi/asm/Kbuild +++ b/arch/tile/include/uapi/asm/Kbuild | |||
@@ -1,3 +1,18 @@ | |||
1 | # UAPI Header export list | 1 | # UAPI Header export list |
2 | include include/uapi/asm-generic/Kbuild.asm | 2 | include include/uapi/asm-generic/Kbuild.asm |
3 | 3 | ||
4 | header-y += auxvec.h | ||
5 | header-y += bitsperlong.h | ||
6 | header-y += byteorder.h | ||
7 | header-y += cachectl.h | ||
8 | header-y += hardwall.h | ||
9 | header-y += kvm_para.h | ||
10 | header-y += mman.h | ||
11 | header-y += ptrace.h | ||
12 | header-y += setup.h | ||
13 | header-y += sigcontext.h | ||
14 | header-y += siginfo.h | ||
15 | header-y += signal.h | ||
16 | header-y += stat.h | ||
17 | header-y += swab.h | ||
18 | header-y += unistd.h | ||
diff --git a/arch/tile/include/uapi/asm/auxvec.h b/arch/tile/include/uapi/asm/auxvec.h new file mode 100644 index 000000000000..1d393edb0641 --- /dev/null +++ b/arch/tile/include/uapi/asm/auxvec.h | |||
@@ -0,0 +1,20 @@ | |||
1 | /* | ||
2 | * Copyright 2010 Tilera Corporation. All Rights Reserved. | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or | ||
5 | * modify it under the terms of the GNU General Public License | ||
6 | * as published by the Free Software Foundation, version 2. | ||
7 | * | ||
8 | * This program is distributed in the hope that it will be useful, but | ||
9 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or | ||
11 | * NON INFRINGEMENT. See the GNU General Public License for | ||
12 | * more details. | ||
13 | */ | ||
14 | |||
15 | #ifndef _ASM_TILE_AUXVEC_H | ||
16 | #define _ASM_TILE_AUXVEC_H | ||
17 | |||
18 | /* No extensions to auxvec */ | ||
19 | |||
20 | #endif /* _ASM_TILE_AUXVEC_H */ | ||
diff --git a/arch/tile/include/uapi/asm/bitsperlong.h b/arch/tile/include/uapi/asm/bitsperlong.h new file mode 100644 index 000000000000..58c771f2af2f --- /dev/null +++ b/arch/tile/include/uapi/asm/bitsperlong.h | |||
@@ -0,0 +1,26 @@ | |||
1 | /* | ||
2 | * Copyright 2010 Tilera Corporation. All Rights Reserved. | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or | ||
5 | * modify it under the terms of the GNU General Public License | ||
6 | * as published by the Free Software Foundation, version 2. | ||
7 | * | ||
8 | * This program is distributed in the hope that it will be useful, but | ||
9 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or | ||
11 | * NON INFRINGEMENT. See the GNU General Public License for | ||
12 | * more details. | ||
13 | */ | ||
14 | |||
15 | #ifndef _ASM_TILE_BITSPERLONG_H | ||
16 | #define _ASM_TILE_BITSPERLONG_H | ||
17 | |||
18 | #ifdef __LP64__ | ||
19 | # define __BITS_PER_LONG 64 | ||
20 | #else | ||
21 | # define __BITS_PER_LONG 32 | ||
22 | #endif | ||
23 | |||
24 | #include <asm-generic/bitsperlong.h> | ||
25 | |||
26 | #endif /* _ASM_TILE_BITSPERLONG_H */ | ||
diff --git a/arch/tile/include/uapi/asm/byteorder.h b/arch/tile/include/uapi/asm/byteorder.h new file mode 100644 index 000000000000..fb72ecf49218 --- /dev/null +++ b/arch/tile/include/uapi/asm/byteorder.h | |||
@@ -0,0 +1,21 @@ | |||
1 | /* | ||
2 | * Copyright 2011 Tilera Corporation. All Rights Reserved. | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or | ||
5 | * modify it under the terms of the GNU General Public License | ||
6 | * as published by the Free Software Foundation, version 2. | ||
7 | * | ||
8 | * This program is distributed in the hope that it will be useful, but | ||
9 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or | ||
11 | * NON INFRINGEMENT. See the GNU General Public License for | ||
12 | * more details. | ||
13 | */ | ||
14 | |||
15 | #if defined (__BIG_ENDIAN__) | ||
16 | #include <linux/byteorder/big_endian.h> | ||
17 | #elif defined (__LITTLE_ENDIAN__) | ||
18 | #include <linux/byteorder/little_endian.h> | ||
19 | #else | ||
20 | #error "__BIG_ENDIAN__ or __LITTLE_ENDIAN__ must be defined." | ||
21 | #endif | ||
diff --git a/arch/tile/include/uapi/asm/cachectl.h b/arch/tile/include/uapi/asm/cachectl.h new file mode 100644 index 000000000000..af4c9f9154d1 --- /dev/null +++ b/arch/tile/include/uapi/asm/cachectl.h | |||
@@ -0,0 +1,42 @@ | |||
1 | /* | ||
2 | * Copyright 2011 Tilera Corporation. All Rights Reserved. | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or | ||
5 | * modify it under the terms of the GNU General Public License | ||
6 | * as published by the Free Software Foundation, version 2. | ||
7 | * | ||
8 | * This program is distributed in the hope that it will be useful, but | ||
9 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or | ||
11 | * NON INFRINGEMENT. See the GNU General Public License for | ||
12 | * more details. | ||
13 | */ | ||
14 | |||
15 | #ifndef _ASM_TILE_CACHECTL_H | ||
16 | #define _ASM_TILE_CACHECTL_H | ||
17 | |||
18 | /* | ||
19 | * Options for cacheflush system call. | ||
20 | * | ||
21 | * The ICACHE flush is performed on all cores currently running the | ||
22 | * current process's address space. The intent is for user | ||
23 | * applications to be able to modify code, invoke the system call, | ||
24 | * then allow arbitrary other threads in the same address space to see | ||
25 | * the newly-modified code. Passing a length of CHIP_L1I_CACHE_SIZE() | ||
26 | * or more invalidates the entire icache on all cores in the address | ||
27 | * spaces. (Note: currently this option invalidates the entire icache | ||
28 | * regardless of the requested address and length, but we may choose | ||
29 | * to honor the arguments at some point.) | ||
30 | * | ||
31 | * Flush and invalidation of memory can normally be performed with the | ||
32 | * __insn_flush(), __insn_inv(), and __insn_finv() instructions from | ||
33 | * userspace. The DCACHE option to the system call allows userspace | ||
34 | * to flush the entire L1+L2 data cache from the core. In this case, | ||
35 | * the address and length arguments are not used. The DCACHE flush is | ||
36 | * restricted to the current core, not all cores in the address space. | ||
37 | */ | ||
38 | #define ICACHE (1<<0) /* invalidate L1 instruction cache */ | ||
39 | #define DCACHE (1<<1) /* flush and invalidate data cache */ | ||
40 | #define BCACHE (ICACHE|DCACHE) /* flush both caches */ | ||
41 | |||
42 | #endif /* _ASM_TILE_CACHECTL_H */ | ||
diff --git a/arch/tile/include/uapi/asm/hardwall.h b/arch/tile/include/uapi/asm/hardwall.h new file mode 100644 index 000000000000..c2169d4f4010 --- /dev/null +++ b/arch/tile/include/uapi/asm/hardwall.h | |||
@@ -0,0 +1,51 @@ | |||
1 | /* | ||
2 | * Copyright 2010 Tilera Corporation. All Rights Reserved. | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or | ||
5 | * modify it under the terms of the GNU General Public License | ||
6 | * as published by the Free Software Foundation, version 2. | ||
7 | * | ||
8 | * This program is distributed in the hope that it will be useful, but | ||
9 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or | ||
11 | * NON INFRINGEMENT. See the GNU General Public License for | ||
12 | * more details. | ||
13 | * | ||
14 | * Provide methods for access control of per-cpu resources like | ||
15 | * UDN, IDN, or IPI. | ||
16 | */ | ||
17 | |||
18 | #ifndef _UAPI_ASM_TILE_HARDWALL_H | ||
19 | #define _UAPI_ASM_TILE_HARDWALL_H | ||
20 | |||
21 | #include <arch/chip.h> | ||
22 | #include <linux/ioctl.h> | ||
23 | |||
24 | #define HARDWALL_IOCTL_BASE 0xa2 | ||
25 | |||
26 | /* | ||
27 | * The HARDWALL_CREATE() ioctl is a macro with a "size" argument. | ||
28 | * The resulting ioctl value is passed to the kernel in conjunction | ||
29 | * with a pointer to a standard kernel bitmask of cpus. | ||
30 | * For network resources (UDN or IDN) the bitmask must physically | ||
31 | * represent a rectangular configuration on the chip. | ||
32 | * The "size" is the number of bytes of cpu mask data. | ||
33 | */ | ||
34 | #define _HARDWALL_CREATE 1 | ||
35 | #define HARDWALL_CREATE(size) \ | ||
36 | _IOC(_IOC_READ, HARDWALL_IOCTL_BASE, _HARDWALL_CREATE, (size)) | ||
37 | |||
38 | #define _HARDWALL_ACTIVATE 2 | ||
39 | #define HARDWALL_ACTIVATE \ | ||
40 | _IO(HARDWALL_IOCTL_BASE, _HARDWALL_ACTIVATE) | ||
41 | |||
42 | #define _HARDWALL_DEACTIVATE 3 | ||
43 | #define HARDWALL_DEACTIVATE \ | ||
44 | _IO(HARDWALL_IOCTL_BASE, _HARDWALL_DEACTIVATE) | ||
45 | |||
46 | #define _HARDWALL_GET_ID 4 | ||
47 | #define HARDWALL_GET_ID \ | ||
48 | _IO(HARDWALL_IOCTL_BASE, _HARDWALL_GET_ID) | ||
49 | |||
50 | |||
51 | #endif /* _UAPI_ASM_TILE_HARDWALL_H */ | ||
diff --git a/arch/tile/include/uapi/asm/kvm_para.h b/arch/tile/include/uapi/asm/kvm_para.h new file mode 100644 index 000000000000..14fab8f0b957 --- /dev/null +++ b/arch/tile/include/uapi/asm/kvm_para.h | |||
@@ -0,0 +1 @@ | |||
#include <asm-generic/kvm_para.h> | |||
diff --git a/arch/tile/include/uapi/asm/mman.h b/arch/tile/include/uapi/asm/mman.h new file mode 100644 index 000000000000..81b8fc348d63 --- /dev/null +++ b/arch/tile/include/uapi/asm/mman.h | |||
@@ -0,0 +1,41 @@ | |||
1 | /* | ||
2 | * Copyright 2010 Tilera Corporation. All Rights Reserved. | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or | ||
5 | * modify it under the terms of the GNU General Public License | ||
6 | * as published by the Free Software Foundation, version 2. | ||
7 | * | ||
8 | * This program is distributed in the hope that it will be useful, but | ||
9 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or | ||
11 | * NON INFRINGEMENT. See the GNU General Public License for | ||
12 | * more details. | ||
13 | */ | ||
14 | |||
15 | #ifndef _ASM_TILE_MMAN_H | ||
16 | #define _ASM_TILE_MMAN_H | ||
17 | |||
18 | #include <asm-generic/mman-common.h> | ||
19 | #include <arch/chip.h> | ||
20 | |||
21 | /* Standard Linux flags */ | ||
22 | |||
23 | #define MAP_POPULATE 0x0040 /* populate (prefault) pagetables */ | ||
24 | #define MAP_NONBLOCK 0x0080 /* do not block on IO */ | ||
25 | #define MAP_GROWSDOWN 0x0100 /* stack-like segment */ | ||
26 | #define MAP_STACK MAP_GROWSDOWN /* provide convenience alias */ | ||
27 | #define MAP_LOCKED 0x0200 /* pages are locked */ | ||
28 | #define MAP_NORESERVE 0x0400 /* don't check for reservations */ | ||
29 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ | ||
30 | #define MAP_EXECUTABLE 0x1000 /* mark it as an executable */ | ||
31 | #define MAP_HUGETLB 0x4000 /* create a huge page mapping */ | ||
32 | |||
33 | |||
34 | /* | ||
35 | * Flags for mlockall | ||
36 | */ | ||
37 | #define MCL_CURRENT 1 /* lock all current mappings */ | ||
38 | #define MCL_FUTURE 2 /* lock all future mappings */ | ||
39 | |||
40 | |||
41 | #endif /* _ASM_TILE_MMAN_H */ | ||
diff --git a/arch/tile/include/uapi/asm/ptrace.h b/arch/tile/include/uapi/asm/ptrace.h new file mode 100644 index 000000000000..c717d0fec72e --- /dev/null +++ b/arch/tile/include/uapi/asm/ptrace.h | |||
@@ -0,0 +1,88 @@ | |||
1 | /* | ||
2 | * Copyright 2010 Tilera Corporation. All Rights Reserved. | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or | ||
5 | * modify it under the terms of the GNU General Public License | ||
6 | * as published by the Free Software Foundation, version 2. | ||
7 | * | ||
8 | * This program is distributed in the hope that it will be useful, but | ||
9 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or | ||
11 | * NON INFRINGEMENT. See the GNU General Public License for | ||
12 | * more details. | ||
13 | */ | ||
14 | |||
15 | #ifndef _UAPI_ASM_TILE_PTRACE_H | ||
16 | #define _UAPI_ASM_TILE_PTRACE_H | ||
17 | |||
18 | #include <arch/chip.h> | ||
19 | #include <arch/abi.h> | ||
20 | |||
21 | /* These must match struct pt_regs, below. */ | ||
22 | #if CHIP_WORD_SIZE() == 32 | ||
23 | #define PTREGS_OFFSET_REG(n) ((n)*4) | ||
24 | #else | ||
25 | #define PTREGS_OFFSET_REG(n) ((n)*8) | ||
26 | #endif | ||
27 | #define PTREGS_OFFSET_BASE 0 | ||
28 | #define PTREGS_OFFSET_TP PTREGS_OFFSET_REG(53) | ||
29 | #define PTREGS_OFFSET_SP PTREGS_OFFSET_REG(54) | ||
30 | #define PTREGS_OFFSET_LR PTREGS_OFFSET_REG(55) | ||
31 | #define PTREGS_NR_GPRS 56 | ||
32 | #define PTREGS_OFFSET_PC PTREGS_OFFSET_REG(56) | ||
33 | #define PTREGS_OFFSET_EX1 PTREGS_OFFSET_REG(57) | ||
34 | #define PTREGS_OFFSET_FAULTNUM PTREGS_OFFSET_REG(58) | ||
35 | #define PTREGS_OFFSET_ORIG_R0 PTREGS_OFFSET_REG(59) | ||
36 | #define PTREGS_OFFSET_FLAGS PTREGS_OFFSET_REG(60) | ||
37 | #if CHIP_HAS_CMPEXCH() | ||
38 | #define PTREGS_OFFSET_CMPEXCH PTREGS_OFFSET_REG(61) | ||
39 | #endif | ||
40 | #define PTREGS_SIZE PTREGS_OFFSET_REG(64) | ||
41 | |||
42 | |||
43 | #ifndef __ASSEMBLY__ | ||
44 | |||
45 | #ifndef __KERNEL__ | ||
46 | /* Provide appropriate length type to userspace regardless of -m32/-m64. */ | ||
47 | typedef uint_reg_t pt_reg_t; | ||
48 | #endif | ||
49 | |||
50 | /* | ||
51 | * This struct defines the way the registers are stored on the stack during a | ||
52 | * system call or exception. "struct sigcontext" has the same shape. | ||
53 | */ | ||
54 | struct pt_regs { | ||
55 | /* Saved main processor registers; 56..63 are special. */ | ||
56 | /* tp, sp, and lr must immediately follow regs[] for aliasing. */ | ||
57 | pt_reg_t regs[53]; | ||
58 | pt_reg_t tp; /* aliases regs[TREG_TP] */ | ||
59 | pt_reg_t sp; /* aliases regs[TREG_SP] */ | ||
60 | pt_reg_t lr; /* aliases regs[TREG_LR] */ | ||
61 | |||
62 | /* Saved special registers. */ | ||
63 | pt_reg_t pc; /* stored in EX_CONTEXT_K_0 */ | ||
64 | pt_reg_t ex1; /* stored in EX_CONTEXT_K_1 (PL and ICS bit) */ | ||
65 | pt_reg_t faultnum; /* fault number (INT_SWINT_1 for syscall) */ | ||
66 | pt_reg_t orig_r0; /* r0 at syscall entry, else zero */ | ||
67 | pt_reg_t flags; /* flags (see below) */ | ||
68 | #if !CHIP_HAS_CMPEXCH() | ||
69 | pt_reg_t pad[3]; | ||
70 | #else | ||
71 | pt_reg_t cmpexch; /* value of CMPEXCH_VALUE SPR at interrupt */ | ||
72 | pt_reg_t pad[2]; | ||
73 | #endif | ||
74 | }; | ||
75 | |||
76 | #endif /* __ASSEMBLY__ */ | ||
77 | |||
78 | #define PTRACE_GETREGS 12 | ||
79 | #define PTRACE_SETREGS 13 | ||
80 | #define PTRACE_GETFPREGS 14 | ||
81 | #define PTRACE_SETFPREGS 15 | ||
82 | |||
83 | /* Support TILE-specific ptrace options, with events starting at 16. */ | ||
84 | #define PTRACE_O_TRACEMIGRATE 0x00010000 | ||
85 | #define PTRACE_EVENT_MIGRATE 16 | ||
86 | |||
87 | |||
88 | #endif /* _UAPI_ASM_TILE_PTRACE_H */ | ||
diff --git a/arch/tile/include/uapi/asm/setup.h b/arch/tile/include/uapi/asm/setup.h new file mode 100644 index 000000000000..e6f7da265ac3 --- /dev/null +++ b/arch/tile/include/uapi/asm/setup.h | |||
@@ -0,0 +1,21 @@ | |||
1 | /* | ||
2 | * Copyright 2010 Tilera Corporation. All Rights Reserved. | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or | ||
5 | * modify it under the terms of the GNU General Public License | ||
6 | * as published by the Free Software Foundation, version 2. | ||
7 | * | ||
8 | * This program is distributed in the hope that it will be useful, but | ||
9 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or | ||
11 | * NON INFRINGEMENT. See the GNU General Public License for | ||
12 | * more details. | ||
13 | */ | ||
14 | |||
15 | #ifndef _UAPI_ASM_TILE_SETUP_H | ||
16 | #define _UAPI_ASM_TILE_SETUP_H | ||
17 | |||
18 | #define COMMAND_LINE_SIZE 2048 | ||
19 | |||
20 | |||
21 | #endif /* _UAPI_ASM_TILE_SETUP_H */ | ||
diff --git a/arch/tile/include/uapi/asm/sigcontext.h b/arch/tile/include/uapi/asm/sigcontext.h new file mode 100644 index 000000000000..6348e59d3724 --- /dev/null +++ b/arch/tile/include/uapi/asm/sigcontext.h | |||
@@ -0,0 +1,37 @@ | |||
1 | /* | ||
2 | * Copyright 2010 Tilera Corporation. All Rights Reserved. | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or | ||
5 | * modify it under the terms of the GNU General Public License | ||
6 | * as published by the Free Software Foundation, version 2. | ||
7 | * | ||
8 | * This program is distributed in the hope that it will be useful, but | ||
9 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or | ||
11 | * NON INFRINGEMENT. See the GNU General Public License for | ||
12 | * more details. | ||
13 | */ | ||
14 | |||
15 | #ifndef _ASM_TILE_SIGCONTEXT_H | ||
16 | #define _ASM_TILE_SIGCONTEXT_H | ||
17 | |||
18 | /* Don't pollute the namespace since <signal.h> includes this file. */ | ||
19 | #define __need_int_reg_t | ||
20 | #include <arch/abi.h> | ||
21 | |||
22 | /* | ||
23 | * struct sigcontext has the same shape as struct pt_regs, | ||
24 | * but is simplified since we know the fault is from userspace. | ||
25 | */ | ||
26 | struct sigcontext { | ||
27 | __uint_reg_t gregs[53]; /* General-purpose registers. */ | ||
28 | __uint_reg_t tp; /* Aliases gregs[TREG_TP]. */ | ||
29 | __uint_reg_t sp; /* Aliases gregs[TREG_SP]. */ | ||
30 | __uint_reg_t lr; /* Aliases gregs[TREG_LR]. */ | ||
31 | __uint_reg_t pc; /* Program counter. */ | ||
32 | __uint_reg_t ics; /* In Interrupt Critical Section? */ | ||
33 | __uint_reg_t faultnum; /* Fault number. */ | ||
34 | __uint_reg_t pad[5]; | ||
35 | }; | ||
36 | |||
37 | #endif /* _ASM_TILE_SIGCONTEXT_H */ | ||
diff --git a/arch/tile/include/uapi/asm/siginfo.h b/arch/tile/include/uapi/asm/siginfo.h new file mode 100644 index 000000000000..56d661bb010b --- /dev/null +++ b/arch/tile/include/uapi/asm/siginfo.h | |||
@@ -0,0 +1,34 @@ | |||
1 | /* | ||
2 | * Copyright 2010 Tilera Corporation. All Rights Reserved. | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or | ||
5 | * modify it under the terms of the GNU General Public License | ||
6 | * as published by the Free Software Foundation, version 2. | ||
7 | * | ||
8 | * This program is distributed in the hope that it will be useful, but | ||
9 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or | ||
11 | * NON INFRINGEMENT. See the GNU General Public License for | ||
12 | * more details. | ||
13 | */ | ||
14 | |||
15 | #ifndef _ASM_TILE_SIGINFO_H | ||
16 | #define _ASM_TILE_SIGINFO_H | ||
17 | |||
18 | #define __ARCH_SI_TRAPNO | ||
19 | |||
20 | #ifdef __LP64__ | ||
21 | # define __ARCH_SI_PREAMBLE_SIZE (4 * sizeof(int)) | ||
22 | #endif | ||
23 | |||
24 | #include <asm-generic/siginfo.h> | ||
25 | |||
26 | /* | ||
27 | * Additional Tile-specific SIGILL si_codes | ||
28 | */ | ||
29 | #define ILL_DBLFLT (__SI_FAULT|9) /* double fault */ | ||
30 | #define ILL_HARDWALL (__SI_FAULT|10) /* user networks hardwall violation */ | ||
31 | #undef NSIGILL | ||
32 | #define NSIGILL 10 | ||
33 | |||
34 | #endif /* _ASM_TILE_SIGINFO_H */ | ||
diff --git a/arch/tile/include/uapi/asm/signal.h b/arch/tile/include/uapi/asm/signal.h new file mode 100644 index 000000000000..ef0d32d84a4c --- /dev/null +++ b/arch/tile/include/uapi/asm/signal.h | |||
@@ -0,0 +1,27 @@ | |||
1 | /* | ||
2 | * Copyright 2010 Tilera Corporation. All Rights Reserved. | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or | ||
5 | * modify it under the terms of the GNU General Public License | ||
6 | * as published by the Free Software Foundation, version 2. | ||
7 | * | ||
8 | * This program is distributed in the hope that it will be useful, but | ||
9 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or | ||
11 | * NON INFRINGEMENT. See the GNU General Public License for | ||
12 | * more details. | ||
13 | */ | ||
14 | |||
15 | #ifndef _UAPI_ASM_TILE_SIGNAL_H | ||
16 | #define _UAPI_ASM_TILE_SIGNAL_H | ||
17 | |||
18 | /* Do not notify a ptracer when this signal is handled. */ | ||
19 | #define SA_NOPTRACE 0x02000000u | ||
20 | |||
21 | /* Used in earlier Tilera releases, so keeping for binary compatibility. */ | ||
22 | #define SA_RESTORER 0x04000000u | ||
23 | |||
24 | #include <asm-generic/signal.h> | ||
25 | |||
26 | |||
27 | #endif /* _UAPI_ASM_TILE_SIGNAL_H */ | ||
diff --git a/arch/tile/include/uapi/asm/stat.h b/arch/tile/include/uapi/asm/stat.h new file mode 100644 index 000000000000..c0db34d56be3 --- /dev/null +++ b/arch/tile/include/uapi/asm/stat.h | |||
@@ -0,0 +1,4 @@ | |||
1 | #if defined(__KERNEL__) && defined(CONFIG_COMPAT) | ||
2 | #define __ARCH_WANT_STAT64 /* Used for compat_sys_stat64() etc. */ | ||
3 | #endif | ||
4 | #include <asm-generic/stat.h> | ||
diff --git a/arch/tile/include/uapi/asm/swab.h b/arch/tile/include/uapi/asm/swab.h new file mode 100644 index 000000000000..7c37b38f6c8d --- /dev/null +++ b/arch/tile/include/uapi/asm/swab.h | |||
@@ -0,0 +1,23 @@ | |||
1 | /* | ||
2 | * Copyright 2010 Tilera Corporation. All Rights Reserved. | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or | ||
5 | * modify it under the terms of the GNU General Public License | ||
6 | * as published by the Free Software Foundation, version 2. | ||
7 | * | ||
8 | * This program is distributed in the hope that it will be useful, but | ||
9 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or | ||
11 | * NON INFRINGEMENT. See the GNU General Public License for | ||
12 | * more details. | ||
13 | */ | ||
14 | |||
15 | #ifndef _ASM_TILE_SWAB_H | ||
16 | #define _ASM_TILE_SWAB_H | ||
17 | |||
18 | /* Tile gcc is always >= 4.3.0, so we use __builtin_bswap. */ | ||
19 | #define __arch_swab32(x) __builtin_bswap32(x) | ||
20 | #define __arch_swab64(x) __builtin_bswap64(x) | ||
21 | #define __arch_swab16(x) (__builtin_bswap32(x) >> 16) | ||
22 | |||
23 | #endif /* _ASM_TILE_SWAB_H */ | ||
diff --git a/arch/tile/include/uapi/asm/unistd.h b/arch/tile/include/uapi/asm/unistd.h new file mode 100644 index 000000000000..cd7b6dd9d471 --- /dev/null +++ b/arch/tile/include/uapi/asm/unistd.h | |||
@@ -0,0 +1,34 @@ | |||
1 | /* | ||
2 | * Copyright 2010 Tilera Corporation. All Rights Reserved. | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or | ||
5 | * modify it under the terms of the GNU General Public License | ||
6 | * as published by the Free Software Foundation, version 2. | ||
7 | * | ||
8 | * This program is distributed in the hope that it will be useful, but | ||
9 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or | ||
11 | * NON INFRINGEMENT. See the GNU General Public License for | ||
12 | * more details. | ||
13 | */ | ||
14 | |||
15 | #if !defined(__LP64__) || defined(__SYSCALL_COMPAT) | ||
16 | /* Use the flavor of this syscall that matches the 32-bit API better. */ | ||
17 | #define __ARCH_WANT_SYNC_FILE_RANGE2 | ||
18 | #endif | ||
19 | |||
20 | /* Use the standard ABI for syscalls. */ | ||
21 | #include <asm-generic/unistd.h> | ||
22 | |||
23 | /* Additional Tilera-specific syscalls. */ | ||
24 | #define __NR_cacheflush (__NR_arch_specific_syscall + 1) | ||
25 | __SYSCALL(__NR_cacheflush, sys_cacheflush) | ||
26 | |||
27 | #ifndef __tilegx__ | ||
28 | /* "Fast" syscalls provide atomic support for 32-bit chips. */ | ||
29 | #define __NR_FAST_cmpxchg -1 | ||
30 | #define __NR_FAST_atomic_update -2 | ||
31 | #define __NR_FAST_cmpxchg64 -3 | ||
32 | #define __NR_cmpxchg_badaddr (__NR_arch_specific_syscall + 0) | ||
33 | __SYSCALL(__NR_cmpxchg_badaddr, sys_cmpxchg_badaddr) | ||
34 | #endif | ||