Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 204687
b: refs/heads/master
c: d09ec73
h: refs/heads/master
i:
  204685: e78cb5e
  204683: 82a3bfe
  204679: 93f070d
  204671: 179fa34
v: v3
  • Loading branch information
Paul Mackerras committed Jun 30, 2010
1 parent 7932500 commit 150712a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 76b0f1337690d223811c852ad3a5078eb89276c5
refs/heads/master: d09ec7387184eba9e3030496f0451204090ff610
5 changes: 1 addition & 4 deletions trunk/arch/powerpc/include/asm/hw_breakpoint.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,6 @@ struct arch_hw_breakpoint {
#include <asm/reg.h>
#include <asm/system.h>

static inline int hw_breakpoint_slots(int type)
{
return HBP_NUM;
}
struct perf_event;
struct pmu;
struct perf_sample_data;
Expand All @@ -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);
Expand Down
10 changes: 10 additions & 0 deletions trunk/arch/powerpc/kernel/hw_breakpoint.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down

0 comments on commit 150712a

Please sign in to comment.