diff options
author | Paul Burton <paul.burton@mips.com> | 2018-11-07 23:14:10 +0000 |
---|---|---|
committer | Paul Burton <paul.burton@mips.com> | 2018-11-09 10:23:19 -0800 |
commit | 2725f3778fddb70526318824de63476aff816ab8 (patch) | |
tree | 55a466f045c9b3a3ffd1ccc1d4597e7848e980a2 /arch/mips/include/asm/processor.h | |
parent | 42b10815d55958ec519ae7d97fdfcc6e38b4d46b (diff) | |
download | kernel_replicant_linux-2725f3778fddb70526318824de63476aff816ab8.tar.gz kernel_replicant_linux-2725f3778fddb70526318824de63476aff816ab8.tar.bz2 kernel_replicant_linux-2725f3778fddb70526318824de63476aff816ab8.zip |
MIPS: Remove struct task_struct fpu state when CONFIG_MIPS_FP_SUPPORT=n
When CONFIG_MIPS_FP_SUPPORT=n we don't support floating point & so don't
need to preserve floating point context for tasks. Remove that context
from struct task_struct.
Signed-off-by: Paul Burton <paul.burton@mips.com>
Patchwork: https://patchwork.linux-mips.org/patch/21013/
Cc: linux-mips@linux-mips.org
Diffstat (limited to 'arch/mips/include/asm/processor.h')
-rw-r--r-- | arch/mips/include/asm/processor.h | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/arch/mips/include/asm/processor.h b/arch/mips/include/asm/processor.h index ce3ed4d17813..aca909bd7841 100644 --- a/arch/mips/include/asm/processor.h +++ b/arch/mips/include/asm/processor.h @@ -255,8 +255,10 @@ struct thread_struct { /* Saved cp0 stuff. */ unsigned long cp0_status; +#ifdef CONFIG_MIPS_FP_SUPPORT /* Saved fpu/fpu emulator stuff. */ struct mips_fpu_struct fpu FPU_ALIGN; +#endif /* Assigned branch delay slot 'emulation' frame */ atomic_t bd_emu_frame; /* PC of the branch from a branch delay slot 'emulation' */ @@ -299,6 +301,17 @@ struct thread_struct { #define FPAFF_INIT #endif /* CONFIG_MIPS_MT_FPAFF */ +#ifdef CONFIG_MIPS_FP_SUPPORT +# define FPU_INIT \ + .fpu = { \ + .fpr = {{{0,},},}, \ + .fcr31 = 0, \ + .msacsr = 0, \ + }, +#else +# define FPU_INIT +#endif + #define INIT_THREAD { \ /* \ * Saved main processor registers \ @@ -321,11 +334,7 @@ struct thread_struct { /* \ * Saved FPU/FPU emulator stuff \ */ \ - .fpu = { \ - .fpr = {{{0,},},}, \ - .fcr31 = 0, \ - .msacsr = 0, \ - }, \ + FPU_INIT \ /* \ * FPU affinity state (null if not FPAFF) \ */ \ |