aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/include/asm/processor.h
diff options
context:
space:
mode:
authorDavid Daney <ddaney@avtrex.com>2008-09-23 03:05:54 -0400
committerRalf Baechle <ralf@linux-mips.org>2008-10-11 11:18:56 -0400
commit6aa3524c182c01b8b8b7c21c4da20c742a9b4d86 (patch)
tree245fc4e9f26ad9e7a95e83087bfcc79528d1352e /arch/mips/include/asm/processor.h
parent8192c9ea9ac44213d1266ecb64615519443979b3 (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/processor.h')
-rw-r--r--arch/mips/include/asm/processor.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/arch/mips/include/asm/processor.h b/arch/mips/include/asm/processor.h
index a1e4453469f9..18ee58e39445 100644
--- a/arch/mips/include/asm/processor.h
+++ b/arch/mips/include/asm/processor.h
@@ -105,6 +105,19 @@ struct mips_dsp_state {
105 {0,} \ 105 {0,} \
106} 106}
107 107
108struct mips3264_watch_reg_state {
109 /* The width of watchlo is 32 in a 32 bit kernel and 64 in a
110 64 bit kernel. We use unsigned long as it has the same
111 property. */
112 unsigned long watchlo[NUM_WATCH_REGS];
113 /* Only the mask and IRW bits from watchhi. */
114 u16 watchhi[NUM_WATCH_REGS];
115};
116
117union mips_watch_reg_state {
118 struct mips3264_watch_reg_state mips3264;
119};
120
108typedef struct { 121typedef struct {
109 unsigned long seg; 122 unsigned long seg;
110} mm_segment_t; 123} mm_segment_t;
@@ -137,6 +150,9 @@ struct thread_struct {
137 /* Saved state of the DSP ASE, if available. */ 150 /* Saved state of the DSP ASE, if available. */
138 struct mips_dsp_state dsp; 151 struct mips_dsp_state dsp;
139 152
153 /* Saved watch register state, if available. */
154 union mips_watch_reg_state watch;
155
140 /* Other stuff associated with the thread. */ 156 /* Other stuff associated with the thread. */
141 unsigned long cp0_badvaddr; /* Last user fault */ 157 unsigned long cp0_badvaddr; /* Last user fault */
142 unsigned long cp0_baduaddr; /* Last kernel fault accessing USEG */ 158 unsigned long cp0_baduaddr; /* Last kernel fault accessing USEG */
@@ -193,6 +209,10 @@ struct thread_struct {
193 .dspcontrol = 0, \ 209 .dspcontrol = 0, \
194 }, \ 210 }, \
195 /* \ 211 /* \
212 * saved watch register stuff \
213 */ \
214 .watch = {{{0,},},}, \
215 /* \
196 * Other stuff associated with the process \ 216 * Other stuff associated with the process \
197 */ \ 217 */ \
198 .cp0_badvaddr = 0, \ 218 .cp0_badvaddr = 0, \