aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Burton <paul.burton@mips.com>2018-12-18 01:05:40 -0500
committerPaul Burton <paul.burton@mips.com>2018-12-18 01:05:40 -0500
commit41e486f4f66d3e646fedd60469bc60e73662de50 (patch)
tree9bc08f9a8d3fecc0ad3832577ef9e1fa18ce0259
parent99bf73ebf9c4193dbcc5331b29d316a89ada43d1 (diff)
MIPS: Remove struct mm_context_t fp_mode_switching field
The fp_mode_switching field in struct mm_context_t was left unused by commit 8c8d953c2800 ("MIPS: Schedule on CPUs we need to lose FPU for a mode switch") in v4.19, with nothing modifying its value & nothing waiting on it having any particular value after that commit. Remove the unused field & the one remaining reference to it. Signed-off-by: Paul Burton <paul.burton@mips.com>
-rw-r--r--arch/mips/include/asm/mmu.h1
-rw-r--r--arch/mips/kernel/process.c9
2 files changed, 3 insertions, 7 deletions
diff --git a/arch/mips/include/asm/mmu.h b/arch/mips/include/asm/mmu.h
index 24d6b42345fb..88a108ce62c1 100644
--- a/arch/mips/include/asm/mmu.h
+++ b/arch/mips/include/asm/mmu.h
@@ -9,7 +9,6 @@
9typedef struct { 9typedef struct {
10 u64 asid[NR_CPUS]; 10 u64 asid[NR_CPUS];
11 void *vdso; 11 void *vdso;
12 atomic_t fp_mode_switching;
13 12
14 /* lock to be held whilst modifying fp_bd_emupage_allocmap */ 13 /* lock to be held whilst modifying fp_bd_emupage_allocmap */
15 spinlock_t bd_emupage_lock; 14 spinlock_t bd_emupage_lock;
diff --git a/arch/mips/kernel/process.c b/arch/mips/kernel/process.c
index d4f7fd4550e1..6829a064aac8 100644
--- a/arch/mips/kernel/process.c
+++ b/arch/mips/kernel/process.c
@@ -737,10 +737,9 @@ static long prepare_for_fp_mode_switch(void *unused)
737 /* 737 /*
738 * This is icky, but we use this to simply ensure that all CPUs have 738 * This is icky, but we use this to simply ensure that all CPUs have
739 * context switched, regardless of whether they were previously running 739 * context switched, regardless of whether they were previously running
740 * kernel or user code. This ensures that no CPU currently has its FPU 740 * kernel or user code. This ensures that no CPU that a mode-switching
741 * enabled, or is about to attempt to enable it through any path other 741 * program may execute on keeps its FPU enabled (& in the old mode)
742 * than enable_restore_fp_context() which will wait appropriately for 742 * throughout the mode switch.
743 * fp_mode_switching to be zero.
744 */ 743 */
745 return 0; 744 return 0;
746} 745}
@@ -829,8 +828,6 @@ int mips_set_process_fp_mode(struct task_struct *task, unsigned int value)
829 work_on_cpu(cpu, prepare_for_fp_mode_switch, NULL); 828 work_on_cpu(cpu, prepare_for_fp_mode_switch, NULL);
830 put_online_cpus(); 829 put_online_cpus();
831 830
832 wake_up_var(&task->mm->context.fp_mode_switching);
833
834 return 0; 831 return 0;
835} 832}
836 833