diff --git a/[refs] b/[refs] index 0ee72a34991f..0c485e909a2d 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 105244ec95590f5f12a90d974650ab5c7bc8ec79 +refs/heads/master: 5499b45190237ca90dd2ac86395cf464fe1f4cc7 diff --git a/trunk/arch/sh/kernel/hw_breakpoint.c b/trunk/arch/sh/kernel/hw_breakpoint.c index 675eea7785d9..e2f1753d275c 100644 --- a/trunk/arch/sh/kernel/hw_breakpoint.c +++ b/trunk/arch/sh/kernel/hw_breakpoint.c @@ -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) { @@ -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 diff --git a/trunk/arch/sh/lib/libgcc.h b/trunk/arch/sh/lib/libgcc.h index 3f19d1c5d942..05909d58e2fe 100644 --- a/trunk/arch/sh/lib/libgcc.h +++ b/trunk/arch/sh/lib/libgcc.h @@ -17,8 +17,7 @@ struct DWstruct { #error I feel sick. #endif -typedef union -{ +typedef union { struct DWstruct s; long long ll; } DWunion;