aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/kernel
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-04-02 19:50:39 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2018-04-02 19:50:39 -0400
commitce6eba3dba366b607c0a363c7cdbd4ee8fcc6434 (patch)
tree7e8bb291ce843457c52659dfa4a5d14444c91c35 /arch/mips/kernel
parenta5532439ebab93e47784effb96aafa7d7ba4b760 (diff)
parentb3fc5c9bb373661224906bf434c09ca0de032e82 (diff)
Merge branch 'sched-wait-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull wait_var_event updates from Ingo Molnar: "This introduces the new wait_var_event() API, which is a more flexible waiting primitive than wait_on_atomic_t(). All wait_on_atomic_t() users are migrated over to the new API and wait_on_atomic_t() is removed. The migration fixes one bug and should result in no functional changes for the other usecases" * 'sched-wait-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched/wait: Improve __var_waitqueue() code generation sched/wait: Remove the wait_on_atomic_t() API sched/wait, arch/mips: Fix and convert wait_on_atomic_t() usage to the new wait_var_event() API sched/wait, fs/ocfs2: Convert wait_on_atomic_t() usage to the new wait_var_event() API sched/wait, fs/nfs: Convert wait_on_atomic_t() usage to the new wait_var_event() API sched/wait, fs/fscache: Convert wait_on_atomic_t() usage to the new wait_var_event() API sched/wait, fs/btrfs: Convert wait_on_atomic_t() usage to the new wait_var_event() API sched/wait, fs/afs: Convert wait_on_atomic_t() usage to the new wait_var_event() API sched/wait, drivers/media: Convert wait_on_atomic_t() usage to the new wait_var_event() API sched/wait, drivers/drm: Convert wait_on_atomic_t() usage to the new wait_var_event() API sched/wait: Introduce wait_var_event()
Diffstat (limited to 'arch/mips/kernel')
-rw-r--r--arch/mips/kernel/process.c2
-rw-r--r--arch/mips/kernel/traps.c4
2 files changed, 4 insertions, 2 deletions
diff --git a/arch/mips/kernel/process.c b/arch/mips/kernel/process.c
index 57028d49c202..b9e9bf628849 100644
--- a/arch/mips/kernel/process.c
+++ b/arch/mips/kernel/process.c
@@ -781,6 +781,8 @@ int mips_set_process_fp_mode(struct task_struct *task, unsigned int value)
781 atomic_set(&task->mm->context.fp_mode_switching, 0); 781 atomic_set(&task->mm->context.fp_mode_switching, 0);
782 preempt_enable(); 782 preempt_enable();
783 783
784 wake_up_var(&task->mm->context.fp_mode_switching);
785
784 return 0; 786 return 0;
785} 787}
786 788
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c
index 0ae4a731cc12..967e9e4e795e 100644
--- a/arch/mips/kernel/traps.c
+++ b/arch/mips/kernel/traps.c
@@ -1248,8 +1248,8 @@ static int enable_restore_fp_context(int msa)
1248 * If an FP mode switch is currently underway, wait for it to 1248 * If an FP mode switch is currently underway, wait for it to
1249 * complete before proceeding. 1249 * complete before proceeding.
1250 */ 1250 */
1251 wait_on_atomic_t(&current->mm->context.fp_mode_switching, 1251 wait_var_event(&current->mm->context.fp_mode_switching,
1252 atomic_t_wait, TASK_KILLABLE); 1252 !atomic_read(&current->mm->context.fp_mode_switching));
1253 1253
1254 if (!used_math()) { 1254 if (!used_math()) {
1255 /* First time FP context user. */ 1255 /* First time FP context user. */