diff options
-rw-r--r-- | arch/powerpc/include/asm/hw_breakpoint.h | 5 | ||||
-rw-r--r-- | arch/powerpc/kernel/hw_breakpoint.c | 10 |
2 files changed, 11 insertions, 4 deletions
diff --git a/arch/powerpc/include/asm/hw_breakpoint.h b/arch/powerpc/include/asm/hw_breakpoint.h index ea87f8ae7bdb..1c33ec17ca36 100644 --- a/arch/powerpc/include/asm/hw_breakpoint.h +++ b/arch/powerpc/include/asm/hw_breakpoint.h | |||
@@ -37,10 +37,6 @@ struct arch_hw_breakpoint { | |||
37 | #include <asm/reg.h> | 37 | #include <asm/reg.h> |
38 | #include <asm/system.h> | 38 | #include <asm/system.h> |
39 | 39 | ||
40 | static inline int hw_breakpoint_slots(int type) | ||
41 | { | ||
42 | return HBP_NUM; | ||
43 | } | ||
44 | struct perf_event; | 40 | struct perf_event; |
45 | struct pmu; | 41 | struct pmu; |
46 | struct perf_sample_data; | 42 | struct perf_sample_data; |
@@ -49,6 +45,7 @@ struct perf_sample_data; | |||
49 | /* Maximum permissible length of any HW Breakpoint */ | 45 | /* Maximum permissible length of any HW Breakpoint */ |
50 | #define HW_BREAKPOINT_LEN 0x8 | 46 | #define HW_BREAKPOINT_LEN 0x8 |
51 | 47 | ||
48 | extern int hw_breakpoint_slots(int type); | ||
52 | extern int arch_bp_generic_fields(int type, int *gen_bp_type); | 49 | extern int arch_bp_generic_fields(int type, int *gen_bp_type); |
53 | extern int arch_check_bp_in_kernelspace(struct perf_event *bp); | 50 | extern int arch_check_bp_in_kernelspace(struct perf_event *bp); |
54 | extern int arch_validate_hwbkpt_settings(struct perf_event *bp); | 51 | extern int arch_validate_hwbkpt_settings(struct perf_event *bp); |
diff --git a/arch/powerpc/kernel/hw_breakpoint.c b/arch/powerpc/kernel/hw_breakpoint.c index 5a1d55d06a08..5ecd0401cdb1 100644 --- a/arch/powerpc/kernel/hw_breakpoint.c +++ b/arch/powerpc/kernel/hw_breakpoint.c | |||
@@ -44,6 +44,16 @@ | |||
44 | static DEFINE_PER_CPU(struct perf_event *, bp_per_reg); | 44 | static DEFINE_PER_CPU(struct perf_event *, bp_per_reg); |
45 | 45 | ||
46 | /* | 46 | /* |
47 | * Returns total number of data or instruction breakpoints available. | ||
48 | */ | ||
49 | int hw_breakpoint_slots(int type) | ||
50 | { | ||
51 | if (type == TYPE_DATA) | ||
52 | return HBP_NUM; | ||
53 | return 0; /* no instruction breakpoints available */ | ||
54 | } | ||
55 | |||
56 | /* | ||
47 | * Install a perf counter breakpoint. | 57 | * Install a perf counter breakpoint. |
48 | * | 58 | * |
49 | * We seek a free debug address register and use it for this | 59 | * We seek a free debug address register and use it for this |