Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 180722
b: refs/heads/master
c: 84d7109
h: refs/heads/master
v: v3
  • Loading branch information
Frederic Weisbecker committed Feb 19, 2010
1 parent 1c85544 commit a3b4893
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 24 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: 6f93d0a7c83772997b81c30d6f519a9a5dbab6a9
refs/heads/master: 84d710926797a6e317e7e94654a3ccd771cfd8a3
30 changes: 7 additions & 23 deletions trunk/arch/x86/kernel/hw_breakpoint.c
Original file line number Diff line number Diff line change
Expand Up @@ -212,25 +212,6 @@ static int arch_check_va_in_kernelspace(unsigned long va, u8 hbp_len)
return (va >= TASK_SIZE) && ((va + len - 1) >= TASK_SIZE);
}

/*
* Store a breakpoint's encoded address, length, and type.
*/
static int arch_store_info(struct perf_event *bp)
{
struct arch_hw_breakpoint *info = counter_arch_bp(bp);
/*
* For kernel-addresses, either the address or symbol name can be
* specified.
*/
if (info->name)
info->address = (unsigned long)
kallsyms_lookup_name(info->name);
if (info->address)
return 0;

return -EINVAL;
}

int arch_bp_generic_fields(int x86_len, int x86_type,
int *gen_len, int *gen_type)
{
Expand Down Expand Up @@ -362,10 +343,13 @@ int arch_validate_hwbkpt_settings(struct perf_event *bp,
return ret;
}

ret = arch_store_info(bp);

if (ret < 0)
return ret;
/*
* For kernel-addresses, either the address or symbol name can be
* specified.
*/
if (info->name)
info->address = (unsigned long)
kallsyms_lookup_name(info->name);
/*
* Check that the low-order bits of the address are appropriate
* for the alignment implied by len.
Expand Down

0 comments on commit a3b4893

Please sign in to comment.