Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 186482
b: refs/heads/master
c: 5499b45
h: refs/heads/master
v: v3
  • Loading branch information
Andrea Gelmini authored and Paul Mundt committed Mar 1, 2010
1 parent fba4ec1 commit 3d6efb9
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 9 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: 105244ec95590f5f12a90d974650ab5c7bc8ec79
refs/heads/master: 5499b45190237ca90dd2ac86395cf464fe1f4cc7
30 changes: 24 additions & 6 deletions trunk/arch/sh/kernel/hw_breakpoint.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,26 @@ 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);

/*
* User-space requests will always have the address field populated
* 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 sh_len, int sh_type,
int *gen_len, int *gen_type)
{
Expand Down Expand Up @@ -256,12 +276,10 @@ int arch_validate_hwbkpt_settings(struct perf_event *bp,
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);
ret = arch_store_info(bp);

if (ret < 0)
return ret;

/*
* Check that the low-order bits of the address are appropriate
Expand Down
3 changes: 1 addition & 2 deletions trunk/arch/sh/lib/libgcc.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ struct DWstruct {
#error I feel sick.
#endif

typedef union
{
typedef union {
struct DWstruct s;
long long ll;
} DWunion;
Expand Down

0 comments on commit 3d6efb9

Please sign in to comment.