diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-28 15:55:55 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-28 15:55:55 -0400 |
commit | c4a227d89f758e582fd167bb15245f2704de99ef (patch) | |
tree | f5b6e0091e6543c14d1cd7cf1f93e097a96bbd64 /arch/x86/kernel/ftrace.c | |
parent | 87367a0b71a5188e34a913c05673b5078f71a64d (diff) | |
parent | f506b3dc0ec454a16d40cab9ee5d75435b39dc50 (diff) |
Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (25 commits)
perf: Fix SIGIO handling
perf top: Don't stop if no kernel symtab is found
perf top: Handle kptr_restrict
perf top: Remove unused macro
perf events: initialize fd array to -1 instead of 0
perf tools: Make sure kptr_restrict warnings fit 80 col terms
perf tools: Fix build on older systems
perf symbols: Handle /proc/sys/kernel/kptr_restrict
perf: Remove duplicate headers
ftrace: Add internal recursive checks
tracing: Update btrfs's tracepoints to use u64 interface
tracing: Add __print_symbolic_u64 to avoid warnings on 32bit machine
ftrace: Set ops->flag to enabled even on static function tracing
tracing: Have event with function tracer check error return
ftrace: Have ftrace_startup() return failure code
jump_label: Check entries limit in __jump_label_update
ftrace/recordmcount: Avoid STT_FUNC symbols as base on ARM
scripts/tags.sh: Add magic for trace-events for etags too
scripts/tags.sh: Fix ctags for DEFINE_EVENT()
x86/ftrace: Fix compiler warning in ftrace.c
...
Diffstat (limited to 'arch/x86/kernel/ftrace.c')
-rw-r--r-- | arch/x86/kernel/ftrace.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/arch/x86/kernel/ftrace.c b/arch/x86/kernel/ftrace.c index 0ba15a6cc57e..c9a281f272fd 100644 --- a/arch/x86/kernel/ftrace.c +++ b/arch/x86/kernel/ftrace.c | |||
@@ -123,7 +123,7 @@ static unsigned char *ftrace_call_replace(unsigned long ip, unsigned long addr) | |||
123 | static atomic_t nmi_running = ATOMIC_INIT(0); | 123 | static atomic_t nmi_running = ATOMIC_INIT(0); |
124 | static int mod_code_status; /* holds return value of text write */ | 124 | static int mod_code_status; /* holds return value of text write */ |
125 | static void *mod_code_ip; /* holds the IP to write to */ | 125 | static void *mod_code_ip; /* holds the IP to write to */ |
126 | static void *mod_code_newcode; /* holds the text to write to the IP */ | 126 | static const void *mod_code_newcode; /* holds the text to write to the IP */ |
127 | 127 | ||
128 | static unsigned nmi_wait_count; | 128 | static unsigned nmi_wait_count; |
129 | static atomic_t nmi_update_count = ATOMIC_INIT(0); | 129 | static atomic_t nmi_update_count = ATOMIC_INIT(0); |
@@ -225,7 +225,7 @@ within(unsigned long addr, unsigned long start, unsigned long end) | |||
225 | } | 225 | } |
226 | 226 | ||
227 | static int | 227 | static int |
228 | do_ftrace_mod_code(unsigned long ip, void *new_code) | 228 | do_ftrace_mod_code(unsigned long ip, const void *new_code) |
229 | { | 229 | { |
230 | /* | 230 | /* |
231 | * On x86_64, kernel text mappings are mapped read-only with | 231 | * On x86_64, kernel text mappings are mapped read-only with |
@@ -266,8 +266,8 @@ static const unsigned char *ftrace_nop_replace(void) | |||
266 | } | 266 | } |
267 | 267 | ||
268 | static int | 268 | static int |
269 | ftrace_modify_code(unsigned long ip, unsigned char *old_code, | 269 | ftrace_modify_code(unsigned long ip, unsigned const char *old_code, |
270 | unsigned char *new_code) | 270 | unsigned const char *new_code) |
271 | { | 271 | { |
272 | unsigned char replaced[MCOUNT_INSN_SIZE]; | 272 | unsigned char replaced[MCOUNT_INSN_SIZE]; |
273 | 273 | ||
@@ -301,7 +301,7 @@ ftrace_modify_code(unsigned long ip, unsigned char *old_code, | |||
301 | int ftrace_make_nop(struct module *mod, | 301 | int ftrace_make_nop(struct module *mod, |
302 | struct dyn_ftrace *rec, unsigned long addr) | 302 | struct dyn_ftrace *rec, unsigned long addr) |
303 | { | 303 | { |
304 | unsigned char *new, *old; | 304 | unsigned const char *new, *old; |
305 | unsigned long ip = rec->ip; | 305 | unsigned long ip = rec->ip; |
306 | 306 | ||
307 | old = ftrace_call_replace(ip, addr); | 307 | old = ftrace_call_replace(ip, addr); |
@@ -312,7 +312,7 @@ int ftrace_make_nop(struct module *mod, | |||
312 | 312 | ||
313 | int ftrace_make_call(struct dyn_ftrace *rec, unsigned long addr) | 313 | int ftrace_make_call(struct dyn_ftrace *rec, unsigned long addr) |
314 | { | 314 | { |
315 | unsigned char *new, *old; | 315 | unsigned const char *new, *old; |
316 | unsigned long ip = rec->ip; | 316 | unsigned long ip = rec->ip; |
317 | 317 | ||
318 | old = ftrace_nop_replace(); | 318 | old = ftrace_nop_replace(); |