Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 225929
b: refs/heads/master
c: 4a55c18
h: refs/heads/master
i:
  225927: 862b26d
v: v3
  • Loading branch information
Will Deacon committed Dec 6, 2010
1 parent 72e51b8 commit c21038d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 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: ce9b1b09520789223f72a9fefd5f0e329f8d89d0
refs/heads/master: 4a55c18e2023096c8684fae5fa1cfa96a03172ff
20 changes: 13 additions & 7 deletions trunk/arch/arm/kernel/hw_breakpoint.c
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ int arch_install_hw_breakpoint(struct perf_event *bp)
/* Breakpoint */
ctrl_base = ARM_BASE_BCR;
val_base = ARM_BASE_BVR;
slots = __get_cpu_var(bp_on_reg);
slots = (struct perf_event **)__get_cpu_var(bp_on_reg);
max_slots = core_num_brps;
if (info->step_ctrl.enabled) {
/* Override the breakpoint data with the step data. */
Expand All @@ -357,7 +357,7 @@ int arch_install_hw_breakpoint(struct perf_event *bp)
ctrl_base = ARM_BASE_WCR;
val_base = ARM_BASE_WVR;
}
slots = __get_cpu_var(wp_on_reg);
slots = (struct perf_event **)__get_cpu_var(wp_on_reg);
max_slots = core_num_wrps;
}

Expand Down Expand Up @@ -394,15 +394,15 @@ void arch_uninstall_hw_breakpoint(struct perf_event *bp)
if (info->ctrl.type == ARM_BREAKPOINT_EXECUTE) {
/* Breakpoint */
base = ARM_BASE_BCR;
slots = __get_cpu_var(bp_on_reg);
slots = (struct perf_event **)__get_cpu_var(bp_on_reg);
max_slots = core_num_brps;
} else {
/* Watchpoint */
if (info->step_ctrl.enabled)
base = ARM_BASE_BCR + core_num_brps;
else
base = ARM_BASE_WCR;
slots = __get_cpu_var(wp_on_reg);
slots = (struct perf_event **)__get_cpu_var(wp_on_reg);
max_slots = core_num_wrps;
}

Expand Down Expand Up @@ -662,9 +662,11 @@ static void disable_single_step(struct perf_event *bp)
static void watchpoint_handler(unsigned long unknown, struct pt_regs *regs)
{
int i;
struct perf_event *wp, **slots = __get_cpu_var(wp_on_reg);
struct perf_event *wp, **slots;
struct arch_hw_breakpoint *info;

slots = (struct perf_event **)__get_cpu_var(wp_on_reg);

/* Without a disassembler, we can only handle 1 watchpoint. */
BUG_ON(core_num_wrps > 1);

Expand Down Expand Up @@ -703,9 +705,11 @@ static void watchpoint_handler(unsigned long unknown, struct pt_regs *regs)
static void watchpoint_single_step_handler(unsigned long pc)
{
int i;
struct perf_event *wp, **slots = __get_cpu_var(wp_on_reg);
struct perf_event *wp, **slots;
struct arch_hw_breakpoint *info;

slots = (struct perf_event **)__get_cpu_var(wp_on_reg);

for (i = 0; i < core_num_reserved_brps; ++i) {
rcu_read_lock();

Expand Down Expand Up @@ -734,10 +738,12 @@ static void breakpoint_handler(unsigned long unknown, struct pt_regs *regs)
{
int i;
u32 ctrl_reg, val, addr;
struct perf_event *bp, **slots = __get_cpu_var(bp_on_reg);
struct perf_event *bp, **slots;
struct arch_hw_breakpoint *info;
struct arch_hw_breakpoint_ctrl ctrl;

slots = (struct perf_event **)__get_cpu_var(bp_on_reg);

/* The exception entry code places the amended lr in the PC. */
addr = regs->ARM_pc;

Expand Down

0 comments on commit c21038d

Please sign in to comment.