public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86,kgdb: Always initialize the hw breakpoint attribute
@ 2010-03-30 18:39 Jason Wessel
  2010-03-30 18:49 ` Frederic Weisbecker
  0 siblings, 1 reply; 2+ messages in thread
From: Jason Wessel @ 2010-03-30 18:39 UTC (permalink / raw)
  To: Frederic Weisbecker
  Cc: linux-kernel, Jason Wessel, Frederic Weisbecker, Ingo Molnar,
	stable

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.

CC: Frederic Weisbecker <fweisbec@gmail.com>
CC: Ingo Molnar <mingo@elte.hu>
CC: stable@kernel.org
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
---
 arch/x86/kernel/kgdb.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/x86/kernel/kgdb.c b/arch/x86/kernel/kgdb.c
index bfba601..d9adcde 100644
--- a/arch/x86/kernel/kgdb.c
+++ b/arch/x86/kernel/kgdb.c
@@ -618,6 +618,7 @@ 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;
-- 
1.6.3.1.9.g95405b


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] x86,kgdb: Always initialize the hw breakpoint attribute
  2010-03-30 18:39 [PATCH] x86,kgdb: Always initialize the hw breakpoint attribute Jason Wessel
@ 2010-03-30 18:49 ` Frederic Weisbecker
  0 siblings, 0 replies; 2+ messages in thread
From: Frederic Weisbecker @ 2010-03-30 18:49 UTC (permalink / raw)
  To: Jason Wessel; +Cc: linux-kernel, Ingo Molnar, stable

On Tue, Mar 30, 2010 at 01:39:30PM -0500, Jason Wessel wrote:
> 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.
> 
> CC: Frederic Weisbecker <fweisbec@gmail.com>
> CC: Ingo Molnar <mingo@elte.hu>
> CC: stable@kernel.org
> Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
> ---
>  arch/x86/kernel/kgdb.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/x86/kernel/kgdb.c b/arch/x86/kernel/kgdb.c
> index bfba601..d9adcde 100644
> --- a/arch/x86/kernel/kgdb.c
> +++ b/arch/x86/kernel/kgdb.c
> @@ -618,6 +618,7 @@ 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;


Minor neat: In this case you don't need to set the type.

Acked-by: Frederic Weisbecker <fweisbec@gmail.com>



>  	attr.bp_len = HW_BREAKPOINT_LEN_1;
> -- 
> 1.6.3.1.9.g95405b
> 


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-03-30 18:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-30 18:39 [PATCH] x86,kgdb: Always initialize the hw breakpoint attribute Jason Wessel
2010-03-30 18:49 ` Frederic Weisbecker

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox