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 { #include #include -static inline int hw_breakpoint_slots(int type) -{ - return HBP_NUM; -} struct perf_event; struct pmu; struct perf_sample_data; @@ -49,6 +45,7 @@ struct perf_sample_data; /* Maximum permissible length of any HW Breakpoint */ #define HW_BREAKPOINT_LEN 0x8 +extern int hw_breakpoint_slots(int type); extern int arch_bp_generic_fields(int type, int *gen_bp_type); extern int arch_check_bp_in_kernelspace(struct perf_event *bp); 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 @@ -43,6 +43,16 @@ */ static DEFINE_PER_CPU(struct perf_event *, bp_per_reg); +/* + * Returns total number of data or instruction breakpoints available. + */ +int hw_breakpoint_slots(int type) +{ + if (type == TYPE_DATA) + return HBP_NUM; + return 0; /* no instruction breakpoints available */ +} + /* * Install a perf counter breakpoint. *