| .. | .. |
|---|
| 25 | 25 | #include <asm/vdso/processor.h> |
|---|
| 26 | 26 | |
|---|
| 27 | 27 | /* |
|---|
| 28 | | - * Return current * instruction pointer ("program counter"). |
|---|
| 29 | | - */ |
|---|
| 30 | | -#define current_text_addr() ({ __label__ _l; _l: &&_l;}) |
|---|
| 31 | | - |
|---|
| 32 | | -/* |
|---|
| 33 | 28 | * System setup and hardware flags.. |
|---|
| 34 | 29 | */ |
|---|
| 35 | 30 | |
|---|
| 36 | 31 | extern unsigned int vced_count, vcei_count; |
|---|
| 37 | | - |
|---|
| 38 | | -/* |
|---|
| 39 | | - * MIPS does have an arch_pick_mmap_layout() |
|---|
| 40 | | - */ |
|---|
| 41 | | -#define HAVE_ARCH_PICK_MMAP_LAYOUT 1 |
|---|
| 32 | +extern int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src); |
|---|
| 42 | 33 | |
|---|
| 43 | 34 | #ifdef CONFIG_32BIT |
|---|
| 44 | 35 | #ifdef CONFIG_KVM_GUEST |
|---|
| .. | .. |
|---|
| 261 | 252 | /* Saved cp0 stuff. */ |
|---|
| 262 | 253 | unsigned long cp0_status; |
|---|
| 263 | 254 | |
|---|
| 255 | +#ifdef CONFIG_MIPS_FP_SUPPORT |
|---|
| 264 | 256 | /* Saved fpu/fpu emulator stuff. */ |
|---|
| 265 | 257 | struct mips_fpu_struct fpu FPU_ALIGN; |
|---|
| 266 | 258 | /* Assigned branch delay slot 'emulation' frame */ |
|---|
| .. | .. |
|---|
| 269 | 261 | unsigned long bd_emu_branch_pc; |
|---|
| 270 | 262 | /* PC to continue from following a branch delay slot 'emulation' */ |
|---|
| 271 | 263 | unsigned long bd_emu_cont_pc; |
|---|
| 264 | +#endif |
|---|
| 272 | 265 | #ifdef CONFIG_MIPS_MT_FPAFF |
|---|
| 273 | 266 | /* Emulated instruction count */ |
|---|
| 274 | 267 | unsigned long emulated_fp; |
|---|
| .. | .. |
|---|
| 305 | 298 | #define FPAFF_INIT |
|---|
| 306 | 299 | #endif /* CONFIG_MIPS_MT_FPAFF */ |
|---|
| 307 | 300 | |
|---|
| 301 | +#ifdef CONFIG_MIPS_FP_SUPPORT |
|---|
| 302 | +# define FPU_INIT \ |
|---|
| 303 | + .fpu = { \ |
|---|
| 304 | + .fpr = {{{0,},},}, \ |
|---|
| 305 | + .fcr31 = 0, \ |
|---|
| 306 | + .msacsr = 0, \ |
|---|
| 307 | + }, \ |
|---|
| 308 | + /* Delay slot emulation */ \ |
|---|
| 309 | + .bd_emu_frame = ATOMIC_INIT(BD_EMUFRAME_NONE), \ |
|---|
| 310 | + .bd_emu_branch_pc = 0, \ |
|---|
| 311 | + .bd_emu_cont_pc = 0, |
|---|
| 312 | +#else |
|---|
| 313 | +# define FPU_INIT |
|---|
| 314 | +#endif |
|---|
| 315 | + |
|---|
| 308 | 316 | #define INIT_THREAD { \ |
|---|
| 309 | 317 | /* \ |
|---|
| 310 | 318 | * Saved main processor registers \ |
|---|
| .. | .. |
|---|
| 327 | 335 | /* \ |
|---|
| 328 | 336 | * Saved FPU/FPU emulator stuff \ |
|---|
| 329 | 337 | */ \ |
|---|
| 330 | | - .fpu = { \ |
|---|
| 331 | | - .fpr = {{{0,},},}, \ |
|---|
| 332 | | - .fcr31 = 0, \ |
|---|
| 333 | | - .msacsr = 0, \ |
|---|
| 334 | | - }, \ |
|---|
| 338 | + FPU_INIT \ |
|---|
| 335 | 339 | /* \ |
|---|
| 336 | 340 | * FPU affinity state (null if not FPAFF) \ |
|---|
| 337 | 341 | */ \ |
|---|
| 338 | 342 | FPAFF_INIT \ |
|---|
| 339 | | - /* Delay slot emulation */ \ |
|---|
| 340 | | - .bd_emu_frame = ATOMIC_INIT(BD_EMUFRAME_NONE), \ |
|---|
| 341 | | - .bd_emu_branch_pc = 0, \ |
|---|
| 342 | | - .bd_emu_cont_pc = 0, \ |
|---|
| 343 | 343 | /* \ |
|---|
| 344 | 344 | * Saved DSP stuff \ |
|---|
| 345 | 345 | */ \ |
|---|