diff options
author | James Hogan <james.hogan@imgtec.com> | 2016-03-01 22:19:36 (GMT) |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2016-05-09 10:00:02 (GMT) |
commit | a7e89326b415b5d81c4b1016fd4a40db861eb58d (patch) | |
tree | 09b9d1962f4a5b24659f765c9abc5a181b3c37ea /arch/mips/kernel/pm.c | |
parent | 81a76d7119f63c359750e4adeff922a31ad1135f (diff) | |
download | linux-a7e89326b415b5d81c4b1016fd4a40db861eb58d.tar.xz |
MIPS: Fix watchpoint restoration
Commit f51246efee2b ("MIPS: Get rid of finish_arch_switch().") moved the
__restore_watch() call from finish_arch_switch() (i.e. after resume()
returns) to before the resume() call in switch_to(). This results in
watchpoints only being restored when a task is descheduled, preventing
the watchpoints from being effective most of the time, except due to
chance before the watchpoints are lazily removed.
Fix the call sequence from switch_to() through to
mips_install_watch_registers() to pass the task_struct pointer of the
next task, instead of using current. This allows the watchpoints for the
next (non-current) task to be restored without reintroducing
finish_arch_switch().
Fixes: f51246efee2b ("MIPS: Get rid of finish_arch_switch().")
Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: Paul Burton <paul.burton@imgtec.com>
Cc: linux-mips@linux-mips.org
Cc: <stable@vger.kernel.org> # 4.3.x-
Patchwork: https://patchwork.linux-mips.org/patch/12726/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/kernel/pm.c')
-rw-r--r-- | arch/mips/kernel/pm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/mips/kernel/pm.c b/arch/mips/kernel/pm.c index fefdf39..dc81489 100644 --- a/arch/mips/kernel/pm.c +++ b/arch/mips/kernel/pm.c @@ -56,7 +56,7 @@ static void mips_cpu_restore(void) write_c0_userlocal(current_thread_info()->tp_value); /* Restore watch registers */ - __restore_watch(); + __restore_watch(current); } /** |