aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/processor.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/include/asm/processor.h')
-rw-r--r--arch/x86/include/asm/processor.h18
1 files changed, 10 insertions, 8 deletions
diff --git a/arch/x86/include/asm/processor.h b/arch/x86/include/asm/processor.h
index e75daac64962..91d323f47364 100644
--- a/arch/x86/include/asm/processor.h
+++ b/arch/x86/include/asm/processor.h
@@ -30,6 +30,7 @@ struct mm_struct;
30#include <linux/math64.h> 30#include <linux/math64.h>
31#include <linux/init.h> 31#include <linux/init.h>
32 32
33#define HBP_NUM 4
33/* 34/*
34 * Default implementation of macro that returns current 35 * Default implementation of macro that returns current
35 * instruction pointer ("program counter"). 36 * instruction pointer ("program counter").
@@ -182,7 +183,7 @@ static inline void native_cpuid(unsigned int *eax, unsigned int *ebx,
182 unsigned int *ecx, unsigned int *edx) 183 unsigned int *ecx, unsigned int *edx)
183{ 184{
184 /* ecx is often an input as well as an output. */ 185 /* ecx is often an input as well as an output. */
185 asm("cpuid" 186 asm volatile("cpuid"
186 : "=a" (*eax), 187 : "=a" (*eax),
187 "=b" (*ebx), 188 "=b" (*ebx),
188 "=c" (*ecx), 189 "=c" (*ecx),
@@ -424,6 +425,8 @@ extern unsigned int xstate_size;
424extern void free_thread_xstate(struct task_struct *); 425extern void free_thread_xstate(struct task_struct *);
425extern struct kmem_cache *task_xstate_cachep; 426extern struct kmem_cache *task_xstate_cachep;
426 427
428struct perf_event;
429
427struct thread_struct { 430struct thread_struct {
428 /* Cached TLS descriptors: */ 431 /* Cached TLS descriptors: */
429 struct desc_struct tls_array[GDT_ENTRY_TLS_ENTRIES]; 432 struct desc_struct tls_array[GDT_ENTRY_TLS_ENTRIES];
@@ -445,13 +448,12 @@ struct thread_struct {
445 unsigned long fs; 448 unsigned long fs;
446#endif 449#endif
447 unsigned long gs; 450 unsigned long gs;
448 /* Hardware debugging registers: */ 451 /* Save middle states of ptrace breakpoints */
449 unsigned long debugreg0; 452 struct perf_event *ptrace_bps[HBP_NUM];
450 unsigned long debugreg1; 453 /* Debug status used for traps, single steps, etc... */
451 unsigned long debugreg2; 454 unsigned long debugreg6;
452 unsigned long debugreg3; 455 /* Keep track of the exact dr7 value set by the user */
453 unsigned long debugreg6; 456 unsigned long ptrace_dr7;
454 unsigned long debugreg7;
455 /* Fault info: */ 457 /* Fault info: */
456 unsigned long cr2; 458 unsigned long cr2;
457 unsigned long trap_no; 459 unsigned long trap_no;