diff options
author | Ingo Molnar <mingo@elte.hu> | 2010-08-02 02:29:56 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2010-08-02 02:31:54 -0400 |
commit | 3772b734720e1a3f2dc1d95cfdfaa5332f4ccf01 (patch) | |
tree | a1a8cc85948c086aa12a1d8014151a7ca7c04ea8 /arch/x86/kernel/kgdb.c | |
parent | 9fc3af467d0749989518a23f7289a6f44e5cb214 (diff) | |
parent | 9fe6206f400646a2322096b56c59891d530e8d51 (diff) |
Merge commit 'v2.6.35' into perf/core
Conflicts:
tools/perf/Makefile
tools/perf/util/hist.c
Merge reason: Resolve the conflicts and update to latest upstream.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/kgdb.c')
-rw-r--r-- | arch/x86/kernel/kgdb.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/arch/x86/kernel/kgdb.c b/arch/x86/kernel/kgdb.c index 4f4af75b9482..01ab17ae2ae7 100644 --- a/arch/x86/kernel/kgdb.c +++ b/arch/x86/kernel/kgdb.c | |||
@@ -572,7 +572,6 @@ static int __kgdb_notify(struct die_args *args, unsigned long cmd) | |||
572 | return NOTIFY_STOP; | 572 | return NOTIFY_STOP; |
573 | } | 573 | } |
574 | 574 | ||
575 | #ifdef CONFIG_KGDB_LOW_LEVEL_TRAP | ||
576 | int kgdb_ll_trap(int cmd, const char *str, | 575 | int kgdb_ll_trap(int cmd, const char *str, |
577 | struct pt_regs *regs, long err, int trap, int sig) | 576 | struct pt_regs *regs, long err, int trap, int sig) |
578 | { | 577 | { |
@@ -590,7 +589,6 @@ int kgdb_ll_trap(int cmd, const char *str, | |||
590 | 589 | ||
591 | return __kgdb_notify(&args, cmd); | 590 | return __kgdb_notify(&args, cmd); |
592 | } | 591 | } |
593 | #endif /* CONFIG_KGDB_LOW_LEVEL_TRAP */ | ||
594 | 592 | ||
595 | static int | 593 | static int |
596 | kgdb_notify(struct notifier_block *self, unsigned long cmd, void *ptr) | 594 | kgdb_notify(struct notifier_block *self, unsigned long cmd, void *ptr) |
@@ -625,6 +623,12 @@ int kgdb_arch_init(void) | |||
625 | return register_die_notifier(&kgdb_notifier); | 623 | return register_die_notifier(&kgdb_notifier); |
626 | } | 624 | } |
627 | 625 | ||
626 | static void kgdb_hw_overflow_handler(struct perf_event *event, int nmi, | ||
627 | struct perf_sample_data *data, struct pt_regs *regs) | ||
628 | { | ||
629 | kgdb_ll_trap(DIE_DEBUG, "debug", regs, 0, 0, SIGTRAP); | ||
630 | } | ||
631 | |||
628 | void kgdb_arch_late(void) | 632 | void kgdb_arch_late(void) |
629 | { | 633 | { |
630 | int i, cpu; | 634 | int i, cpu; |
@@ -655,6 +659,7 @@ void kgdb_arch_late(void) | |||
655 | for_each_online_cpu(cpu) { | 659 | for_each_online_cpu(cpu) { |
656 | pevent = per_cpu_ptr(breakinfo[i].pev, cpu); | 660 | pevent = per_cpu_ptr(breakinfo[i].pev, cpu); |
657 | pevent[0]->hw.sample_period = 1; | 661 | pevent[0]->hw.sample_period = 1; |
662 | pevent[0]->overflow_handler = kgdb_hw_overflow_handler; | ||
658 | if (pevent[0]->destroy != NULL) { | 663 | if (pevent[0]->destroy != NULL) { |
659 | pevent[0]->destroy = NULL; | 664 | pevent[0]->destroy = NULL; |
660 | release_bp_slot(*pevent); | 665 | release_bp_slot(*pevent); |