linux/arch/sh
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
..
boards sh: ms7724: Add tiny-document for sound 2010-03-23 13:19:34 +09:00
boot arch/sh/boot/compressed/cache.c: Checkpatch cleanup 2010-03-01 11:57:31 +09:00
cchips sh: Fix up hp6xx build. 2010-02-05 17:45:14 +09:00
configs sh: Update ecovec_defconfig 2010-03-29 11:37:49 +09:00
drivers 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
include hw-breakpoints: Get the number of available registers on boot dynamically 2010-05-01 04:32:14 +02:00
kernel hw-breakpoints: Change/Enforce some breakpoints policies 2010-05-01 04:32:10 +02:00
lib arch/sh/lib/libgcc.h: Checkpatch cleanup 2010-03-01 11:57:29 +09:00
lib64 sh64: Kill off special clear_page() implementation. 2009-08-04 17:17:00 +09:00
math-emu sh: Move over to dynamically allocated FPU context. 2010-01-13 12:51:40 +09:00
mm Merge branch 'master' into export-slabh 2010-04-05 11:37:28 +09:00
oprofile sh: oprofile: Fix up count size mismatch for common impl. 2009-11-05 17:13:15 +09:00
tools Merge branch 'sh/stable-updates' 2010-01-18 20:47:37 +09:00
Kconfig hw-breakpoints: Separate constraint space for data and instruction breakpoints 2010-05-01 04:32:11 +02:00
Kconfig.cpu sh: Turn on speculative return for SH7785 and SH7786 2010-02-18 18:54:18 +09:00
Kconfig.debug sh: Remove old early serial console code V2 2009-12-15 12:07:35 +09:00
Makefile sh: mach-titan: Kill off unused PIO port mangling. 2010-01-28 15:08:21 +09:00