aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/processor.h
diff options
context:
space:
mode:
authorK.Prasad <prasad@linux.vnet.ibm.com>2009-06-01 14:13:10 -0400
committerFrederic Weisbecker <fweisbec@gmail.com>2009-06-02 16:46:57 -0400
commitb332828c39326b1dca617f387dd15d12e81cd5f0 (patch)
treeb8cff4bd7a5b42a723e26d69cce4f3030bf68e62 /arch/x86/include/asm/processor.h
parent43bd1236234cacbc18d1476a9b57e7a306efddf5 (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/include/asm/processor.h')
-rw-r--r--arch/x86/include/asm/processor.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/x86/include/asm/processor.h b/arch/x86/include/asm/processor.h
index 0b2fab0051e..448b34a8e39 100644
--- a/arch/x86/include/asm/processor.h
+++ b/arch/x86/include/asm/processor.h
@@ -29,6 +29,7 @@ struct mm_struct;
29#include <linux/threads.h> 29#include <linux/threads.h>
30#include <linux/init.h> 30#include <linux/init.h>
31 31
32#define HBP_NUM 4
32/* 33/*
33 * Default implementation of macro that returns current 34 * Default implementation of macro that returns current
34 * instruction pointer ("program counter"). 35 * instruction pointer ("program counter").
@@ -431,12 +432,11 @@ struct thread_struct {
431 unsigned long fs; 432 unsigned long fs;
432 unsigned long gs; 433 unsigned long gs;
433 /* Hardware debugging registers: */ 434 /* Hardware debugging registers: */
434 unsigned long debugreg0; 435 unsigned long debugreg[HBP_NUM];
435 unsigned long debugreg1;
436 unsigned long debugreg2;
437 unsigned long debugreg3;
438 unsigned long debugreg6; 436 unsigned long debugreg6;
439 unsigned long debugreg7; 437 unsigned long debugreg7;
438 /* Hardware breakpoint info */
439 struct hw_breakpoint *hbp[HBP_NUM];
440 /* Fault info: */ 440 /* Fault info: */
441 unsigned long cr2; 441 unsigned long cr2;
442 unsigned long trap_no; 442 unsigned long trap_no;