lkml.org 
[lkml]   [2009]   [Oct]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC Patch 2/4] Allow breakpoints to be enabled/disabled without yielding the breakpoint request through new APIs - <enable><disable>_hw_breakpoint()
From
Date
On Tue, 2009-10-27 at 02:49 +0530, K.Prasad wrote:

> Index: linux-2.6-tip.perf_hbkpt/include/asm-generic/hw_breakpoint.h
> ===================================================================
> --- linux-2.6-tip.perf_hbkpt.orig/include/asm-generic/hw_breakpoint.h
> +++ linux-2.6-tip.perf_hbkpt/include/asm-generic/hw_breakpoint.h
> @@ -102,11 +102,22 @@
> * ----------------------------------------------------------------------
> */
> struct hw_breakpoint {
> + /*
> + * Denotes if a breakpoint is currently enabled in physical debug
> + * registers. Not to be set directly by the end-user. Must be
> + * operated through <enable><disable>_hw_breakpoint() APIs only.
> + */
> + atomic_t enabled;

Just a nit, but by looking at this structure as a whole, it's not easy
to see that the above comment is talking just about the "enabled" part
of the structure or the entire structure itself.

Probably want to add ...

/*
* The enabled item denotes if ...


-- Steve

> void (*triggered)(struct hw_breakpoint *, struct pt_regs *);
> const cpumask_t *cpumask;
> struct arch_hw_breakpoint info;
> };
>
> +enum bp_status {
> + BP_DISABLED = 0,
> + BP_ENABLED = 1
> +};
> +



\
 
 \ /
  Last update: 2009-10-28 21:35    [W:0.078 / U:0.524 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site