diff options
author | K.Prasad <prasad@linux.vnet.ibm.com> | 2009-06-01 14:13:10 -0400 |
---|---|---|
committer | Frederic Weisbecker <fweisbec@gmail.com> | 2009-06-02 16:46:57 -0400 |
commit | b332828c39326b1dca617f387dd15d12e81cd5f0 (patch) | |
tree | b8cff4bd7a5b42a723e26d69cce4f3030bf68e62 /arch/x86/power | |
parent | 43bd1236234cacbc18d1476a9b57e7a306efddf5 (diff) |
hw-breakpoints: prepare the code for Hardware Breakpoint interfaces
The generic hardware breakpoint interface provides an abstraction of
hardware breakpoints in front of specific arch implementations for both kernel
and user side breakpoints.
This includes execution breakpoints and read/write breakpoints, also known as
"watchpoints".
This patch introduces header files containing constants, structure definitions
and declaration of functions used by the hardware breakpoint core and x86
specific code.
It also introduces an array based storage for the debug-register values in
'struct thread_struct', while modifying all users of debugreg<n> member in the
structure.
[ Impact: add headers for new hardware breakpoint interface ]
Original-patch-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: K.Prasad <prasad@linux.vnet.ibm.com>
Reviewed-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Diffstat (limited to 'arch/x86/power')
-rw-r--r-- | arch/x86/power/cpu_32.c | 8 | ||||
-rw-r--r-- | arch/x86/power/cpu_64.c | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/arch/x86/power/cpu_32.c b/arch/x86/power/cpu_32.c index ce702c5b3a2c..519913948003 100644 --- a/arch/x86/power/cpu_32.c +++ b/arch/x86/power/cpu_32.c | |||
@@ -84,10 +84,10 @@ static void fix_processor_context(void) | |||
84 | * Now maybe reload the debug registers | 84 | * Now maybe reload the debug registers |
85 | */ | 85 | */ |
86 | if (current->thread.debugreg7) { | 86 | if (current->thread.debugreg7) { |
87 | set_debugreg(current->thread.debugreg0, 0); | 87 | set_debugreg(current->thread.debugreg[0], 0); |
88 | set_debugreg(current->thread.debugreg1, 1); | 88 | set_debugreg(current->thread.debugreg[1], 1); |
89 | set_debugreg(current->thread.debugreg2, 2); | 89 | set_debugreg(current->thread.debugreg[2], 2); |
90 | set_debugreg(current->thread.debugreg3, 3); | 90 | set_debugreg(current->thread.debugreg[3], 3); |
91 | /* no 4 and 5 */ | 91 | /* no 4 and 5 */ |
92 | set_debugreg(current->thread.debugreg6, 6); | 92 | set_debugreg(current->thread.debugreg6, 6); |
93 | set_debugreg(current->thread.debugreg7, 7); | 93 | set_debugreg(current->thread.debugreg7, 7); |
diff --git a/arch/x86/power/cpu_64.c b/arch/x86/power/cpu_64.c index 5343540f2607..1e3bdcc959ff 100644 --- a/arch/x86/power/cpu_64.c +++ b/arch/x86/power/cpu_64.c | |||
@@ -163,10 +163,10 @@ static void fix_processor_context(void) | |||
163 | * Now maybe reload the debug registers | 163 | * Now maybe reload the debug registers |
164 | */ | 164 | */ |
165 | if (current->thread.debugreg7){ | 165 | if (current->thread.debugreg7){ |
166 | loaddebug(¤t->thread, 0); | 166 | set_debugreg(current->thread.debugreg[0], 0); |
167 | loaddebug(¤t->thread, 1); | 167 | set_debugreg(current->thread.debugreg[1], 1); |
168 | loaddebug(¤t->thread, 2); | 168 | set_debugreg(current->thread.debugreg[2], 2); |
169 | loaddebug(¤t->thread, 3); | 169 | set_debugreg(current->thread.debugreg[3], 3); |
170 | /* no 4 and 5 */ | 170 | /* no 4 and 5 */ |
171 | loaddebug(¤t->thread, 6); | 171 | loaddebug(¤t->thread, 6); |
172 | loaddebug(¤t->thread, 7); | 172 | loaddebug(¤t->thread, 7); |