On Thu, May 27, 2010 at 09:12:41AM +0530, Mahesh Salgaonkar wrote: > > Introduce s390 specific implementation for the perf-events based hardware > breakpoint interfaces defined in kernel/hw_breakpoint.c. Enable the > HAVE_HW_BREAKPOINT flag and the Makefile. > > Change: > - Use exclude_kernel attribute set to decide whether to install wide > breakpoint in kernel or not. This flag will be used by ptrace > breakpoint. > - Removed 'info->name' field as Name to address resolving is done in > generic code. > - Select CONFIG_HAVE_MIXED_BREAKPOINTS_REGS as s390 uses same register > for instruction as well as data breakpoint. > > Signed-off-by: Mahesh Salgaonkar <mahesh@xxxxxxxxxxxxxxxxxx> Looks globally good to me. Acked-by: Frederic Weisbecker <fweisbec@xxxxxxxxx> Just a few minor comments: > +#include <asm/hw_breakpoint.h> > +#include <asm/processor.h> > +#include <asm/sections.h> > +#include <asm/uaccess.h> > + > +/* Per cpu PER control register values */ > +DEFINE_PER_CPU(per_cr_bits, cpu_per_regs[1]) Why is it an array? ; > + > +/* > + * Stores the breakpoints currently in use on each breakpoint address > + * register for each cpus > + */ > +static DEFINE_PER_CPU(struct perf_event *, bp_per_reg[HBP_NUM]); Same here. > + > +/* > + * Install a perf counter breakpoint. > + * > + * S390 provides only one hardware breakpoint register. Use it for this > + * breakpoint if free. > + * > + * Atomic: we hold the counter->ctx->lock and we only handle variables, > + * lowcore area and control registers local to this cpu. > + */ > +int arch_install_hw_breakpoint(struct perf_event *bp) > +{ > + struct arch_hw_breakpoint *info = counter_arch_bp(bp); > + struct perf_event **slot; > + struct task_struct *tsk = bp->ctx->task; > + per_cr_bits per_regs[1]; Same, and all the others that follow. Thanks. -- To unsubscribe from this list: send the line "unsubscribe linux-s390" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html