From 105244ec95590f5f12a90d974650ab5c7bc8ec79 Mon Sep 17 00:00:00 2001 From: Paul Mundt Date: Mon, 1 Mar 2010 11:52:03 +0900 Subject: sh: hw-breakpoints: Accept breakpoints on NULL addresses. This follows the x86 change 84d710926797a6e317e7e94654a3ccd771cfd8a3 ("hw-breakpoints: Accept breakpoints on NULL address") and restores the previous expected ptrace behaviour. Signed-off-by: Paul Mundt diff --git a/arch/sh/kernel/hw_breakpoint.c b/arch/sh/kernel/hw_breakpoint.c index e2f1753..675eea7 100644 --- a/arch/sh/kernel/hw_breakpoint.c +++ b/arch/sh/kernel/hw_breakpoint.c @@ -143,26 +143,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); - - /* - * 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) { @@ -276,10 +256,12 @@ 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 -- cgit v0.10.2 From 5499b45190237ca90dd2ac86395cf464fe1f4cc7 Mon Sep 17 00:00:00 2001 From: Andrea Gelmini Date: Sat, 27 Feb 2010 16:51:23 +0000 Subject: arch/sh/lib/libgcc.h: Checkpatch cleanup arch/sh/lib/libgcc.h:21: ERROR: open brace '{' following union go on the same line Signed-off-by: Andrea Gelmini Signed-off-by: Paul Mundt diff --git a/arch/sh/lib/libgcc.h b/arch/sh/lib/libgcc.h index 3f19d1c..05909d58 100644 --- a/arch/sh/lib/libgcc.h +++ b/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; -- cgit v0.10.2 From 55c1b0d27b2d381a1986520b5953d3a454d344b5 Mon Sep 17 00:00:00 2001 From: Andrea Gelmini Date: Sat, 27 Feb 2010 16:51:36 +0000 Subject: arch/sh/boot/compressed/cache.c: Checkpatch cleanup arch/sh/boot/compressed/cache.c:8: WARNING: space prohibited between function name and open parenthesis '(' Signed-off-by: Andrea Gelmini Signed-off-by: Paul Mundt diff --git a/arch/sh/boot/compressed/cache.c b/arch/sh/boot/compressed/cache.c index e27fc74..d0b77b6 100644 --- a/arch/sh/boot/compressed/cache.c +++ b/arch/sh/boot/compressed/cache.c @@ -5,7 +5,7 @@ int cache_control(unsigned int command) for (i = 0; i < (32 * 1024); i += 32) { (void)*p; - p += (32 / sizeof (int)); + p += (32 / sizeof(int)); } return 0; -- cgit v0.10.2 From 4b62c0f1e76fe3327b695c49195af8b58e4da057 Mon Sep 17 00:00:00 2001 From: "Robert P. J. Day" Date: Sat, 27 Feb 2010 18:35:08 +0000 Subject: sh: No need to explicitly include . Since already includes , and the latter file will warn about not having included the former file anyway, there is no value in including rwlock.h explicitly. Signed-off-by: Robert P. J. Day Signed-off-by: Paul Mundt diff --git a/arch/sh/mm/pmb.c b/arch/sh/mm/pmb.c index 198bcff..35b364f 100644 --- a/arch/sh/mm/pmb.c +++ b/arch/sh/mm/pmb.c @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include -- cgit v0.10.2