hc
2023-12-11 6778948f9de86c3cfaf36725a7c87dcff9ba247f
kernel/arch/mips/include/asm/processor.h
....@@ -25,20 +25,11 @@
2525 #include <asm/vdso/processor.h>
2626
2727 /*
28
- * Return current * instruction pointer ("program counter").
29
- */
30
-#define current_text_addr() ({ __label__ _l; _l: &&_l;})
31
-
32
-/*
3328 * System setup and hardware flags..
3429 */
3530
3631 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);
4233
4334 #ifdef CONFIG_32BIT
4435 #ifdef CONFIG_KVM_GUEST
....@@ -261,6 +252,7 @@
261252 /* Saved cp0 stuff. */
262253 unsigned long cp0_status;
263254
255
+#ifdef CONFIG_MIPS_FP_SUPPORT
264256 /* Saved fpu/fpu emulator stuff. */
265257 struct mips_fpu_struct fpu FPU_ALIGN;
266258 /* Assigned branch delay slot 'emulation' frame */
....@@ -269,6 +261,7 @@
269261 unsigned long bd_emu_branch_pc;
270262 /* PC to continue from following a branch delay slot 'emulation' */
271263 unsigned long bd_emu_cont_pc;
264
+#endif
272265 #ifdef CONFIG_MIPS_MT_FPAFF
273266 /* Emulated instruction count */
274267 unsigned long emulated_fp;
....@@ -305,6 +298,21 @@
305298 #define FPAFF_INIT
306299 #endif /* CONFIG_MIPS_MT_FPAFF */
307300
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
+
308316 #define INIT_THREAD { \
309317 /* \
310318 * Saved main processor registers \
....@@ -327,19 +335,11 @@
327335 /* \
328336 * Saved FPU/FPU emulator stuff \
329337 */ \
330
- .fpu = { \
331
- .fpr = {{{0,},},}, \
332
- .fcr31 = 0, \
333
- .msacsr = 0, \
334
- }, \
338
+ FPU_INIT \
335339 /* \
336340 * FPU affinity state (null if not FPAFF) \
337341 */ \
338342 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, \
343343 /* \
344344 * Saved DSP stuff \
345345 */ \