summaryrefslogtreecommitdiffstats
path: root/arch/x86
diff options
context:
space:
mode:
authorJason Wessel <jason.wessel@windriver.com>2010-03-30 21:05:07 +0200
committerFrederic Weisbecker <fweisbec@gmail.com>2010-04-01 08:26:32 +0200
commitab310b5edb8b601bcb02491ed6f7676da4fd1757 (patch)
tree1e3bcadd39e4d3aadfb73d42ecca7be191dbdba0 /arch/x86
parentperf: Use hot regs with software sched switch/migrate events (diff)
downloadlinux-ab310b5edb8b601bcb02491ed6f7676da4fd1757.tar.xz
linux-ab310b5edb8b601bcb02491ed6f7676da4fd1757.zip
x86,kgdb: Always initialize the hw breakpoint attribute
It is required to call hw_breakpoint_init() on an attr before using it in any other calls. This fixes the problem where kgdb will sometimes fail to initialize on x86_64. Signed-off-by: Jason Wessel <jason.wessel@windriver.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: 2.6.33 <stable@kernel.org> LKML-Reference: <1269975907-27602-1-git-send-email-jason.wessel@windriver.com> Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/kernel/kgdb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kernel/kgdb.c b/arch/x86/kernel/kgdb.c
index bfba6019d762..b2258ca91003 100644
--- a/arch/x86/kernel/kgdb.c
+++ b/arch/x86/kernel/kgdb.c
@@ -618,8 +618,8 @@ int kgdb_arch_init(void)
* portion of kgdb because this operation requires mutexs to
* complete.
*/
+ hw_breakpoint_init(&attr);
attr.bp_addr = (unsigned long)kgdb_arch_init;
- attr.type = PERF_TYPE_BREAKPOINT;
attr.bp_len = HW_BREAKPOINT_LEN_1;
attr.bp_type = HW_BREAKPOINT_W;
attr.disabled = 1;