diff options
author | David Daney <ddaney@avtrex.com> | 2008-09-23 03:05:54 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2008-10-11 11:18:56 -0400 |
commit | 6aa3524c182c01b8b8b7c21c4da20c742a9b4d86 (patch) | |
tree | 245fc4e9f26ad9e7a95e83087bfcc79528d1352e /arch/mips/include/asm/watch.h | |
parent | 8192c9ea9ac44213d1266ecb64615519443979b3 (diff) |
MIPS: Add HARDWARE_WATCHPOINTS definitions and support code.
This is the main support code for the patch. Here we just add the
code, the following patches hook it up.
Signed-off-by: David Daney <ddaney@avtrex.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
create mode 100644 arch/mips/include/asm/watch.h
create mode 100644 arch/mips/kernel/watch.c
Diffstat (limited to 'arch/mips/include/asm/watch.h')
-rw-r--r-- | arch/mips/include/asm/watch.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/arch/mips/include/asm/watch.h b/arch/mips/include/asm/watch.h new file mode 100644 index 000000000000..20126ec79359 --- /dev/null +++ b/arch/mips/include/asm/watch.h | |||
@@ -0,0 +1,32 @@ | |||
1 | /* | ||
2 | * This file is subject to the terms and conditions of the GNU General Public | ||
3 | * License. See the file "COPYING" in the main directory of this archive | ||
4 | * for more details. | ||
5 | * | ||
6 | * Copyright (C) 2008 David Daney | ||
7 | */ | ||
8 | #ifndef _ASM_WATCH_H | ||
9 | #define _ASM_WATCH_H | ||
10 | |||
11 | #include <linux/bitops.h> | ||
12 | |||
13 | #include <asm/mipsregs.h> | ||
14 | |||
15 | void mips_install_watch_registers(void); | ||
16 | void mips_read_watch_registers(void); | ||
17 | void mips_clear_watch_registers(void); | ||
18 | void mips_probe_watch_registers(struct cpuinfo_mips *c); | ||
19 | |||
20 | #ifdef CONFIG_HARDWARE_WATCHPOINTS | ||
21 | #define __restore_watch() do { \ | ||
22 | if (unlikely(test_bit(TIF_LOAD_WATCH, \ | ||
23 | ¤t_thread_info()->flags))) { \ | ||
24 | mips_install_watch_registers(); \ | ||
25 | } \ | ||
26 | } while (0) | ||
27 | |||
28 | #else | ||
29 | #define __restore_watch() do {} while (0) | ||
30 | #endif | ||
31 | |||
32 | #endif /* _ASM_WATCH_H */ | ||