kernel-ark/kernel/trace
Frederic Weisbecker feef47d0cb hw-breakpoints: Get the number of available registers on boot dynamically
The breakpoint generic layer assumes that archs always know in advance
the static number of address registers available to host breakpoints
through the HBP_NUM macro.

However this is not true for every archs. For example Arm needs to get
this information dynamically to handle the compatiblity between
different versions.

To solve this, this patch proposes to drop the static HBP_NUM macro
and let the arch provide the number of available slots through a
new hw_breakpoint_slots() function. For archs that have
CONFIG_HAVE_MIXED_BREAKPOINTS_REGS selected, it will be called once
as the number of registers fits for instruction and data breakpoints
together.
For the others it will be called first to get the number of
instruction breakpoint registers and another time to get the
data breakpoint registers, the targeted type is given as a
parameter of hw_breakpoint_slots().

Reported-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Acked-by: Paul Mundt <lethal@linux-sh.org>
Cc: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
Cc: K. Prasad <prasad@linux.vnet.ibm.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Jason Wessel <jason.wessel@windriver.com>
Cc: Ingo Molnar <mingo@elte.hu>
2010-05-01 04:32:14 +02:00
..
blktrace.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
ftrace.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
Kconfig x86, perf, bts, mm: Delete the never used BTS-ptrace code 2010-03-26 11:33:55 +01:00
kmemtrace.c kmemtrace: Fix up tracer registration 2009-10-01 11:53:44 +02:00
Makefile x86, perf, bts, mm: Delete the never used BTS-ptrace code 2010-03-26 11:33:55 +01:00
power-traces.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
ring_buffer_benchmark.c local_t: Move local.h include to ringbuffer.c and ring_buffer_benchmark.c 2010-01-05 15:34:50 +09:00
ring_buffer.c Merge branch 'master' into export-slabh 2010-04-05 11:37:28 +09:00
trace_boot.c
trace_branch.c tracing: Add correct/incorrect to sort keys for branch annotation output 2010-02-09 21:35:05 -05:00
trace_clock.c tracing: Fix lockdep warning in global_clock() 2010-03-29 15:16:44 -04:00
trace_entries.h x86, perf, bts, mm: Delete the never used BTS-ptrace code 2010-03-26 11:33:55 +01:00
trace_event_perf.c perf: Correctly align perf event tracing buffer 2010-04-01 08:26:30 +02:00
trace_events_filter.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
trace_events.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
trace_export.c tracing: Remove show_format and related macros from TRACE_EVENT 2010-01-06 12:08:46 -05:00
trace_functions_graph.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
trace_functions.c
trace_irqsoff.c tracing: Add stack trace to irqsoff tracer 2009-12-11 13:19:51 -05:00
trace_kprobe.c tracing/kprobes: Support basic types on dynamic events 2010-04-14 17:26:28 -03:00
trace_ksym.c hw-breakpoints: Get the number of available registers on boot dynamically 2010-05-01 04:32:14 +02:00
trace_mmiotrace.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
trace_nop.c
trace_output.c tracing: Add full state to trace_seq 2009-12-09 14:05:49 -05:00
trace_output.h
trace_printk.c
trace_sched_switch.c
trace_sched_wakeup.c locking: Convert __raw_spin* functions to arch_spin* 2009-12-14 23:55:32 +01:00
trace_selftest_dynamic.c
trace_selftest.c Merge branch 'linus' into perf/core 2010-04-08 13:37:18 +02:00
trace_stack.c tracing: Fix circular dead lock in stack trace 2010-02-02 10:20:18 -05:00
trace_stat.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
trace_stat.h
trace_syscalls.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
trace_sysprof.c perf events, x86/stacktrace: Make stack walking optional 2009-12-17 09:56:19 +01:00
trace_workqueue.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
trace.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
trace.h tracing/kprobes: Support basic types on dynamic events 2010-04-14 17:26:28 -03:00