MIPS: Scheduler support for HARDWARE_WATCHPOINTS.
authorDavid Daney <ddaney@avtrex.com>
Tue, 23 Sep 2008 07:09:51 +0000 (00:09 -0700)
committerRalf Baechle <ralf@linux-mips.org>
Sat, 11 Oct 2008 15:18:57 +0000 (16:18 +0100)
Here we hook up the scheduler.  Whenever we switch to a new process,
we check to see if the watch registers should be installed, and do it
if needed.

Signed-off-by: David Daney <ddaney@avtrex.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/include/asm/system.h

index a944eda4faf5ef5f1f3e6ff53932056cf4ce7e4f..cd30f83235bb292360233737dd87a4ac343b0830 100644 (file)
@@ -20,6 +20,7 @@
 #include <asm/cmpxchg.h>
 #include <asm/cpu-features.h>
 #include <asm/dsp.h>
+#include <asm/watch.h>
 #include <asm/war.h>
 
 
@@ -76,6 +77,7 @@ do {                                                                  \
                __restore_dsp(current);                                 \
        if (cpu_has_userlocal)                                          \
                write_c0_userlocal(current_thread_info()->tp_value);    \
+       __restore_watch();                                              \
 } while (0)
 
 static inline unsigned long __xchg_u32(volatile int * m, unsigned int val)