Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 169769
b: refs/heads/master
c: 827f3b4
h: refs/heads/master
i:
  169767: 9336e49
v: v3
  • Loading branch information
Hitoshi Mitake authored and Ingo Molnar committed Nov 19, 2009
1 parent 9b8acbc commit b4bb4bd
Show file tree
Hide file tree
Showing 80 changed files with 1,105 additions and 4,433 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 184d3da8ef0ca552dffa0fdd35c046e058a2cf9a
refs/heads/master: 827f3b4974c5db2968d4979fe6a0ae00ab37bdd8
7 changes: 0 additions & 7 deletions trunk/arch/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,4 @@ config HAVE_DMA_API_DEBUG
config HAVE_DEFAULT_NO_SPIN_MUTEXES
bool

config HAVE_HW_BREAKPOINT
bool
depends on HAVE_PERF_EVENTS
select ANON_INODES
select PERF_EVENTS


source "kernel/gcov/Kconfig"
1 change: 0 additions & 1 deletion trunk/arch/x86/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ config X86
select HAVE_KERNEL_GZIP
select HAVE_KERNEL_BZIP2
select HAVE_KERNEL_LZMA
select HAVE_HW_BREAKPOINT
select HAVE_ARCH_KMEMCHECK

config OUTPUT_FORMAT
Expand Down
1 change: 0 additions & 1 deletion trunk/arch/x86/include/asm/Kbuild
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ header-y += ptrace-abi.h
header-y += sigcontext32.h
header-y += ucontext.h
header-y += processor-flags.h
header-y += hw_breakpoint.h

unifdef-y += e820.h
unifdef-y += ist.h
Expand Down
10 changes: 8 additions & 2 deletions trunk/arch/x86/include/asm/a.out-core.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

#include <linux/user.h>
#include <linux/elfcore.h>
#include <asm/debugreg.h>

/*
* fill in the user structure for an a.out core dump
Expand All @@ -33,7 +32,14 @@ static inline void aout_dump_thread(struct pt_regs *regs, struct user *dump)
>> PAGE_SHIFT;
dump->u_dsize -= dump->u_tsize;
dump->u_ssize = 0;
aout_dump_debugregs(dump);
dump->u_debugreg[0] = current->thread.debugreg0;
dump->u_debugreg[1] = current->thread.debugreg1;
dump->u_debugreg[2] = current->thread.debugreg2;
dump->u_debugreg[3] = current->thread.debugreg3;
dump->u_debugreg[4] = 0;
dump->u_debugreg[5] = 0;
dump->u_debugreg[6] = current->thread.debugreg6;
dump->u_debugreg[7] = current->thread.debugreg7;

if (dump->start_stack < TASK_SIZE)
dump->u_ssize = ((unsigned long)(TASK_SIZE - dump->start_stack))
Expand Down
33 changes: 0 additions & 33 deletions trunk/arch/x86/include/asm/debugreg.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#define DR_TRAP1 (0x2) /* db1 */
#define DR_TRAP2 (0x4) /* db2 */
#define DR_TRAP3 (0x8) /* db3 */
#define DR_TRAP_BITS (DR_TRAP0|DR_TRAP1|DR_TRAP2|DR_TRAP3)

#define DR_STEP (0x4000) /* single-step */
#define DR_SWITCH (0x8000) /* task switch */
Expand Down Expand Up @@ -50,8 +49,6 @@

#define DR_LOCAL_ENABLE_SHIFT 0 /* Extra shift to the local enable bit */
#define DR_GLOBAL_ENABLE_SHIFT 1 /* Extra shift to the global enable bit */
#define DR_LOCAL_ENABLE (0x1) /* Local enable for reg 0 */
#define DR_GLOBAL_ENABLE (0x2) /* Global enable for reg 0 */
#define DR_ENABLE_SIZE 2 /* 2 enable bits per register */

#define DR_LOCAL_ENABLE_MASK (0x55) /* Set local bits for all 4 regs */
Expand All @@ -70,34 +67,4 @@
#define DR_LOCAL_SLOWDOWN (0x100) /* Local slow the pipeline */
#define DR_GLOBAL_SLOWDOWN (0x200) /* Global slow the pipeline */

/*
* HW breakpoint additions
*/
#ifdef __KERNEL__

DECLARE_PER_CPU(unsigned long, dr7);

static inline void hw_breakpoint_disable(void)
{
/* Zero the control register for HW Breakpoint */
set_debugreg(0UL, 7);

/* Zero-out the individual HW breakpoint address registers */
set_debugreg(0UL, 0);
set_debugreg(0UL, 1);
set_debugreg(0UL, 2);
set_debugreg(0UL, 3);
}

static inline int hw_breakpoint_active(void)
{
return __get_cpu_var(dr7) & DR_GLOBAL_ENABLE_MASK;
}

extern void aout_dump_debugregs(struct user *dump);

extern void hw_breakpoint_restore(void);

#endif /* __KERNEL__ */

#endif /* _ASM_X86_DEBUGREG_H */
73 changes: 0 additions & 73 deletions trunk/arch/x86/include/asm/hw_breakpoint.h

This file was deleted.

14 changes: 7 additions & 7 deletions trunk/arch/x86/include/asm/processor.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ struct mm_struct;
#include <linux/math64.h>
#include <linux/init.h>

#define HBP_NUM 4
/*
* Default implementation of macro that returns current
* instruction pointer ("program counter").
Expand Down Expand Up @@ -423,8 +422,6 @@ extern unsigned int xstate_size;
extern void free_thread_xstate(struct task_struct *);
extern struct kmem_cache *task_xstate_cachep;

struct perf_event;

struct thread_struct {
/* Cached TLS descriptors: */
struct desc_struct tls_array[GDT_ENTRY_TLS_ENTRIES];
Expand All @@ -446,10 +443,13 @@ struct thread_struct {
unsigned long fs;
#endif
unsigned long gs;
/* Save middle states of ptrace breakpoints */
struct perf_event *ptrace_bps[HBP_NUM];
/* Debug status used for traps, single steps, etc... */
unsigned long debugreg6;
/* Hardware debugging registers: */
unsigned long debugreg0;
unsigned long debugreg1;
unsigned long debugreg2;
unsigned long debugreg3;
unsigned long debugreg6;
unsigned long debugreg7;
/* Fault info: */
unsigned long cr2;
unsigned long trap_no;
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/x86/kernel/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ obj-$(CONFIG_X86_64) += sys_x86_64.o x8664_ksyms_64.o
obj-$(CONFIG_X86_64) += syscall_64.o vsyscall_64.o
obj-y += bootflag.o e820.o
obj-y += pci-dma.o quirks.o i8237.o topology.o kdebugfs.o
obj-y += alternative.o i8253.o pci-nommu.o hw_breakpoint.o
obj-y += alternative.o i8253.o pci-nommu.o
obj-y += tsc.o io_delay.o rtc.o

obj-$(CONFIG_X86_TRAMPOLINE) += trampoline.o
Expand Down
1 change: 0 additions & 1 deletion trunk/arch/x86/kernel/cpu/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
# Don't trace early stages of a secondary CPU boot
ifdef CONFIG_FUNCTION_TRACER
CFLAGS_REMOVE_common.o = -pg
CFLAGS_REMOVE_perf_event.o = -pg
endif

# Make sure load_percpu_segment has no stackprotector
Expand Down
Loading

0 comments on commit b4bb4bd

Please sign in to comment.