aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-mips/processor.h
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2007-07-25 11:19:33 -0400
committerRalf Baechle <ralf@linux-mips.org>2007-07-31 16:35:21 -0400
commit293c5bd13f124c325f74f89ad26edf5612ce7235 (patch)
tree6de7ce919a10c58e29093776c02e61d7127ed12b /include/asm-mips/processor.h
parent01754bbc692929e446e600f69b41013e554399a6 (diff)
[MIPS] Fixup secure computing stuff.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'include/asm-mips/processor.h')
-rw-r--r--include/asm-mips/processor.h20
1 files changed, 3 insertions, 17 deletions
diff --git a/include/asm-mips/processor.h b/include/asm-mips/processor.h
index 1d8b9a8ae324..83bc94534084 100644
--- a/include/asm-mips/processor.h
+++ b/include/asm-mips/processor.h
@@ -62,8 +62,9 @@ extern unsigned int vced_count, vcei_count;
62 * This decides where the kernel will search for a free chunk of vm 62 * This decides where the kernel will search for a free chunk of vm
63 * space during mmap's. 63 * space during mmap's.
64 */ 64 */
65#define TASK_UNMAPPED_BASE ((current->thread.mflags & MF_32BIT_ADDR) ? \ 65#define TASK_UNMAPPED_BASE \
66 PAGE_ALIGN(TASK_SIZE32 / 3) : PAGE_ALIGN(TASK_SIZE / 3)) 66 (test_thread_flag(TIF_32BIT_ADDR) ? \
67 PAGE_ALIGN(TASK_SIZE32 / 3) : PAGE_ALIGN(TASK_SIZE / 3))
67#endif 68#endif
68 69
69#define NUM_FPU_REGS 32 70#define NUM_FPU_REGS 32
@@ -132,22 +133,11 @@ struct thread_struct {
132 unsigned long cp0_baduaddr; /* Last kernel fault accessing USEG */ 133 unsigned long cp0_baduaddr; /* Last kernel fault accessing USEG */
133 unsigned long error_code; 134 unsigned long error_code;
134 unsigned long trap_no; 135 unsigned long trap_no;
135#define MF_FIXADE 1 /* Fix address errors in software */
136#define MF_LOGADE 2 /* Log address errors to syslog */
137#define MF_32BIT_REGS 4 /* also implies 16/32 fprs */
138#define MF_32BIT_ADDR 8 /* 32-bit address space (o32/n32) */
139#define MF_FPUBOUND 0x10 /* thread bound to FPU-full CPU set */
140 unsigned long mflags;
141 unsigned long irix_trampoline; /* Wheee... */ 136 unsigned long irix_trampoline; /* Wheee... */
142 unsigned long irix_oldctx; 137 unsigned long irix_oldctx;
143 struct mips_abi *abi; 138 struct mips_abi *abi;
144}; 139};
145 140
146#define MF_ABI_MASK (MF_32BIT_REGS | MF_32BIT_ADDR)
147#define MF_O32 (MF_32BIT_REGS | MF_32BIT_ADDR)
148#define MF_N32 MF_32BIT_ADDR
149#define MF_N64 0
150
151#ifdef CONFIG_MIPS_MT_FPAFF 141#ifdef CONFIG_MIPS_MT_FPAFF
152#define FPAFF_INIT \ 142#define FPAFF_INIT \
153 .emulated_fp = 0, \ 143 .emulated_fp = 0, \
@@ -200,10 +190,6 @@ struct thread_struct {
200 .cp0_baduaddr = 0, \ 190 .cp0_baduaddr = 0, \
201 .error_code = 0, \ 191 .error_code = 0, \
202 .trap_no = 0, \ 192 .trap_no = 0, \
203 /* \
204 * For now the default is to fix address errors \
205 */ \
206 .mflags = MF_FIXADE, \
207 .irix_trampoline = 0, \ 193 .irix_trampoline = 0, \
208 .irix_oldctx = 0, \ 194 .irix_oldctx = 0, \
209} 195}