Re: [Patch 1/1] PPC64-HWBKPT: Implement hw-breakpoints for PPC64

2010-04-13 Thread K.Prasad
On Wed, Apr 07, 2010 at 06:03:31PM +1000, Benjamin Herrenschmidt wrote: Ok so too many problems with your last patch, I didn't have time to fix them all, so it's not going into -next this week. Please, test with a variety of defconfigs (iseries, cell, g5 for example), and especially with

Re: [Patch 1/1] PPC64-HWBKPT: Implement hw-breakpoints for PPC64

2010-04-07 Thread Benjamin Herrenschmidt
Ok so too many problems with your last patch, I didn't have time to fix them all, so it's not going into -next this week. Please, test with a variety of defconfigs (iseries, cell, g5 for example), and especially with CONFIG_PERF_EVENTS not set. There are issues in the generic header for that

Re: [Patch 1/1] PPC64-HWBKPT: Implement hw-breakpoints for PPC64

2010-03-23 Thread K.Prasad
On Tue, Mar 23, 2010 at 04:33:01PM +1100, Paul Mackerras wrote: On Mon, Mar 08, 2010 at 11:44:48PM +0530, K.Prasad wrote: @@ -479,6 +483,7 @@ struct task_struct *__switch_to(struct t old_thread-accum_tb += (current_tb - start_tb); new_thread-start_tb = current_tb;

Re: [Patch 1/1] PPC64-HWBKPT: Implement hw-breakpoints for PPC64

2010-03-22 Thread Paul Mackerras
On Mon, Mar 08, 2010 at 11:44:48PM +0530, K.Prasad wrote: @@ -479,6 +483,7 @@ struct task_struct *__switch_to(struct t old_thread-accum_tb += (current_tb - start_tb); new_thread-start_tb = current_tb; } + flush_ptrace_hw_breakpoint(current); #endif

Re: [Patch 1/1] PPC64-HWBKPT: Implement hw-breakpoints for PPC64

2010-03-15 Thread K.Prasad
On Fri, Mar 12, 2010 at 05:19:36PM +1100, Benjamin Herrenschmidt wrote: Index: linux-2.6.ppc64_test/arch/powerpc/include/asm/hw_breakpoint.h === --- /dev/null +++ linux-2.6.ppc64_test/arch/powerpc/include/asm/hw_breakpoint.h

Re: [Patch 1/1] PPC64-HWBKPT: Implement hw-breakpoints for PPC64

2010-03-11 Thread Benjamin Herrenschmidt
Index: linux-2.6.ppc64_test/arch/powerpc/include/asm/hw_breakpoint.h === --- /dev/null +++ linux-2.6.ppc64_test/arch/powerpc/include/asm/hw_breakpoint.h @@ -0,0 +1,54 @@ +#ifndef _PPC64_HW_BREAKPOINT_H +#define

[Patch 1/1] PPC64-HWBKPT: Implement hw-breakpoints for PPC64

2010-03-08 Thread K.Prasad
Implement perf-events based hw-breakpoint interfaces for PPC64 processors. These interfaces help arbitrate requests from various users and schedules them as appropriate. Signed-off-by: K.Prasad pra...@linux.vnet.ibm.com --- arch/powerpc/Kconfig |1

Re: [Patch 1/1] PPC64-HWBKPT: Implement hw-breakpoints for PPC64

2010-03-08 Thread David Gibson
On Fri, Feb 26, 2010 at 02:58:12AM +0100, Frederic Weisbecker wrote: On Mon, Feb 22, 2010 at 06:47:46PM +0530, K.Prasad wrote: [snip] Oh, why does ptrace use a one-shot behaviour in ppc? Breakpoints only trigger once? Yes, ptrace breakpoints on PPC64 are designed to trigger once

Re: [Patch 1/1] PPC64-HWBKPT: Implement hw-breakpoints for PPC64

2010-03-08 Thread K.Prasad
On Fri, Feb 26, 2010 at 02:58:12AM +0100, Frederic Weisbecker wrote: On Mon, Feb 22, 2010 at 06:47:46PM +0530, K.Prasad wrote: The 'name' field here is actually a legacy inherited from x86 code. It is part of x86's arch-specific hw-breakpoint structure since: - inspired by the kprobe

Re: [Patch 1/1] PPC64-HWBKPT: Implement hw-breakpoints for PPC64

2010-02-26 Thread Frederic Weisbecker
On Tue, Feb 23, 2010 at 04:27:15PM +0530, K.Prasad wrote: On Mon, Feb 22, 2010 at 06:47:46PM +0530, K.Prasad wrote: On Sun, Feb 21, 2010 at 02:01:37AM +0100, Frederic Weisbecker wrote: On Mon, Feb 15, 2010 at 11:29:14AM +0530, K.Prasad wrote: [snipped] Also, do you think addr/len/type is

Re: [Patch 1/1] PPC64-HWBKPT: Implement hw-breakpoints for PPC64

2010-02-25 Thread Frederic Weisbecker
On Mon, Feb 22, 2010 at 06:47:46PM +0530, K.Prasad wrote: The 'name' field here is actually a legacy inherited from x86 code. It is part of x86's arch-specific hw-breakpoint structure since: - inspired by the kprobe implementation which accepts symbol name as input. - kallsyms_lookup_name()

Re: [Patch 1/1] PPC64-HWBKPT: Implement hw-breakpoints for PPC64

2010-02-23 Thread K.Prasad
On Mon, Feb 22, 2010 at 06:47:46PM +0530, K.Prasad wrote: On Sun, Feb 21, 2010 at 02:01:37AM +0100, Frederic Weisbecker wrote: On Mon, Feb 15, 2010 at 11:29:14AM +0530, K.Prasad wrote: [snipped] Also, do you think addr/len/type is enough to abstract out any ppc breakpoints? This looks

Re: [Patch 1/1] PPC64-HWBKPT: Implement hw-breakpoints for PPC64

2010-02-22 Thread K.Prasad
On Sun, Feb 21, 2010 at 02:01:37AM +0100, Frederic Weisbecker wrote: On Mon, Feb 15, 2010 at 11:29:14AM +0530, K.Prasad wrote: +struct arch_hw_breakpoint { + u8 len; /* length of the target symbol */ + int type; + char*name; /* Contains name of

Re: [Patch 1/1] PPC64-HWBKPT: Implement hw-breakpoints for PPC64

2010-02-20 Thread Frederic Weisbecker
On Mon, Feb 15, 2010 at 11:29:14AM +0530, K.Prasad wrote: +struct arch_hw_breakpoint { + u8 len; /* length of the target symbol */ + int type; + char*name; /* Contains name of the symbol to set bkpt */ + unsigned long address; +}; I

[Patch 1/1] PPC64-HWBKPT: Implement hw-breakpoints for PPC64

2010-02-14 Thread K.Prasad
Implement perf-events based hw-breakpoint interfaces for PPC64 processors. These interfaces help arbitrate requests from various users and schedules them as appropriate. Signed-off-by: K.Prasad pra...@linux.vnet.ibm.com --- arch/powerpc/Kconfig |1

Re: [Patch 1/1] PPC64-HWBKPT: Implement hw-breakpoints for PPC64

2010-01-21 Thread K.Prasad
On Tue, Jan 19, 2010 at 02:03:35AM -0800, Roland McGrath wrote: It is also not clear to me if disabling pre-emption for the user-space (albeit for a very tiny time-window) is incorrect and if their side-effects are known. If otherwise, I think we should choose to operate in pre-empt safe

[Patch 1/1] PPC64-HWBKPT: Implement hw-breakpoints for PPC64

2010-01-19 Thread K.Prasad
Implement perf-events based hw-breakpoint interfaces for PPC64 processors. These interfaces help arbitrate requests from various users and schedules them as appropriate. Signed-off-by: K.Prasad pra...@linux.vnet.ibm.com --- arch/powerpc/Kconfig |1

Re: [Patch 1/1] PPC64-HWBKPT: Implement hw-breakpoints for PPC64

2009-12-17 Thread K.Prasad
On Mon, Dec 14, 2009 at 11:26:26AM -0800, Roland McGrath wrote: snipped I understand the reason for using stepping. (I have advised in the past that I thought this magical implicit step logic was too hairy to roll in under the covers and that a low-level facility expressing the different

Re: [Patch 1/1] PPC64-HWBKPT: Implement hw-breakpoints for PPC64

2009-12-14 Thread K.Prasad
On Sun, Dec 13, 2009 at 04:56:48PM -0800, Roland McGrath wrote: I can't see anything you've done to keep this use of MSR_SE in the user-mode register state from interfering with user_enable_single_step(). It looks to me like you'd swallow the normal step indications. Yes, it does unset

Re: [Patch 1/1] PPC64-HWBKPT: Implement hw-breakpoints for PPC64

2009-12-14 Thread Roland McGrath
Yes, it does unset MSR_SE bit in single_step_dabr_instruction() irrespective of whether it was previously enabled through user_enable_single_step(). This could be mitigated with the use of a separate flag which can be used to conditionally unset MSR_SE, however given further concerns about

Re: [Patch 1/1] PPC64-HWBKPT: Implement hw-breakpoints for PPC64

2009-12-13 Thread Roland McGrath
I can't see anything you've done to keep this use of MSR_SE in the user-mode register state from interfering with user_enable_single_step(). It looks to me like you'd swallow the normal step indications. Likewise I'm not very clear on the interaction with kprobes, kgdb, or whatnot for kernel-mode

[Patch 1/1] PPC64-HWBKPT: Implement hw-breakpoints for PPC64

2009-12-11 Thread K.Prasad
Implement perf-events based hw-breakpoint interfaces for PPC64 processors. These interfaces help arbitrate requests from various users and schedules them as appropriate. Signed-off-by: K.Prasad pra...@linux.vnet.ibm.com --- arch/powerpc/Kconfig |1