lkml.org 
[lkml]   [2018]   [Mar]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH 09/11] sched/wait,mips: Fix and replace wait_on_atomic_t usage
Convert the wait_on_atomic_t() usage to the new wait_var_event() API.

And while there, add the missing wakeup...

Cc: James Hogan <jhogan@kernel.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
---
arch/mips/kernel/process.c | 2 ++
arch/mips/kernel/traps.c | 4 ++--
2 files changed, 4 insertions(+), 2 deletions(-)

--- a/arch/mips/kernel/process.c
+++ b/arch/mips/kernel/process.c
@@ -781,6 +781,8 @@ int mips_set_process_fp_mode(struct task
atomic_set(&task->mm->context.fp_mode_switching, 0);
preempt_enable();

+ wake_up_var(&task->mm->context.fp_mode_switching);
+
return 0;
}

--- a/arch/mips/kernel/traps.c
+++ b/arch/mips/kernel/traps.c
@@ -1248,8 +1248,8 @@ static int enable_restore_fp_context(int
* If an FP mode switch is currently underway, wait for it to
* complete before proceeding.
*/
- wait_on_atomic_t(&current->mm->context.fp_mode_switching,
- atomic_t_wait, TASK_KILLABLE);
+ wait_var_event(&current->mm->context.fp_mode_switching,
+ !atomic_read(&current->mm->context.fp_mode_switching));

if (!used_math()) {
/* First time FP context user. */

\
 
 \ /
  Last update: 2018-03-15 13:36    [W:0.199 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site